--- /dev/null
+diff -urN gcc-4.1.0/config.guess gcc-4.1.0-new/config.guess
+--- gcc-4.1.0/config.guess Thu Nov 24 06:49:42 2005
++++ gcc-4.1.0-new/config.guess Fri Apr 7 18:04:43 2006
+@@ -141,6 +141,9 @@
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
++ *:PolIntOS:*:*)
++ echo ${UNAME_MACHINE}-polintos
++ exit 0 ;;
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+diff -urN gcc-4.1.0/config.sub gcc-4.1.0-new/config.sub
+--- gcc-4.1.0/config.sub Fri Dec 16 06:57:40 2005
++++ gcc-4.1.0-new/config.sub Fri Apr 7 18:05:30 2006
+@@ -1202,7 +1202,7 @@
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+- | -skyos* | -haiku*)
++ | -skyos* | -haiku* | -polintos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+--- gcc-4.1.0-new//gcc/config/i386/polintos.h.ORIG1 Wed Dec 31 18:00:00 1969
++++ gcc-4.1.0-new//gcc/config/i386/polintos.h Sat Apr 8 19:04:55 2006
+@@ -0,0 +1,145 @@
++/* Definitions for Intel x86 running PolIntOS.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2004
++ Free Software Foundation, Inc.
++ Based on i386/linux.h
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2, or (at your option)
++any later version.
++
++GCC is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING. If not, write to
++the Free Software Foundation, 51 Franklin Street, Fifth Floor,
++Boston, MA 02110-1301, USA. */
++
++/* Output at beginning of assembler file. */
++/* The .file command should always begin the output. */
++#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
++
++#define TARGET_VERSION fprintf (stderr, " (x86 PolIntOS)");
++
++/* The svr4 ABI for the i386 says that records and unions are returned
++ in memory. */
++#undef DEFAULT_PCC_STRUCT_RETURN
++#define DEFAULT_PCC_STRUCT_RETURN 1
++
++/* We arrange for the whole %gs segment to map the tls area. */
++#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
++#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
++
++#undef ASM_COMMENT_START
++#define ASM_COMMENT_START "#"
++
++#define NO_PROFILE_COUNTERS 1
++
++#undef MCOUNT_NAME
++#define MCOUNT_NAME "mcount"
++
++#define TARGET_OS_CPP_BUILTINS() do { \
++ POLINTOS_TARGET_OS_CPP_BUILTINS(); \
++ if (flag_pic) { \
++ builtin_define("__PIC__"); \
++ builtin_define("__pic__"); \
++ } \
++} while (0)
++
++#define LINK_EMULATION "elf_i386"
++#define DYNAMIC_LINKER "/System/Libraries/DynamicLinker"
++
++#undef SUBTARGET_EXTRA_SPECS
++#define SUBTARGET_EXTRA_SPECS \
++ { "link_emulation", LINK_EMULATION },\
++ { "dynamic_linker", DYNAMIC_LINKER }
++
++#undef LINK_SPEC
++#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
++ %{!shared: \
++ %{!ibcs: \
++ %{!static: \
++ %{rdynamic:-export-dynamic} \
++ %{!dynamic-linker:-dynamic-linker %(dynamic_linker)}} \
++ %{static:-static}}}"
++
++#define OLD_ENDFILE_SPEC ENDFILE_SPEC
++#undef ENDFILE_SPEC
++#define ENDFILE_SPEC \
++ "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " OLD_ENDFILE_SPEC
++
++/* A C statement (sans semicolon) to output to the stdio stream
++ FILE the assembler definition of uninitialized global DECL named
++ NAME whose size is SIZE bytes and alignment is ALIGN bytes.
++ Try to use asm_output_aligned_bss to implement this macro. */
++
++#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
++ asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
++
++/* A C statement to output to the stdio stream FILE an assembler
++ command to advance the location counter to a multiple of 1<<LOG
++ bytes if it is within MAX_SKIP bytes.
++
++ This is used to align code labels according to Intel recommendations. */
++
++#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
++#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
++ do { \
++ if ((LOG) != 0) { \
++ if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
++ else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
++ } \
++ } while (0)
++#endif
++
++/* Handle special EH pointer encodings. Absolute, pc-relative, and
++ indirect are handled automatically. */
++#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
++ do { \
++ if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
++ { \
++ fputs (ASM_LONG, FILE); \
++ assemble_name (FILE, XSTR (ADDR, 0)); \
++ fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
++ goto DONE; \
++ } \
++ } while (0)
++
++/* Used by crtstuff.c to initialize the base of data-relative relocations.
++ These are GOT relative on x86, so return the pic register. */
++#ifdef __PIC__
++#define CRT_GET_RFIB_DATA(BASE) \
++ { \
++ register void *ebx_ __asm__("ebx"); \
++ BASE = ebx_; \
++ }
++#else
++#define CRT_GET_RFIB_DATA(BASE) \
++ __asm__ ("call\t.LPR%=\n" \
++ ".LPR%=:\n\t" \
++ "popl\t%0\n\t" \
++ /* Due to a GAS bug, this cannot use EAX. That encodes \
++ smaller than the traditional EBX, which results in the \
++ offset being off by one. */ \
++ "addl\t$_GLOBAL_OFFSET_TABLE_+[.-.LPR%=],%0" \
++ : "=d"(BASE))
++#endif
++
++#undef NEED_INDICATE_EXEC_STACK
++#define NEED_INDICATE_EXEC_STACK 1
++
++//#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h"
++
++#define REG_NAME(reg) reg
++
++#if 0
++#ifdef TARGET_LIBC_PROVIDES_SSP
++/* i386 glibc provides __stack_chk_guard in %gs:0x14. */
++#define TARGET_THREAD_SSP_OFFSET 0x14
++#endif
++#endif
+--- gcc-4.1.0-new//gcc/config/polintos.h.ORIG1 Wed Dec 31 18:00:00 1969
++++ gcc-4.1.0-new//gcc/config/polintos.h Sat Apr 8 18:48:55 2006
+@@ -0,0 +1,90 @@
++/* Target definitions for PolIntOS
++ Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999,
++ 2000, 2001 Free Software Foundation, Inc.
++ Based on linux.h
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2, or (at your option)
++any later version.
++
++GCC is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING. If not, write to
++the Free Software Foundation, 51 Franklin Street, Fifth Floor,
++Boston, MA 02110-1301, USA. */
++
++/* Don't assume anything about the header files. */
++#define NO_IMPLICIT_EXTERN_C
++
++#undef ASM_APP_ON
++#define ASM_APP_ON "#APP\n"
++
++#undef ASM_APP_OFF
++#define ASM_APP_OFF "#NO_APP\n"
++
++// These (or something like it) will be used soon, but not yet.
++
++#if 0
++/* Provide a STARTFILE_SPEC appropriate for PolIntOS. Here we add
++ the magical crtbegin.o file (see crtstuff.c) which provides part of
++ the support for getting C++ file-scope static object constructed
++ before entering `main'. */
++
++#if defined HAVE_LD_PIE
++#define STARTFILE_SPEC \
++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
++ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++#else
++#define STARTFILE_SPEC \
++ "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
++ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++#endif
++
++/* Provide a ENDFILE_SPEC appropriate for PolIntOS. Here we tack on the
++ magical crtend.o file (see crtstuff.c) which provides part of the
++ support for getting C++ file-scope static object constructed before
++ entering `main', followed by a normal "finalizer" file, `crtn.o'. */
++
++#undef ENDFILE_SPEC
++#define ENDFILE_SPEC \
++ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
++#endif
++
++/* This is for -profile to use -lc_p instead of -lc. */
++#ifndef CC1_SPEC
++#define CC1_SPEC "%{profile:-p}"
++#endif
++
++#undef LIB_SPEC
++#define LIB_SPEC \
++ "%{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
++
++#if defined(HAVE_LD_EH_FRAME_HDR)
++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
++#endif
++
++#define HANDLE_PRAGMA_PACK_PUSH_POP
++
++#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
++
++/* Use --as-needed -lgcc_s for eh support. */
++#ifdef HAVE_LD_AS_NEEDED
++#define USE_LD_AS_NEEDED 1
++#endif
++
++#define POLINTOS_TARGET_OS_CPP_BUILTINS() do { \
++ builtin_define_std ("polintos"); \
++} while (0)
++
++/* Determine whether the entire c99 runtime
++ is present in the runtime library. */
++#define TARGET_C99_FUNCTIONS 1
++
++#define TARGET_POSIX_IO
+--- gcc-4.1.0-new//gcc/config.gcc.ORIG2 Sat Apr 8 19:14:47 2006
++++ gcc-4.1.0-new//gcc/config.gcc Sat Apr 8 19:14:55 2006
+@@ -1275,6 +1275,10 @@
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h kaos.h i386/kaos-i386.h"
+ tmake_file="i386/t-i386elf t-svr4"
+ ;;
++i[567]86-*-polintos*)
++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h polintos.h i386/polintos.h"
++ tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtfm"
++ ;;
+ ia64*-*-elf*)
+ tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/elf.h"
+ tmake_file="ia64/t-ia64"