Browse Source

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 <[email protected]>
Alfred Wingate 1 year ago
parent
commit
e171384c19
1 changed files with 1 additions and 1 deletions
  1. 1 1
      make-linux.mk

+ 1 - 1
make-linux.mk

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