Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile.cbm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ endif
# shipped artifact. ELF-only: Apple's ld rejects -z noexecstack outright and it
# is meaningless for PE, so it is gated rather than made "common".
ELF_HARDENING_FLAGS :=
ifeq ($(IS_LINUX),yes)
# IS_LINUX comes from uname, i.e. the HOST. Cross-compiling to Windows from a
# Linux container satisfies it while emitting PE, and lld then rejects the
# unknown -z argument. Gate on the TARGET too: IS_MINGW is derived from the
# compiler's own _WIN32 define, so it names what is actually being produced.
ifeq ($(IS_LINUX)$(IS_MINGW),yesno)
ELF_HARDENING_FLAGS := -Wl,-z,noexecstack
endif

Expand Down
Loading