|
@@ -74,10 +74,15 @@ CFLAGS += -Ui386
|
74
|
74
|
# recognise an option that starts with "no", so we have to test for
|
75
|
75
|
# output on stderr instead of checking the exit status.
|
76
|
76
|
#
|
|
77
|
+# Current versions of gcc require -no-pie; older versions require
|
|
78
|
+# -nopie. We therefore test for both.
|
|
79
|
+#
|
77
|
80
|
ifeq ($(CCTYPE),gcc)
|
78
|
|
-PIE_TEST = [ -z "`$(CC) -fno-PIE -nopie -x c -c /dev/null -o /dev/null 2>&1`" ]
|
79
|
|
-PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -nopie')
|
80
|
|
-WORKAROUND_CFLAGS += $(PIE_FLAGS)
|
|
81
|
+PIE_TEST = [ -z "`$(CC) -fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1`" ]
|
|
82
|
+PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -no-pie')
|
|
83
|
+PIE_TEST2 = [ -z "`$(CC) -fno-PIE -nopie -x c -c /dev/null -o /dev/null 2>&1`" ]
|
|
84
|
+PIE_FLAGS2 := $(shell $(PIE_TEST2) && $(ECHO) '-fno-PIE -nopie')
|
|
85
|
+WORKAROUND_CFLAGS += $(PIE_FLAGS) $(PIE_FLAGS2)
|
81
|
86
|
endif
|
82
|
87
|
|
83
|
88
|
# i386-specific directories containing source files
|