sim: Fixes the following linker warning:

ld: warning: arch_setjmp_x86_64.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
/usr/bin/ld: warning: nuttx.rel: requires executable stack (because the .note.GNU-stack section is executable)

The linker is instructed to make the stack non-executable with the
switch: `-z noexecstack`.

More information can be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ffcf9c5700e49c0aee42dcba9a12ba21338e8136
This commit is contained in:
Fotis Panagiotopoulos 2023-05-11 14:21:23 +03:00 committed by Alan Carvalho de Assis
parent bf9b8dfbfe
commit 36ac812114

View file

@ -181,6 +181,10 @@ CXXFLAGS := $(ARCHOPTIMIZATION) $(ARCHCXXFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES)
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
ifneq ($(CONFIG_HOST_MACOS),y)
LDLINKFLAGS += -z noexecstack
endif
ifeq ($(CONFIG_LIBCXX),y)
ifeq ($(CONFIG_HOST_MACOS),y)
# macOS uses libc++abi