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:
parent
da1ff4cf77
commit
d0f957ae85
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue