]> git.buserror.net Git - polintos/scott/priv.git/blob - toolchain-patches/gcc/4.1.0/config.patch
minor doc updates
[polintos/scott/priv.git] / toolchain-patches / gcc / 4.1.0 / config.patch
1 diff -urN gcc-4.1.0/config.guess gcc-4.1.0-new/config.guess
2 --- gcc-4.1.0/config.guess      Thu Nov 24 06:49:42 2005
3 +++ gcc-4.1.0-new/config.guess  Fri Apr  7 18:04:43 2006
4 @@ -141,6 +141,9 @@
5  # Note: order is significant - the case branches are not exclusive.
6  
7  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
8 +    *:PolIntOS:*:*)
9 +        echo ${UNAME_MACHINE}-polintos
10 +        exit 0 ;;
11      *:NetBSD:*:*)
12         # NetBSD (nbsd) targets should (where applicable) match one or
13         # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
14 diff -urN gcc-4.1.0/config.sub gcc-4.1.0-new/config.sub
15 --- gcc-4.1.0/config.sub        Fri Dec 16 06:57:40 2005
16 +++ gcc-4.1.0-new/config.sub    Fri Apr  7 18:05:30 2006
17 @@ -1202,7 +1202,7 @@
18               | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
19               | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
20               | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
21 -             | -skyos* | -haiku*)
22 +             | -skyos* | -haiku* | -polintos*)
23         # Remember, each alternative MUST END IN *, to match a version number.
24                 ;;
25         -qnx*)
26 --- gcc-4.1.0-new//gcc/config/i386/polintos.h.ORIG1     Wed Dec 31 18:00:00 1969
27 +++ gcc-4.1.0-new//gcc/config/i386/polintos.h   Sat Apr  8 19:04:55 2006
28 @@ -0,0 +1,145 @@
29 +/* Definitions for Intel x86 running PolIntOS.
30 +   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2004
31 +   Free Software Foundation, Inc.
32 +   Based on i386/linux.h
33 +
34 +This file is part of GCC.
35 +
36 +GCC is free software; you can redistribute it and/or modify
37 +it under the terms of the GNU General Public License as published by
38 +the Free Software Foundation; either version 2, or (at your option)
39 +any later version.
40 +
41 +GCC is distributed in the hope that it will be useful,
42 +but WITHOUT ANY WARRANTY; without even the implied warranty of
43 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
44 +GNU General Public License for more details.
45 +
46 +You should have received a copy of the GNU General Public License
47 +along with GCC; see the file COPYING.  If not, write to
48 +the Free Software Foundation, 51 Franklin Street, Fifth Floor,
49 +Boston, MA 02110-1301, USA.  */
50 +
51 +/* Output at beginning of assembler file.  */
52 +/* The .file command should always begin the output.  */
53 +#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
54 +
55 +#define TARGET_VERSION fprintf (stderr, " (x86 PolIntOS)");
56 +
57 +/* The svr4 ABI for the i386 says that records and unions are returned
58 +   in memory.  */
59 +#undef DEFAULT_PCC_STRUCT_RETURN
60 +#define DEFAULT_PCC_STRUCT_RETURN 1
61 +
62 +/* We arrange for the whole %gs segment to map the tls area.  */
63 +#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
64 +#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
65 +
66 +#undef ASM_COMMENT_START
67 +#define ASM_COMMENT_START "#"
68 +
69 +#define NO_PROFILE_COUNTERS    1
70 +
71 +#undef MCOUNT_NAME
72 +#define MCOUNT_NAME "mcount"
73 +
74 +#define TARGET_OS_CPP_BUILTINS() do { \
75 +       POLINTOS_TARGET_OS_CPP_BUILTINS(); \
76 +       if (flag_pic) { \
77 +               builtin_define("__PIC__"); \
78 +               builtin_define("__pic__"); \
79 +       } \
80 +} while (0)
81 +
82 +#define LINK_EMULATION "elf_i386"
83 +#define DYNAMIC_LINKER "/System/Libraries/DynamicLinker"
84 +
85 +#undef  SUBTARGET_EXTRA_SPECS
86 +#define SUBTARGET_EXTRA_SPECS \
87 +  { "link_emulation", LINK_EMULATION },\
88 +  { "dynamic_linker", DYNAMIC_LINKER }
89 +
90 +#undef  LINK_SPEC
91 +#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
92 +  %{!shared: \
93 +    %{!ibcs: \
94 +      %{!static: \
95 +       %{rdynamic:-export-dynamic} \
96 +       %{!dynamic-linker:-dynamic-linker %(dynamic_linker)}} \
97 +       %{static:-static}}}"
98 +
99 +#define OLD_ENDFILE_SPEC ENDFILE_SPEC
100 +#undef  ENDFILE_SPEC
101 +#define ENDFILE_SPEC \
102 +  "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " OLD_ENDFILE_SPEC
103 +
104 +/* A C statement (sans semicolon) to output to the stdio stream
105 +   FILE the assembler definition of uninitialized global DECL named
106 +   NAME whose size is SIZE bytes and alignment is ALIGN bytes.
107 +   Try to use asm_output_aligned_bss to implement this macro.  */
108 +
109 +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
110 +  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
111 +
112 +/* A C statement to output to the stdio stream FILE an assembler
113 +   command to advance the location counter to a multiple of 1<<LOG
114 +   bytes if it is within MAX_SKIP bytes.
115 +
116 +   This is used to align code labels according to Intel recommendations.  */
117 +
118 +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
119 +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP)                   \
120 +  do {                                                                 \
121 +    if ((LOG) != 0) {                                                  \
122 +      if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
123 +      else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
124 +    }                                                                  \
125 +  } while (0)
126 +#endif
127 +
128 +/* Handle special EH pointer encodings.  Absolute, pc-relative, and
129 +   indirect are handled automatically.  */
130 +#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
131 +  do {                                                                 \
132 +    if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel)                \
133 +      {                                                                        \
134 +        fputs (ASM_LONG, FILE);                        \
135 +        assemble_name (FILE, XSTR (ADDR, 0));                          \
136 +       fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
137 +        goto DONE;                                                     \
138 +      }                                                                        \
139 +  } while (0)
140 +
141 +/* Used by crtstuff.c to initialize the base of data-relative relocations.
142 +   These are GOT relative on x86, so return the pic register.  */
143 +#ifdef __PIC__
144 +#define CRT_GET_RFIB_DATA(BASE)                        \
145 +  {                                            \
146 +    register void *ebx_ __asm__("ebx");                \
147 +    BASE = ebx_;                               \
148 +  }
149 +#else
150 +#define CRT_GET_RFIB_DATA(BASE)                                                \
151 +  __asm__ ("call\t.LPR%=\n"                                            \
152 +          ".LPR%=:\n\t"                                                \
153 +          "popl\t%0\n\t"                                               \
154 +          /* Due to a GAS bug, this cannot use EAX.  That encodes      \
155 +             smaller than the traditional EBX, which results in the    \
156 +             offset being off by one.  */                              \
157 +          "addl\t$_GLOBAL_OFFSET_TABLE_+[.-.LPR%=],%0"                 \
158 +          : "=d"(BASE))
159 +#endif
160 +
161 +#undef NEED_INDICATE_EXEC_STACK
162 +#define NEED_INDICATE_EXEC_STACK 1
163 +
164 +//#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h"
165 +
166 +#define REG_NAME(reg) reg
167 +
168 +#if 0
169 +#ifdef TARGET_LIBC_PROVIDES_SSP
170 +/* i386 glibc provides __stack_chk_guard in %gs:0x14.  */
171 +#define TARGET_THREAD_SSP_OFFSET       0x14
172 +#endif
173 +#endif
174 --- gcc-4.1.0-new//gcc/config/polintos.h.ORIG1  Wed Dec 31 18:00:00 1969
175 +++ gcc-4.1.0-new//gcc/config/polintos.h        Sat Apr  8 18:48:55 2006
176 @@ -0,0 +1,90 @@
177 +/* Target definitions for PolIntOS
178 +   Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999,
179 +   2000, 2001 Free Software Foundation, Inc.
180 +   Based on linux.h
181 +
182 +This file is part of GCC.
183 +
184 +GCC is free software; you can redistribute it and/or modify
185 +it under the terms of the GNU General Public License as published by
186 +the Free Software Foundation; either version 2, or (at your option)
187 +any later version.
188 +
189 +GCC is distributed in the hope that it will be useful,
190 +but WITHOUT ANY WARRANTY; without even the implied warranty of
191 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
192 +GNU General Public License for more details.
193 +
194 +You should have received a copy of the GNU General Public License
195 +along with GCC; see the file COPYING.  If not, write to
196 +the Free Software Foundation, 51 Franklin Street, Fifth Floor,
197 +Boston, MA 02110-1301, USA. */
198 +
199 +/* Don't assume anything about the header files.  */
200 +#define NO_IMPLICIT_EXTERN_C
201 +
202 +#undef ASM_APP_ON
203 +#define ASM_APP_ON "#APP\n"
204 +
205 +#undef ASM_APP_OFF
206 +#define ASM_APP_OFF "#NO_APP\n"
207 +
208 +// These (or something like it) will be used soon, but not yet.
209 +
210 +#if 0
211 +/* Provide a STARTFILE_SPEC appropriate for PolIntOS.  Here we add
212 +   the magical crtbegin.o file (see crtstuff.c) which provides part of
213 +   the support for getting C++ file-scope static object constructed
214 +   before entering `main'.  */
215 +
216 +#if defined HAVE_LD_PIE
217 +#define STARTFILE_SPEC \
218 +  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
219 +   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
220 +#else
221 +#define STARTFILE_SPEC \
222 +  "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
223 +   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
224 +#endif
225 +
226 +/* Provide a ENDFILE_SPEC appropriate for PolIntOS.  Here we tack on the
227 +   magical crtend.o file (see crtstuff.c) which provides part of the
228 +   support for getting C++ file-scope static object constructed before
229 +   entering `main', followed by a normal "finalizer" file, `crtn.o'.  */
230 +
231 +#undef ENDFILE_SPEC
232 +#define ENDFILE_SPEC \
233 +  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
234 +#endif
235 +
236 +/* This is for -profile to use -lc_p instead of -lc.  */
237 +#ifndef CC1_SPEC
238 +#define CC1_SPEC "%{profile:-p}"
239 +#endif
240 +
241 +#undef  LIB_SPEC
242 +#define LIB_SPEC \
243 +  "%{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
244 +
245 +#if defined(HAVE_LD_EH_FRAME_HDR)
246 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
247 +#endif
248 +
249 +#define HANDLE_PRAGMA_PACK_PUSH_POP
250 +
251 +#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
252 +
253 +/* Use --as-needed -lgcc_s for eh support.  */
254 +#ifdef HAVE_LD_AS_NEEDED
255 +#define USE_LD_AS_NEEDED 1
256 +#endif
257 +
258 +#define POLINTOS_TARGET_OS_CPP_BUILTINS() do { \
259 +       builtin_define_std ("polintos"); \
260 +} while (0)
261 +
262 +/* Determine whether the entire c99 runtime
263 +   is present in the runtime library.  */
264 +#define TARGET_C99_FUNCTIONS 1
265 +
266 +#define TARGET_POSIX_IO
267 --- gcc-4.1.0-new//gcc/config.gcc.ORIG2 Sat Apr  8 19:14:47 2006
268 +++ gcc-4.1.0-new//gcc/config.gcc       Sat Apr  8 19:14:55 2006
269 @@ -1275,6 +1275,10 @@
270         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h kaos.h i386/kaos-i386.h"
271         tmake_file="i386/t-i386elf t-svr4"
272         ;;
273 +i[567]86-*-polintos*)
274 +       tm_file="${tm_file} i386/unix.h i386/att.h elfos.h polintos.h i386/polintos.h"
275 +       tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtfm"
276 +       ;;
277  ia64*-*-elf*)
278         tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/elf.h"
279         tmake_file="ia64/t-ia64"