Append noexecstack to linker flags instead of assembler flags

* Better compatibility with LLVM toolchain where clang -c doesn't
  support the flag, but the linker does. LLD already defaults to
  noexecstack, but adding it in the linker phase will avoid errors about
  unsupported options.

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2023-10-29 13:48:07 +02:00
parent 9ae8b0b3b6
commit e171384c19
No known key found for this signature in database
GPG Key ID: A12750536B5E7010

View File

@ -358,7 +358,7 @@ override CFLAGS+=-fPIC -fPIE
override CXXFLAGS+=-fPIC -fPIE
# Non-executable stack
override ASFLAGS+=--noexecstack
override LDFLAGS+=-Wl,-z,noexecstack
.PHONY: all
all: one