summaryrefslogtreecommitdiffstats
path: root/SOURCES/gcc304.patch
blob: 2c1693c2fb383d9e5e3dc7e9f452a3bfec0285be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--- gcc-3.0.4.orig/gcc/fixinc/mkfixinc.sh	2001-12-13 03:20:27.000000000 +0100
+++ gcc-3.0.4/gcc/fixinc/mkfixinc.sh	2017-11-05 23:02:55.000000000 +0100
@@ -84,6 +84,7 @@
     powerpc-*-eabisim* | \
     powerpc-*-eabi*    | \
     powerpc-*-rtems*   | \
+    powerpc-*-vxworks*   | \
     powerpcle-*-eabisim* | \
     powerpcle-*-eabi*  | \
     powerpcle-*-winnt* | \
diff -ruNb gcc-3.0.4.orig/gcc/config/rs6000/vxppc.h gcc-3.0.4/gcc/config/rs6000/vxppc.h
--- gcc-3.0.4.orig/gcc/config/rs6000/vxppc.h	2000-11-03 00:29:12.000000000 +0100
+++ gcc-3.0.4/gcc/config/rs6000/vxppc.h	2017-11-06 09:46:39.911182137 +0100
@@ -41,7 +41,7 @@
 
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES "\
--D__vxworks -D__vxworks__ -Asystem=vxworks -Asystem=embedded \
+-D__vxworks -D__vxworks__ -D__VXVARGS__ -Asystem=vxworks -Asystem=embedded \
 -Acpu=powerpc -Amachine=powerpc"
 
 /* Don't define _LITTLE_ENDIAN or _BIG_ENDIAN */
Binary files gcc-3.0.4.orig/gcc/config/rs6000/.vxppc.h.swp and gcc-3.0.4/gcc/config/rs6000/.vxppc.h.swp differ
diff -ruNb gcc-3.0.4.orig/gcc/fixinc/inclhack.def gcc-3.0.4/gcc/fixinc/inclhack.def
--- gcc-3.0.4.orig/gcc/fixinc/inclhack.def	2001-12-13 03:20:27.000000000 +0100
+++ gcc-3.0.4/gcc/fixinc/inclhack.def	2017-11-06 09:46:22.431216101 +0100
@@ -3255,6 +3255,35 @@
     "#endif /* __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__ */\n";
 };
 
+/*
+ *   Fix VxWorks varargs header
+ */
+fix = {
+    hackname = vxworks_varargs_problem;
+    files    = arch/ppc/toolPpc.h;
+    select   = "GNU C varargs support for the PowerPC with V.4 calling sequence";
+
+    sed = "/\\/\\* GNU C varargs support for the PowerPC with V.4 calling sequence \\*\\//a\\\n"
+ 	    "#ifdef __VXVARGS__\\\n"
+ 		"#include <va-ppc.h>\\\n"
+ 		"#else /* !defined(__VXVARGS__) */\\\n";
+ 
+    sed = "/\\/\\* END CYGNUS LOCAL Waiting for 2.7.1 to unfreeze \\*\\//i\\\n"
+ 		"#endif /* !defined(__VXVARGS__) */\\\n";
+};
+
+/*
+ *   That last fix wont even work unless we make archPpc.h use the default
+ *  search path when it includes toolPpc.h
+ *
+ */
+fix = {
+    hackname = vxworks_arch_includepath;
+    files    = arch/ppc/archPpc.h;
+    select = 'include.*"toolPpc.h"';
+    sed    = "s,\"toolPpc.h\",<arch/ppc/toolPpc.h>,";
+};
+
 
 /*
  *  Fix VxWorks <time.h> to not require including <vxTypes.h>.