|
@@ -26,6 +26,18 @@ CFLAGS += -fshort-wchar
|
26
|
26
|
#
|
27
|
27
|
CFLAGS += -Ui386
|
28
|
28
|
|
|
29
|
+# Add -maccumulate-outgoing-args if required by this version of gcc
|
|
30
|
+#
|
|
31
|
+ifeq ($(CCTYPE),gcc)
|
|
32
|
+MS_ABI_TEST_CODE := extern void __attribute__ (( ms_abi )) ms_abi(); \
|
|
33
|
+ void sysv_abi ( void ) { ms_abi(); }
|
|
34
|
+MS_ABI_TEST = $(ECHO) '$(MS_ABI_TEST_CODE)' | \
|
|
35
|
+ $(CC) -m64 -mno-accumulate-outgoing-args -x c -c - -o /dev/null \
|
|
36
|
+ >/dev/null 2>&1
|
|
37
|
+MS_ABI_FLAGS := $(shell $(MS_ABI_TEST) || $(ECHO) '-maccumulate-outgoing-args')
|
|
38
|
+WORKAROUND_CFLAGS += $(MS_ABI_FLAGS)
|
|
39
|
+endif
|
|
40
|
+
|
29
|
41
|
# x86_64-specific directories containing source files
|
30
|
42
|
#
|
31
|
43
|
SRCDIRS += arch/x86_64/prefix
|