Skip to content

Commit

Permalink
Append noexecstack to linker flags instead of assembler flags
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
parona-source committed Oct 29, 2023
1 parent 9ae8b0b commit e171384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion make-linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e171384

Please sign in to comment.