mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 23:42:05 +00:00
product-mini/platforms/linux: Mark vmlib POSITION_INDEPENDENT_CODE (#2323)
This fixes armhf build: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2315 Note: This is not the only place which seems to have the same problem. For example, many of examples sharing the similar structure probably have the same problem. This commit leaves them for now.
This commit is contained in:
parent
ab96e01f5e
commit
5c13bbbde7
|
@ -121,7 +121,10 @@ endif ()
|
|||
set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
||||
|
||||
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
|
||||
|
||||
check_pie_supported()
|
||||
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
set_target_properties (vmlib PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
|
||||
|
||||
|
@ -150,7 +153,6 @@ include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
|||
|
||||
add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
|
||||
|
||||
check_pie_supported()
|
||||
set_target_properties (iwasm PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
install (TARGETS iwasm DESTINATION bin)
|
||||
|
|
Loading…
Reference in New Issue
Block a user