Run x86 perlasm on UNIX with -fPIC.
This matches the Chromium build. Change-Id: I6ebd01c6ecb67c79577f98cf468dc204721595ef Reviewed-on: https://boringssl-review.googlesource.com/3063 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
36eb7d5fbc
commit
69ad27fdd8
@ -1,6 +1,9 @@
|
|||||||
include_directories(. ../include)
|
include_directories(. ../include)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
if (${ARCH} STREQUAL "x86")
|
||||||
|
set(PERLASM_FLAGS "-fPIC")
|
||||||
|
endif()
|
||||||
set(PERLASM_STYLE macosx)
|
set(PERLASM_STYLE macosx)
|
||||||
set(ASM_EXT S)
|
set(ASM_EXT S)
|
||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
@ -9,6 +12,9 @@ elseif(UNIX)
|
|||||||
# The "armx" Perl scripts look for "64" in the style argument
|
# The "armx" Perl scripts look for "64" in the style argument
|
||||||
# in order to decide whether to generate 32- or 64-bit asm.
|
# in order to decide whether to generate 32- or 64-bit asm.
|
||||||
set(PERLASM_STYLE linux64)
|
set(PERLASM_STYLE linux64)
|
||||||
|
elseif (${ARCH} STREQUAL "x86")
|
||||||
|
set(PERLASM_FLAGS "-fPIC")
|
||||||
|
set(PERLASM_STYLE elf)
|
||||||
else()
|
else()
|
||||||
set(PERLASM_STYLE elf)
|
set(PERLASM_STYLE elf)
|
||||||
endif()
|
endif()
|
||||||
@ -31,7 +37,7 @@ endif()
|
|||||||
function(perlasm dest src)
|
function(perlasm dest src)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${dest}
|
OUTPUT ${dest}
|
||||||
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${ARGN} > ${dest}
|
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${PERLASM_FLAGS} ${ARGN} > ${dest}
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${src}
|
${src}
|
||||||
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl
|
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl
|
||||||
|
Loading…
Reference in New Issue
Block a user