mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 13:13:08 +08:00
qemu-intel64: Fixes the linker 'noexecstack' warning
Fix the linker warning based on these two commits: ld: warning: fork.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker commit36ac812114("sim: Fixes the following linker warning:"), commitb5d640acc5("fix Cygwin/MSYS2 ld: unrecognized option '-z'")
This commit is contained in:
@@ -83,6 +83,10 @@ if(CONFIG_DEBUG_SYMBOLS)
|
||||
add_compile_options(${CONFIG_DEBUG_SYMBOLS_LEVEL})
|
||||
endif()
|
||||
|
||||
if(CONFIG_HOST_LINUX)
|
||||
add_link_options(-Wl,-z,noexecstack)
|
||||
endif()
|
||||
|
||||
# Architecture flags
|
||||
|
||||
add_link_options(-Wl,--entry=__pmode_entry)
|
||||
|
||||
@@ -106,6 +106,10 @@ ifeq ($(CONFIG_DEBUG_LINK_WHOLE_ARCHIVE),y)
|
||||
LDFLAGS += --whole-archive
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_HOST_LINUX),y)
|
||||
LDFLAGS += -z noexecstack
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBCXX),y)
|
||||
# Linux C++ ABI seems vary.
|
||||
# Probably __GLIBCXX__ is the best bet.
|
||||
|
||||
Reference in New Issue
Block a user