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
5 # Note: order is significant - the case branches are not exclusive.
7 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
9 + echo ${UNAME_MACHINE}-polintos
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
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.
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
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
34 +This file is part of GCC.
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)
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.
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. */
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
55 +#define TARGET_VERSION fprintf (stderr, " (x86 PolIntOS)");
57 +/* The svr4 ABI for the i386 says that records and unions are returned
59 +#undef DEFAULT_PCC_STRUCT_RETURN
60 +#define DEFAULT_PCC_STRUCT_RETURN 1
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
66 +#undef ASM_COMMENT_START
67 +#define ASM_COMMENT_START "#"
69 +#define NO_PROFILE_COUNTERS 1
72 +#define MCOUNT_NAME "mcount"
74 +#define TARGET_OS_CPP_BUILTINS() do { \
75 + POLINTOS_TARGET_OS_CPP_BUILTINS(); \
77 + builtin_define("__PIC__"); \
78 + builtin_define("__pic__"); \
82 +#define LINK_EMULATION "elf_i386"
83 +#define DYNAMIC_LINKER "/System/Libraries/DynamicLinker"
85 +#undef SUBTARGET_EXTRA_SPECS
86 +#define SUBTARGET_EXTRA_SPECS \
87 + { "link_emulation", LINK_EMULATION },\
88 + { "dynamic_linker", DYNAMIC_LINKER }
91 +#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
95 + %{rdynamic:-export-dynamic} \
96 + %{!dynamic-linker:-dynamic-linker %(dynamic_linker)}} \
97 + %{static:-static}}}"
99 +#define OLD_ENDFILE_SPEC ENDFILE_SPEC
101 +#define ENDFILE_SPEC \
102 + "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " OLD_ENDFILE_SPEC
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. */
109 +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
110 + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
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.
116 + This is used to align code labels according to Intel recommendations. */
118 +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
119 +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
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)); \
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) \
132 + if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
134 + fputs (ASM_LONG, FILE); \
135 + assemble_name (FILE, XSTR (ADDR, 0)); \
136 + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
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. */
144 +#define CRT_GET_RFIB_DATA(BASE) \
146 + register void *ebx_ __asm__("ebx"); \
150 +#define CRT_GET_RFIB_DATA(BASE) \
151 + __asm__ ("call\t.LPR%=\n" \
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" \
161 +#undef NEED_INDICATE_EXEC_STACK
162 +#define NEED_INDICATE_EXEC_STACK 1
164 +//#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h"
166 +#define REG_NAME(reg) reg
169 +#ifdef TARGET_LIBC_PROVIDES_SSP
170 +/* i386 glibc provides __stack_chk_guard in %gs:0x14. */
171 +#define TARGET_THREAD_SSP_OFFSET 0x14
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
177 +/* Target definitions for PolIntOS
178 + Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999,
179 + 2000, 2001 Free Software Foundation, Inc.
182 +This file is part of GCC.
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)
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.
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. */
199 +/* Don't assume anything about the header files. */
200 +#define NO_IMPLICIT_EXTERN_C
203 +#define ASM_APP_ON "#APP\n"
206 +#define ASM_APP_OFF "#NO_APP\n"
208 +// These (or something like it) will be used soon, but not yet.
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'. */
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}"
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}"
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'. */
232 +#define ENDFILE_SPEC \
233 + "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
236 +/* This is for -profile to use -lc_p instead of -lc. */
238 +#define CC1_SPEC "%{profile:-p}"
243 + "%{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
245 +#if defined(HAVE_LD_EH_FRAME_HDR)
246 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
249 +#define HANDLE_PRAGMA_PACK_PUSH_POP
251 +#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
253 +/* Use --as-needed -lgcc_s for eh support. */
254 +#ifdef HAVE_LD_AS_NEEDED
255 +#define USE_LD_AS_NEEDED 1
258 +#define POLINTOS_TARGET_OS_CPP_BUILTINS() do { \
259 + builtin_define_std ("polintos"); \
262 +/* Determine whether the entire c99 runtime
263 + is present in the runtime library. */
264 +#define TARGET_C99_FUNCTIONS 1
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"
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"
278 tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/elf.h"
279 tmake_file="ia64/t-ia64"