This is a GCC-only option which controls how GCC involves the linker, but we
don't use $(CC) for linking any more.
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
ld-option = $(shell if $(LD) -v $(1) >/dev/null 2>&1; then echo y; else echo n; fi)
-# Disable PIE, but need to check if compiler supports it
-COMMON_CFLAGS-$(call cc-option,-no-pie) += -no-pie
-
# Arrange for assembly files to have a proper .note.GNU-stack section added,
# to silence warnings otherwise issued by GNU ld 2.39 and newer.
COMMON_AFLAGS-$(call cc-option,-Wa$(comma)--noexecstack) += -Wa,--noexecstack