source: mainline/tools/toolchain-gcc-4.8.1-headers.patch@ 0cabd10

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 0cabd10 was 5a65d29, checked in by Vojtech Horky <vojtechhorky@…>, 12 years ago

Add HelenOS-specific toolchain patches

It is possible to build '*-helenos-*' toolchain, that is the triplet
would contain the word 'helenos' instead of 'linux' and GCC would
provide some HelenOS-specific macros.

The toolchain can be built with the toolchain.sh script, just provide
—helenos-target as a parameter.

Changes to the autotool/configuration scripts would be added later.

  • Property mode set to 100644
File size: 10.6 KB
RevLine 
[5a65d29]1diff -ud -Nrud gcc-4.8.1/gcc/config/arm/helenos-arm32.h gcc-4.8.1/gcc/config/arm/helenos-arm32.h
2--- gcc-4.8.1/gcc/config/arm/helenos-arm32.h 1970-01-01 01:00:00.000000000 +0100
3+++ gcc-4.8.1/gcc/config/arm/helenos-arm32.h 2013-07-12 13:13:18.292688885 +0200
4@@ -0,0 +1,6 @@
5+/* Definitions for HelenOS compiled for arm32. */
6+
7+#define HELENOS_ARCH_CPP_BUILTINS() \
8+ do { \
9+ builtin_define_with_value("helenos_uarch", "arm32", 0); \
10+ } while (0)
11diff -ud -Nrud gcc-4.8.1/gcc/config/arm/helenos.h gcc-4.8.1/gcc/config/arm/helenos.h
12--- gcc-4.8.1/gcc/config/arm/helenos.h 1970-01-01 01:00:00.000000000 +0100
13+++ gcc-4.8.1/gcc/config/arm/helenos.h 2013-07-12 13:13:22.362704068 +0200
14@@ -0,0 +1,16 @@
15+/* Definitions for HelenOS compiled for arm32.
16+ *
17+ * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/arm/linux-eabi.h)
18+ */
19+
20+#undef TARGET_OS_CPP_BUILTINS
21+#define TARGET_OS_CPP_BUILTINS() \
22+ do \
23+ { \
24+ TARGET_BPABI_CPP_BUILTINS(); \
25+ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
26+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
27+ HELENOS_CPP_BUILTINS(); \
28+ HELENOS_ARCH_CPP_BUILTINS(); \
29+ } \
30+ while (0)
31diff -ud -Nrud gcc-4.8.1/gcc/config/helenos.h gcc-4.8.1/gcc/config/helenos.h
32--- gcc-4.8.1/gcc/config/helenos.h 1970-01-01 01:00:00.000000000 +0100
33+++ gcc-4.8.1/gcc/config/helenos.h 2013-07-12 12:06:57.780007295 +0200
34@@ -0,0 +1,6 @@
35+/* Common definitions for HelenOS. */
36+
37+#define HELENOS_CPP_BUILTINS() \
38+ do { \
39+ builtin_define_std("__helenos__"); \
40+ } while (0)
41diff -ud -Nrud gcc-4.8.1/gcc/config/ia64/helenos.h gcc-4.8.1/gcc/config/ia64/helenos.h
42--- gcc-4.8.1/gcc/config/ia64/helenos.h 1970-01-01 01:00:00.000000000 +0100
43+++ gcc-4.8.1/gcc/config/ia64/helenos.h 2013-07-12 13:17:35.477164401 +0200
44@@ -0,0 +1,13 @@
45+/* Definitions for HelenOS compiled for ia64.
46+ *
47+ * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/ia64/linux.h)
48+ */
49+
50+#undef TARGET_OS_CPP_BUILTINS
51+#define TARGET_OS_CPP_BUILTINS() \
52+do { \
53+ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
54+ builtin_define("_LONGLONG"); \
55+ HELENOS_CPP_BUILTINS(); \
56+ HELENOS_ARCH_CPP_BUILTINS(); \
57+} while (0)
58diff -ud -Nrud gcc-4.8.1/gcc/config/ia64/helenos-ia64.h gcc-4.8.1/gcc/config/ia64/helenos-ia64.h
59--- gcc-4.8.1/gcc/config/ia64/helenos-ia64.h 1970-01-01 01:00:00.000000000 +0100
60+++ gcc-4.8.1/gcc/config/ia64/helenos-ia64.h 2013-07-12 13:17:30.663808636 +0200
61@@ -0,0 +1,6 @@
62+/* Definitions for HelenOS compiled for ia64. */
63+
64+#define HELENOS_ARCH_CPP_BUILTINS() \
65+ do { \
66+ builtin_define_with_value("helenos_uarch", "ia64", 0); \
67+ } while (0)
68diff -ud -Nrud gcc-4.8.1/gcc/config/i386/helenos-amd64.h gcc-4.8.1/gcc/config/i386/helenos-amd64.h
69--- gcc-4.8.1/gcc/config/i386/helenos-amd64.h 1970-01-01 01:00:00.000000000 +0100
70+++ gcc-4.8.1/gcc/config/i386/helenos-amd64.h 2013-07-12 10:14:11.843671034 +0200
71@@ -0,0 +1,6 @@
72+/* Definitions for HelenOS compiled for amd64. */
73+
74+#define HELENOS_ARCH_CPP_BUILTINS() \
75+ do { \
76+ builtin_define_with_value("helenos_uarch", "amd64", 0); \
77+ } while (0)
78diff -ud -Nrud gcc-4.8.1/gcc/config/i386/helenos.h gcc-4.8.1/gcc/config/i386/helenos.h
79--- gcc-4.8.1/gcc/config/i386/helenos.h 1970-01-01 01:00:00.000000000 +0100
80+++ gcc-4.8.1/gcc/config/i386/helenos.h 2013-07-12 10:12:55.409994661 +0200
81@@ -0,0 +1,15 @@
82+/* Definitions for HelenOS compiled for ia32/amd64.
83+ *
84+ * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/i386/linux-common.h)
85+ */
86+
87+#undef TARGET_OS_CPP_BUILTINS
88+#define TARGET_OS_CPP_BUILTINS() \
89+ do \
90+ { \
91+ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
92+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
93+ HELENOS_CPP_BUILTINS(); \
94+ HELENOS_ARCH_CPP_BUILTINS(); \
95+ } \
96+ while (0)
97diff -ud -Nrud gcc-4.8.1/gcc/config/i386/helenos-ia32.h gcc-4.8.1/gcc/config/i386/helenos-ia32.h
98--- gcc-4.8.1/gcc/config/i386/helenos-ia32.h 1970-01-01 01:00:00.000000000 +0100
99+++ gcc-4.8.1/gcc/config/i386/helenos-ia32.h 2013-07-12 10:14:07.256983828 +0200
100@@ -0,0 +1,6 @@
101+/* Definitions for HelenOS compiled for ia32. */
102+
103+#define HELENOS_ARCH_CPP_BUILTINS() \
104+ do { \
105+ builtin_define_with_value("helenos_uarch", "ia32", 0); \
106+ } while (0)
107diff -ud -Nrud gcc-4.8.1/gcc/config/mips/helenos.h gcc-4.8.1/gcc/config/mips/helenos.h
108--- gcc-4.8.1/gcc/config/mips/helenos.h 1970-01-01 01:00:00.000000000 +0100
109+++ gcc-4.8.1/gcc/config/mips/helenos.h 2013-07-12 10:22:48.782642814 +0200
110@@ -0,0 +1,16 @@
111+/* Definitions for HelenOS compiled for mips32/mips64.
112+ *
113+ * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/mips/linux-common.h)
114+ */
115+
116+#undef TARGET_OS_CPP_BUILTINS
117+#define TARGET_OS_CPP_BUILTINS() \
118+ do { \
119+ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
120+ /* The GNU C++ standard library requires this. */ \
121+ if (c_dialect_cxx ()) \
122+ builtin_define ("_GNU_SOURCE"); \
123+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
124+ HELENOS_CPP_BUILTINS(); \
125+ HELENOS_ARCH_CPP_BUILTINS(); \
126+ } while (0)
127diff -ud -Nrud gcc-4.8.1/gcc/config/mips/helenos-mips32eb.h gcc-4.8.1/gcc/config/mips/helenos-mips32eb.h
128--- gcc-4.8.1/gcc/config/mips/helenos-mips32eb.h 1970-01-01 01:00:00.000000000 +0100
129+++ gcc-4.8.1/gcc/config/mips/helenos-mips32eb.h 2013-07-12 10:21:30.262295740 +0200
130@@ -0,0 +1,6 @@
131+/* Definitions for HelenOS compiled for mips32eb. */
132+
133+#define HELENOS_ARCH_CPP_BUILTINS() \
134+ do { \
135+ builtin_define_with_value("helenos_uarch", "mips32eb", 0); \
136+ } while (0)
137diff -ud -Nrud gcc-4.8.1/gcc/config/mips/helenos-mips32el.h gcc-4.8.1/gcc/config/mips/helenos-mips32el.h
138--- gcc-4.8.1/gcc/config/mips/helenos-mips32el.h 1970-01-01 01:00:00.000000000 +0100
139+++ gcc-4.8.1/gcc/config/mips/helenos-mips32el.h 2013-07-12 10:21:15.885565349 +0200
140@@ -0,0 +1,6 @@
141+/* Definitions for HelenOS compiled for mips32el. */
142+
143+#define HELENOS_ARCH_CPP_BUILTINS() \
144+ do { \
145+ builtin_define_with_value("helenos_uarch", "mips32", 0); \
146+ } while (0)
147diff -ud -Nrud gcc-4.8.1/gcc/config/mips/helenos-mips64el.h gcc-4.8.1/gcc/config/mips/helenos-mips64el.h
148--- gcc-4.8.1/gcc/config/mips/helenos-mips64el.h 1970-01-01 01:00:00.000000000 +0100
149+++ gcc-4.8.1/gcc/config/mips/helenos-mips64el.h 2013-07-12 10:20:27.942019112 +0200
150@@ -0,0 +1,6 @@
151+/* Definitions for HelenOS compiled for mips64. */
152+
153+#define HELENOS_ARCH_CPP_BUILTINS() \
154+ do { \
155+ builtin_define_with_value("helenos_uarch", "mips64", 0); \
156+ } while (0)
157diff -ud -Nrud gcc-4.8.1/gcc/config/rs6000/helenos.h gcc-4.8.1/gcc/config/rs6000/helenos.h
158--- gcc-4.8.1/gcc/config/rs6000/helenos.h 1970-01-01 01:00:00.000000000 +0100
159+++ gcc-4.8.1/gcc/config/rs6000/helenos.h 2013-07-12 13:15:10.209819251 +0200
160@@ -0,0 +1,18 @@
161+/* Definitions for HelenOS compiled for ppc32.
162+ *
163+ * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/rs6000/linux.h)
164+ */
165+
166+#undef TARGET_OS_CPP_BUILTINS
167+#define TARGET_OS_CPP_BUILTINS() \
168+ do \
169+ { \
170+ builtin_define_std ("PPC"); \
171+ builtin_define_std ("powerpc"); \
172+ builtin_assert ("cpu=powerpc"); \
173+ builtin_assert ("machine=powerpc"); \
174+ TARGET_OS_SYSV_CPP_BUILTINS (); \
175+ HELENOS_CPP_BUILTINS(); \
176+ HELENOS_ARCH_CPP_BUILTINS(); \
177+ } \
178+ while (0)
179diff -ud -Nrud gcc-4.8.1/gcc/config/rs6000/helenos-ppc32.h gcc-4.8.1/gcc/config/rs6000/helenos-ppc32.h
180--- gcc-4.8.1/gcc/config/rs6000/helenos-ppc32.h 1970-01-01 01:00:00.000000000 +0100
181+++ gcc-4.8.1/gcc/config/rs6000/helenos-ppc32.h 2013-07-12 13:15:02.986452099 +0200
182@@ -0,0 +1,6 @@
183+/* Definitions for HelenOS compiled for ppc32. */
184+
185+#define HELENOS_ARCH_CPP_BUILTINS() \
186+ do { \
187+ builtin_define_with_value("helenos_uarch", "ppc32", 0); \
188+ } while (0)
189diff -ud -Nrud gcc-4.8.1/gcc/config/rs6000/helenos-ppc64.h gcc-4.8.1/gcc/config/rs6000/helenos-ppc64.h
190--- gcc-4.8.1/gcc/config/rs6000/helenos-ppc64.h 1970-01-01 01:00:00.000000000 +0100
191+++ gcc-4.8.1/gcc/config/rs6000/helenos-ppc64.h 2013-07-12 13:16:27.720181662 +0200
192@@ -0,0 +1,6 @@
193+/* Definitions for HelenOS compiled for ppc64. */
194+
195+#define HELENOS_ARCH_CPP_BUILTINS() \
196+ do { \
197+ builtin_define_with_value("helenos_uarch", "ppc64", 0); \
198+ } while (0)
199diff -ud -Nrud gcc-4.8.1/gcc/config/rs6000/helenos64.h gcc-4.8.1/gcc/config/rs6000/helenos64.h
200--- gcc-4.8.1/gcc/config/rs6000/helenos64.h 1970-01-01 01:00:00.000000000 +0100
201+++ gcc-4.8.1/gcc/config/rs6000/helenos64.h 2013-07-12 13:16:31.873534389 +0200
202@@ -0,0 +1,32 @@
203+/* Definitions for HelenOS compiled for ppc64.
204+ *
205+ * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/rs6000/linux64.h)
206+ */
207+
208+#undef TARGET_OS_CPP_BUILTINS
209+#define TARGET_OS_CPP_BUILTINS() \
210+ do \
211+ { \
212+ if (TARGET_64BIT) \
213+ { \
214+ builtin_define ("__PPC__"); \
215+ builtin_define ("__PPC64__"); \
216+ builtin_define ("__powerpc__"); \
217+ builtin_define ("__powerpc64__"); \
218+ if (!DOT_SYMBOLS) \
219+ builtin_define ("_CALL_LINUX"); \
220+ builtin_assert ("cpu=powerpc64"); \
221+ builtin_assert ("machine=powerpc64"); \
222+ } \
223+ else \
224+ { \
225+ builtin_define_std ("PPC"); \
226+ builtin_define_std ("powerpc"); \
227+ builtin_assert ("cpu=powerpc"); \
228+ builtin_assert ("machine=powerpc"); \
229+ TARGET_OS_SYSV_CPP_BUILTINS (); \
230+ } \
231+ HELENOS_CPP_BUILTINS(); \
232+ HELENOS_ARCH_CPP_BUILTINS(); \
233+ } \
234+ while (0)
235diff -ud -Nrud gcc-4.8.1/gcc/config/sparc/helenos-sparc64.h gcc-4.8.1/gcc/config/sparc/helenos-sparc64.h
236--- gcc-4.8.1/gcc/config/sparc/helenos-sparc64.h 1970-01-01 01:00:00.000000000 +0100
237+++ gcc-4.8.1/gcc/config/sparc/helenos-sparc64.h 2013-07-12 13:19:25.411009134 +0200
238@@ -0,0 +1,6 @@
239+/* Definitions for HelenOS compiled for sparc64. */
240+
241+#define HELENOS_ARCH_CPP_BUILTINS() \
242+ do { \
243+ builtin_define_with_value("helenos_uarch", "sparc64", 0); \
244+ } while (0)
245diff -ud -Nrud gcc-4.8.1/gcc/config/sparc/helenos64.h gcc-4.8.1/gcc/config/sparc/helenos64.h
246--- gcc-4.8.1/gcc/config/sparc/helenos64.h 1970-01-01 01:00:00.000000000 +0100
247+++ gcc-4.8.1/gcc/config/sparc/helenos64.h 2013-07-12 13:19:16.480967658 +0200
248@@ -0,0 +1,19 @@
249+/* Definitions for HelenOS compiled for sparc64.
250+ *
251+ * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/sparc/linux64.h)
252+ */
253+
254+#undef TARGET_OS_CPP_BUILTINS
255+#define TARGET_OS_CPP_BUILTINS() \
256+ do \
257+ { \
258+ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
259+ if (TARGET_ARCH64) \
260+ builtin_define ("_LONGLONG"); \
261+ if (TARGET_ARCH32 \
262+ && TARGET_LONG_DOUBLE_128) \
263+ builtin_define ("__LONG_DOUBLE_128__"); \
264+ HELENOS_CPP_BUILTINS(); \
265+ HELENOS_ARCH_CPP_BUILTINS(); \
266+ } \
267+ while (0)
Note: See TracBrowser for help on using the repository browser.