aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <rhill@gentoo.org>2010-08-07 06:25:11 +0000
committerRyan Hill <rhill@gentoo.org>2010-08-07 06:25:11 +0000
commite43e73e51027df5a878613e84835cf0b8041c4ef (patch)
treecd0f8af1d6aa37edc015896f6e6ee047d4693ec6 /4.5.1/gentoo
parentAdd patches for bug #327191. (diff)
downloadgcc-patches-e43e73e51027df5a878613e84835cf0b8041c4ef.tar.gz
gcc-patches-e43e73e51027df5a878613e84835cf0b8041c4ef.tar.bz2
gcc-patches-e43e73e51027df5a878613e84835cf0b8041c4ef.zip
Initial 4.5.1 patchset based on last 4.5.0 patchset.
Diffstat (limited to '4.5.1/gentoo')
-rw-r--r--4.5.1/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch31
-rw-r--r--4.5.1/gentoo/01_all_gcc-4.1-alpha-asm-mcpu.patch16
-rw-r--r--4.5.1/gentoo/03_all_gcc43-java-nomulti.patch44
-rw-r--r--4.5.1/gentoo/08_all_gcc-4.1-cross-compile.patch40
-rw-r--r--4.5.1/gentoo/10_all_gcc-default-format-security.patch50
-rw-r--r--4.5.1/gentoo/10_all_gcc-default-fortify-source.patch28
-rw-r--r--4.5.1/gentoo/11_all_gcc-netbsd-symbolic.patch12
-rw-r--r--4.5.1/gentoo/14_all_gcc-sparc64-bsd.patch28
-rw-r--r--4.5.1/gentoo/15_all_gcc-libgomp-no-werror.patch16
-rw-r--r--4.5.1/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch18
-rw-r--r--4.5.1/gentoo/47_all_arm-unbreak-armv4t.patch15
-rw-r--r--4.5.1/gentoo/51_all_gcc-3.4-libiberty-pic.patch10
-rw-r--r--4.5.1/gentoo/53_all_gcc4-superh-default-multilib.patch23
-rw-r--r--4.5.1/gentoo/61_all_gcc4-ia64-noteGNUstack.patch88
-rw-r--r--4.5.1/gentoo/74_all_sh-pr24836.patch25
-rw-r--r--4.5.1/gentoo/91_all_gcc-fbsdshared-spec.patch16
-rw-r--r--4.5.1/gentoo/93_all_gcc-4.5-cloog-dl.patch470
-rw-r--r--4.5.1/gentoo/94_all_gcc-4.5-pch-nostdinc.patch28
-rw-r--r--4.5.1/gentoo/README.history20
19 files changed, 978 insertions, 0 deletions
diff --git a/4.5.1/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch b/4.5.1/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch
new file mode 100644
index 0000000..b6932d4
--- /dev/null
+++ b/4.5.1/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch
@@ -0,0 +1,31 @@
+Set the default behavior on alpha to use -mieee since the large majority of
+time we want this (bad/weird things can happen with packages built without
+-mieee).
+
+To satisfy those people who may not want -mieee forced on them all the time,
+we also provide -mno-ieee.
+
+Patch by Mike Frysinger <vapier@gentoo.org>
+
+--- gcc-4.3.0/gcc/config/alpha/alpha.h
++++ gcc-4.3.0/gcc/config/alpha/alpha.h
+@@ -95,6 +95,8 @@
+ while (0)
+ #endif
+
++#define CPP_SPEC "%{!no-ieee:-mieee}"
++
+ #define WORD_SWITCH_TAKES_ARG(STR) \
+ (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR))
+
+--- gcc-4.3.0/gcc/config/alpha/alpha.opt
++++ gcc-4.3.0/gcc/config/alpha/alpha.opt
+@@ -39,7 +39,7 @@
+ Request IEEE-conformant math library routines (OSF/1)
+
+ mieee
+-Target Report RejectNegative Mask(IEEE)
++Target Report Mask(IEEE)
+ Emit IEEE-conformant code, without inexact exceptions
+
+ mieee-with-inexact
diff --git a/4.5.1/gentoo/01_all_gcc-4.1-alpha-asm-mcpu.patch b/4.5.1/gentoo/01_all_gcc-4.1-alpha-asm-mcpu.patch
new file mode 100644
index 0000000..034ddc2
--- /dev/null
+++ b/4.5.1/gentoo/01_all_gcc-4.1-alpha-asm-mcpu.patch
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/170146
+http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00403.html
+
+alpha: turn -mcpu=<cpu> into -m<cpu> for assembler all the time
+
+--- gcc-x/gcc/config/alpha/elf.h
++++ gcc-x/gcc/config/alpha/elf.h
+@@ -46,7 +46,7 @@
+ #define CC1_SPEC "%{G*}"
+
+ #undef ASM_SPEC
+-#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}"
++#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug} %{mcpu=*:-m%*}"
+
+ #undef IDENT_ASM_OP
+ #define IDENT_ASM_OP "\t.ident\t"
diff --git a/4.5.1/gentoo/03_all_gcc43-java-nomulti.patch b/4.5.1/gentoo/03_all_gcc43-java-nomulti.patch
new file mode 100644
index 0000000..f07ead8
--- /dev/null
+++ b/4.5.1/gentoo/03_all_gcc43-java-nomulti.patch
@@ -0,0 +1,44 @@
+--- libjava/configure.ac.jj 2007-12-07 17:55:50.000000000 +0100
++++ libjava/configure.ac 2007-12-07 18:36:56.000000000 +0100
+@@ -82,6 +82,13 @@ AC_ARG_ENABLE(java-maintainer-mode,
+ [allow rebuilding of .class and .h files]))
+ AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
+
++AC_ARG_ENABLE(libjava-multilib,
++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
++if test "$enable_libjava_multilib" = no; then
++ multilib=no
++ ac_configure_args="$ac_configure_args --disable-multilib"
++fi
++
+ # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
+ GCC_NO_EXECUTABLES
+
+--- libjava/configure.jj 2007-12-07 17:55:50.000000000 +0100
++++ libjava/configure 2007-12-07 18:39:58.000000000 +0100
+@@ -1018,6 +1018,8 @@ Optional Features:
+ --enable-gconf-peer compile GConf native peers for util.preferences
+ --enable-java-maintainer-mode
+ allow rebuilding of .class and .h files
++ --enable-libjava-multilib
++ build libjava as multilib
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+@@ -1848,6 +1850,16 @@ else
+ fi
+
+
++# Check whether --enable-libjava-multilib was given.
++if test "${enable_libjava_multilib+set}" = set; then
++ enableval=$enable_libjava_multilib;
++fi
++
++if test "$enable_libjava_multilib" = no; then
++ multilib=no
++ ac_configure_args="$ac_configure_args --disable-multilib"
++fi
++
+ # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
+
+
diff --git a/4.5.1/gentoo/08_all_gcc-4.1-cross-compile.patch b/4.5.1/gentoo/08_all_gcc-4.1-cross-compile.patch
new file mode 100644
index 0000000..523caa4
--- /dev/null
+++ b/4.5.1/gentoo/08_all_gcc-4.1-cross-compile.patch
@@ -0,0 +1,40 @@
+Some notes on the 'bootstrap with or without libc headers' debate:
+http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html
+http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html
+
+--- gcc/unwind-dw2.c
++++ gcc/unwind-dw2.c
+@@ -253,9 +253,11 @@
+ }
+ #endif
+
++#ifndef inhibit_libc
+ #ifdef MD_UNWIND_SUPPORT
+ #include MD_UNWIND_SUPPORT
+ #endif
++#endif
+
+ /* Extract any interesting information from the CIE for the translation
+ unit F belongs to. Return a pointer to the byte after the augmentation,
+--- gcc/configure
++++ gcc/configure
+@@ -12857,7 +12857,7 @@ then
+ | powerpc*-*-*,powerpc64*-*-*)
+ CROSS="$CROSS -DNATIVE_CROSS" ;;
+ esac
+-elif test "x$TARGET_SYSTEM_ROOT" != x; then
++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
+ SYSTEM_HEADER_DIR=$build_system_header_dir
+ fi
+
+--- gcc/configure.ac
++++ gcc/configure.ac
+@@ -1717,7 +1717,7 @@ then
+ | powerpc*-*-*,powerpc64*-*-*)
+ CROSS="$CROSS -DNATIVE_CROSS" ;;
+ esac
+-elif test "x$TARGET_SYSTEM_ROOT" != x; then
++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
+ SYSTEM_HEADER_DIR=$build_system_header_dir
+ fi
+
diff --git a/4.5.1/gentoo/10_all_gcc-default-format-security.patch b/4.5.1/gentoo/10_all_gcc-default-format-security.patch
new file mode 100644
index 0000000..8631396
--- /dev/null
+++ b/4.5.1/gentoo/10_all_gcc-default-format-security.patch
@@ -0,0 +1,50 @@
+ripped from Debian
+
+# DP: Turn on -Wformat -Wformat-security by default for C, C++, ObjC, ObjC++.
+
+--- gcc/c-common.c
++++ gcc/c-common.c
+@@ -277,7 +277,7 @@
+ /* Warn about format/argument anomalies in calls to formatted I/O functions
+ (*printf, *scanf, strftime, strfmon, etc.). */
+
+-int warn_format;
++int warn_format = 1;
+
+ /* Warn about using __null (as NULL in C++) as sentinel. For code compiled
+ with GCC this doesn't matter as __null is guaranteed to have the right
+--- gcc/c.opt
++++ gcc/c.opt
+@@ -228,7 +228,7 @@
+ Warn about format strings that contain NUL bytes
+
+ Wformat-security
+-C ObjC C++ ObjC++ Var(warn_format_security) Warning
++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning
+ Warn about possible security problems with format functions
+
+ Wformat-y2k
+--- gcc/doc/invoke.texi
++++ gcc/doc/invoke.texi
+@@ -2802,6 +2802,9 @@
+ @option{-Wformat-nonliteral}, @option{-Wformat-security}, and
+ @option{-Wformat=2} are available, but are not included in @option{-Wall}.
+
++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
++To disable, use @option{-Wformat=0}.
++
+ @item -Wformat-y2k
+ @opindex Wformat-y2k
+ @opindex Wno-format-y2k
+@@ -2849,6 +2852,11 @@
+ in future warnings may be added to @option{-Wformat-security} that are not
+ included in @option{-Wformat-nonliteral}.)
+
++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
++To disable, use @option{-Wno-format-security}, or disable all format warnings
++with @option{-Wformat=0}. To make format security warnings fatal, specify
++@option{-Werror=format-security}.
++
+ @item -Wformat=2
+ @opindex Wformat=2
+ @opindex Wno-format=2
diff --git a/4.5.1/gentoo/10_all_gcc-default-fortify-source.patch b/4.5.1/gentoo/10_all_gcc-default-fortify-source.patch
new file mode 100644
index 0000000..e5d8b6e
--- /dev/null
+++ b/4.5.1/gentoo/10_all_gcc-default-fortify-source.patch
@@ -0,0 +1,28 @@
+ripped from Debian
+
+# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++.
+
+--- gcc/doc/invoke.texi
++++ gcc/doc/invoke.texi
+@@ -5204,6 +5204,11 @@
+ Please note the warning under @option{-fgcse} about
+ invoking @option{-O2} on programs that use computed gotos.
+
++NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is
++activated when @option{-O} is set to 2 or higher. This enables additional
++compile-time and run-time checks for several libc functions. To disable,
++specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}.
++
+ @item -O3
+ @opindex O3
+ Optimize yet more. @option{-O3} turns on all optimizations specified by
+--- gcc/gcc.c
++++ gcc/gcc.c
+@@ -802,6 +802,7 @@
+ %{H} %C %{D*&U*&A*} %{i*} %Z %i\
+ %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
+ %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
++ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\
+ %{E|M|MM:%W{o*}}";
+
+ /* This contains cpp options which are common with cc1_options and are passed
diff --git a/4.5.1/gentoo/11_all_gcc-netbsd-symbolic.patch b/4.5.1/gentoo/11_all_gcc-netbsd-symbolic.patch
new file mode 100644
index 0000000..3b86491
--- /dev/null
+++ b/4.5.1/gentoo/11_all_gcc-netbsd-symbolic.patch
@@ -0,0 +1,12 @@
+http://bugs.gentoo.org/122698
+
+--- gcc/config/netbsd-elf.h
++++ gcc/config/netbsd-elf.h
+@@ -83,6 +83,7 @@
+ #define NETBSD_LINK_SPEC_ELF \
+ "%{assert*} %{R*} %{rpath*} \
+ %{shared:-shared} \
++ %{symbolic:-Bsymbolic} \
+ %{!shared: \
+ -dc -dp \
+ %{!nostdlib: \
diff --git a/4.5.1/gentoo/14_all_gcc-sparc64-bsd.patch b/4.5.1/gentoo/14_all_gcc-sparc64-bsd.patch
new file mode 100644
index 0000000..cdce9da
--- /dev/null
+++ b/4.5.1/gentoo/14_all_gcc-sparc64-bsd.patch
@@ -0,0 +1,28 @@
+--- a/gcc/config/sparc/freebsd.h 2006-02-02 19:55:09 +0000
++++ b/gcc/config/sparc/freebsd.h 2007-09-06 23:55:21 +0100
+@@ -26,9 +26,22 @@
+ /* FreeBSD needs the platform name (sparc64) defined.
+ Emacs needs to know if the arch is 64 or 32-bits. */
+
+-#undef CPP_CPU64_DEFAULT_SPEC
+-#define CPP_CPU64_DEFAULT_SPEC \
+- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
++#undef FBSD_TARGET_CPU_CPP_BUILTINS
++#define FBSD_TARGET_CPU_CPP_BUILTINS() \
++ do \
++ { \
++ if (TARGET_ARCH64) \
++ { \
++ builtin_define ("__sparc64__"); \
++ builtin_define ("__sparc_v9__"); \
++ builtin_define ("__sparcv9"); \
++ } \
++ else \
++ builtin_define ("__sparc"); \
++ builtin_define ("__sparc__"); \
++ } \
++ while (0)
++
+
+ #define LINK_SPEC "%(link_arch) \
+ %{!mno-relax:%{!r:-relax}} \
diff --git a/4.5.1/gentoo/15_all_gcc-libgomp-no-werror.patch b/4.5.1/gentoo/15_all_gcc-libgomp-no-werror.patch
new file mode 100644
index 0000000..1c3ec3a
--- /dev/null
+++ b/4.5.1/gentoo/15_all_gcc-libgomp-no-werror.patch
@@ -0,0 +1,16 @@
+libgomp does not respect --disable-werror
+
+http://bugs.gentoo.org/229059
+http://gcc.gnu.org/PR38436
+
+--- gcc-4.3.2/libgomp/configure
++++ gcc-4.3.2/libgomp/configure
+@@ -3297,7 +3297,7 @@
+
+ # Add -Wall -Werror if we are using GCC.
+ if test "x$GCC" = "xyes"; then
+- XCFLAGS="$XCFLAGS -Wall -Werror"
++ XCFLAGS="$XCFLAGS -Wall"
+ fi
+
+ # Find other programs we need.
diff --git a/4.5.1/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch b/4.5.1/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch
new file mode 100644
index 0000000..34450b4
--- /dev/null
+++ b/4.5.1/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch
@@ -0,0 +1,18 @@
+2008-07-25 Magnus Granberg <zorry@ume.nu>
+
+ * include/libiberty.h (asprintf): Don't declare if defined as a macro
+
+--- include/libiberty.h.zorry
++++ include/libiberty.h
+@@ -554,8 +554,11 @@
+ /* Like sprintf but provides a pointer to malloc'd storage, which must
+ be freed by the caller. */
+
++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
++#ifndef asprintf
+ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
+ #endif
++#endif
+
+ #if !HAVE_DECL_VASPRINTF
+ /* Like vsprintf but provides a pointer to malloc'd storage, which
diff --git a/4.5.1/gentoo/47_all_arm-unbreak-armv4t.patch b/4.5.1/gentoo/47_all_arm-unbreak-armv4t.patch
new file mode 100644
index 0000000..123c751
--- /dev/null
+++ b/4.5.1/gentoo/47_all_arm-unbreak-armv4t.patch
@@ -0,0 +1,15 @@
+http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
+
+gcc defaults to armv5t for all targets even armv4t
+
+--- gcc/config/arm/linux-eabi.h
++++ gcc/config/arm/linux-eabi.h
+@@ -45,7 +45,7 @@
+ The ARM10TDMI core is the default for armv5t, so set
+ SUBTARGET_CPU_DEFAULT to achieve this. */
+ #undef SUBTARGET_CPU_DEFAULT
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ /* TARGET_BIG_ENDIAN_DEFAULT is set in
+ config.gcc for big endian configurations. */
diff --git a/4.5.1/gentoo/51_all_gcc-3.4-libiberty-pic.patch b/4.5.1/gentoo/51_all_gcc-3.4-libiberty-pic.patch
new file mode 100644
index 0000000..d9a95a2
--- /dev/null
+++ b/4.5.1/gentoo/51_all_gcc-3.4-libiberty-pic.patch
@@ -0,0 +1,10 @@
+--- gcc-4.1.0-orig/libiberty/Makefile.in 2006-03-01 15:49:14.000000000 -0500
++++ gcc-4.1.0/libiberty/Makefile.in 2006-03-01 18:10:46.000000000 -0500
+@@ -232,6 +232,7 @@
+ $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
+ $(RANLIB) $(TARGETLIB); \
++ cp $(TARGETLIB) ../ ; \
+ cd ..; \
+ else true; fi
+
diff --git a/4.5.1/gentoo/53_all_gcc4-superh-default-multilib.patch b/4.5.1/gentoo/53_all_gcc4-superh-default-multilib.patch
new file mode 100644
index 0000000..0ad8ed9
--- /dev/null
+++ b/4.5.1/gentoo/53_all_gcc4-superh-default-multilib.patch
@@ -0,0 +1,23 @@
+The gcc-3.x toolchains would contain all the targets by default. With gcc-4,
+you have to actually list out the multilibs you want or you will end up with
+just one when using targets like 'sh4-linux-gnu'.
+
+The resulting toolchain can't even build a kernel as the kernel needs to build
+with the nofpu flag to be sure that no fpu ops are generated.
+
+Here we restore the gcc-3.x behavior; the additional overhead of building all
+of these multilibs by default is negligible.
+
+http://bugs.gentoo.org/140205
+
+--- gcc-4.2.0/gcc/config.gcc
++++ gcc-4.2.0/gcc/config.gcc
+@@ -2092,7 +2092,7 @@
+ if test x${sh_multilibs} = x ; then
+ case ${target} in
+ sh64-superh-linux* | \
+- sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
++ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;;
+ sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
+ sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
+ sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
diff --git a/4.5.1/gentoo/61_all_gcc4-ia64-noteGNUstack.patch b/4.5.1/gentoo/61_all_gcc4-ia64-noteGNUstack.patch
new file mode 100644
index 0000000..17cc7ef
--- /dev/null
+++ b/4.5.1/gentoo/61_all_gcc4-ia64-noteGNUstack.patch
@@ -0,0 +1,88 @@
+2004-09-20 Jakub Jelinek <jakub@redhat.com>
+
+ * config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
+ on ppc64-linux.
+
+ * config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
+ ia64-linux.
+ * config/ia64/crtbegin.asm: Likewise.
+ * config/ia64/crtend.asm: Likewise.
+ * config/ia64/crti.asm: Likewise.
+ * config/ia64/crtn.asm: Likewise.
+
+2004-05-14 Jakub Jelinek <jakub@redhat.com>
+
+ * config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
+
+--- gcc/config/ia64/linux.h.jj 2004-05-14 07:21:27.000000000 -0400
++++ gcc/config/ia64/linux.h 2004-05-14 09:21:09.000000000 -0400
+@@ -5,6 +5,8 @@
+
+ #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
+
++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
++
+ /* This is for -profile to use -lc_p instead of -lc. */
+ #undef CC1_SPEC
+ #define CC1_SPEC "%{profile:-p} %{G*}"
+--- gcc/config/rs6000/ppc-asm.h.jj 2003-06-04 18:40:59.000000000 +0200
++++ gcc/config/rs6000/ppc-asm.h 2004-09-20 14:17:47.259396058 +0200
+@@ -158,7 +158,7 @@ GLUE(.L,name): \
+ .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
+ #endif
+
+-#if defined __linux__ && !defined __powerpc64__
++#if defined __linux__
+ .section .note.GNU-stack
+ .previous
+ #endif
+--- gcc/config/ia64/lib1funcs.asm.jj 2003-10-27 11:45:17.000000000 +0100
++++ gcc/config/ia64/lib1funcs.asm 2004-09-20 14:26:28.094132706 +0200
+@@ -741,3 +741,7 @@ __floattitf:
+ .endp __floattitf
+
+ #endif
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- gcc/config/ia64/crtend.asm.jj 2004-05-20 14:36:14.000000000 +0200
++++ gcc/config/ia64/crtend.asm 2004-09-20 14:25:57.329580329 +0200
+@@ -113,3 +113,7 @@ __do_global_ctors_aux:
+
+ br.ret.sptk.many rp
+ .endp __do_global_ctors_aux
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- gcc/config/ia64/crti.asm.jj 2003-04-02 17:14:15.000000000 +0200
++++ gcc/config/ia64/crti.asm 2004-09-20 14:26:06.852894092 +0200
+@@ -64,3 +64,7 @@ _fini:
+ .body
+
+ # end of crti.asm
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- gcc/config/ia64/crtbegin.asm.jj 2004-05-20 14:36:14.000000000 +0200
++++ gcc/config/ia64/crtbegin.asm 2004-09-20 14:25:47.105390566 +0200
+@@ -246,3 +246,7 @@ __do_jv_register_classes:
+ .weak __cxa_finalize
+ #endif
+ .weak _Jv_RegisterClasses
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- gcc/config/ia64/crtn.asm.jj 2003-04-02 17:14:15.000000000 +0200
++++ gcc/config/ia64/crtn.asm 2004-09-20 14:26:16.381206878 +0200
+@@ -54,3 +54,7 @@
+ br.ret.sptk.many b0
+
+ # end of crtn.asm
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
diff --git a/4.5.1/gentoo/74_all_sh-pr24836.patch b/4.5.1/gentoo/74_all_sh-pr24836.patch
new file mode 100644
index 0000000..995c21f
--- /dev/null
+++ b/4.5.1/gentoo/74_all_sh-pr24836.patch
@@ -0,0 +1,25 @@
+http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
+http://gcc.gnu.org/PR24836
+
+--- gcc/gcc/configure.ac
++++ gcc/gcc/configure.ac
+@@ -2446,7 +2446,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
+--- gcc/gcc/configure
++++ gcc/gcc/configure
+@@ -14846,7 +14846,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
diff --git a/4.5.1/gentoo/91_all_gcc-fbsdshared-spec.patch b/4.5.1/gentoo/91_all_gcc-fbsdshared-spec.patch
new file mode 100644
index 0000000..02d21db
--- /dev/null
+++ b/4.5.1/gentoo/91_all_gcc-fbsdshared-spec.patch
@@ -0,0 +1,16 @@
+Link shared libs to libc on FreeBSD.
+
+http://bugs.gentoo.org/show_bug.cgi?id=317269
+
+--- gcc/config/freebsd-spec.h
++++ gcc/config/freebsd-spec.h
+@@ -139,7 +139,8 @@
+ %{!shared: \
+ %{!pg: %{pthread:-lpthread} -lc} \
+ %{pg: %{pthread:-lpthread_p} -lc_p} \
+- }"
++ } \
++ %{shared: %{pthread:-lpthread} -lc}"
+ #endif
+ #endif
+
diff --git a/4.5.1/gentoo/93_all_gcc-4.5-cloog-dl.patch b/4.5.1/gentoo/93_all_gcc-4.5-cloog-dl.patch
new file mode 100644
index 0000000..9c87f9b
--- /dev/null
+++ b/4.5.1/gentoo/93_all_gcc-4.5-cloog-dl.patch
@@ -0,0 +1,470 @@
+When graphite support is enabled, C++ libraries (libppl, libcloog, libgmpxx,
+libstdc++-v3) are linked into cc1. Because of libstdc++ symbol versioning
+this has the unfortunate side effect of making it difficult to switch to a
+previous version of GCC using gcc-config once these libraries have be built
+with the newer version. (http://bugs.gentoo.org/315377#c3)
+
+Instead, dlopen libcloog as necessary. This patch originated in Fedora and
+was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
+
+http://cvs.fedoraproject.org/viewvc/devel/gcc/gcc45-cloog-dl.patch
+
+2010-07-01 Jakub Jelinek <jakub@redhat.com>
+
+ * Makefile.in (BACKENDLIBS): Link against -ldl instead of -lcloog -lppl.
+ (graphite.o, graphite%.o): Force -O, remove -fkeep-inline-functions.
+ (graphite-ppl.o): Depend on graphite.h.
+ * graphite.h: Include <dlfcn.h>. Reference libcloog and libppl symbols
+ through pointers in cloog_pointers__ variable.
+ * graphite.c (init_cloog_pointers): New function.
+ (graphite_transform_loops): Call init_cloog_pointers.
+ * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Rename stmt_for
+ argument to stmt_fora.
+ * graphite-ppl.c: Include graphite.h.
+
+2010-07-22 Ryan Hill <dirtyepic@gentoo.org>
+
+ * configure.ac (DL_LIB): Check how to dlopen.
+ * configure: Regenerate.
+ * Makefile.in (BACKENDLIBS): Use DL_LIB.
+
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -1025,7 +1025,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
+ # and the system's installed libraries.
+ LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \
+ $(HOST_LIBS)
+-BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
++BACKENDLIBS = $(GMPLIBS) $(if $(CLOOGLIBS),@DL_LIB@) $(PLUGINLIBS) $(HOST_LIBS) \
+ $(ZLIB) $(LIBELFLIBS)
+ # Any system libraries needed just for GNAT.
+ SYSLIBS = @GNAT_LIBEXC@
+@@ -2633,7 +2633,7 @@ graphite-poly.o: graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(TREE_DATA_REF_H) tree-pass.h domwalk.h graphite.h graphite-dependences.h \
+ pointer-set.h value-prof.h graphite-ppl.h sese.h output.h graphite-poly.h
+ graphite-ppl.o: graphite-ppl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+- $(GGC_H) graphite-ppl.h
++ $(GGC_H) graphite-ppl.h graphite.h
+ graphite-scop-detection.o: graphite-scop-detection.c $(CONFIG_H) $(SYSTEM_H) \
+ $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TOPLEV_H) \
+ $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) \
+@@ -3384,6 +3384,11 @@ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
+ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
+ $(out_file) $(OUTPUT_OPTION)
+
++graphite%.o : \
++ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
++graphite.o : \
++ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
++
+ # Build auxiliary files that support ecoff format.
+ mips-tfile: mips-tfile.o version.o $(LIBDEPS)
+ $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -602,6 +602,7 @@ ac_subst_vars='LTLIBOBJS
+ LIBOBJS
+ enable_plugin
+ pluginlibs
++DL_LIB
+ LIBELFINC
+ LIBELFLIBS
+ CLOOGINC
+@@ -25148,6 +25149,72 @@ $as_echo "#define HAVE_libelf 1" >>confdefs.h
+
+ fi
+
++# Check how to dlopen
++DL_LIB=
++saved_LIBS="$LIBS"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
++$as_echo_n "checking for library containing dlopen... " >&6; }
++if test "${ac_cv_search_dlopen+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char dlopen ();
++int
++main ()
++{
++return dlopen ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' dl; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_search_dlopen=$ac_res
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_dlopen+set}" = set; then :
++ break
++fi
++done
++if test "${ac_cv_search_dlopen+set}" = set; then :
++
++else
++ ac_cv_search_dlopen=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
++$as_echo "$ac_cv_search_dlopen" >&6; }
++ac_res=$ac_cv_search_dlopen
++if test "$ac_res" != no; then :
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++fi
++
++case $ac_cv_search_dlopen in
++ no*) ;;
++ *) DL_LIB=$ac_cv_search_dlopen ;;
++esac
++
++LIBS=$saved_LIBS
++
+ # Check for plugin support
+ # Check whether --enable-plugin was given.
+ if test "${enable_plugin+set}" = set; then :
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -4372,6 +4372,17 @@ if test "x${LIBELFLIBS}" != "x" ; then
+ AC_DEFINE(HAVE_libelf, 1, [Define if libelf is in use.])
+ fi
+
++# Check how to dlopen
++DL_LIB=
++saved_LIBS="$LIBS"
++AC_SEARCH_LIBS([dlopen], [dl])
++case $ac_cv_search_dlopen in
++ no*) ;;
++ *) DL_LIB=$ac_cv_search_dlopen ;;
++esac
++AC_SUBST(DL_LIB)
++LIBS=$saved_LIBS
++
+ # Check for plugin support
+ AC_ARG_ENABLE(plugin,
+ [ --enable-plugin enable plugin support],
+--- a/gcc/graphite-clast-to-gimple.c
++++ b/gcc/graphite-clast-to-gimple.c
+@@ -613,11 +613,11 @@ gcc_type_for_cloog_iv (const char *cloog_iv, gimple_bb_p gbb)
+ STMT. */
+
+ static tree
+-gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_for)
++gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_fora)
+ {
+- struct clast_stmt *stmt = (struct clast_stmt *) stmt_for;
++ struct clast_stmt *stmt = (struct clast_stmt *) stmt_fora;
+ struct clast_user_stmt *body = clast_get_body_of_loop (stmt);
+- const char *cloog_iv = stmt_for->iterator;
++ const char *cloog_iv = stmt_fora->iterator;
+ CloogStatement *cs = body->statement;
+ poly_bb_p pbb = (poly_bb_p) cloog_statement_usr (cs);
+
+--- a/gcc/graphite-ppl.c
++++ b/gcc/graphite-ppl.c
+@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
+ #include "ppl_c.h"
+ #include "cloog/cloog.h"
+ #include "graphite-ppl.h"
++#include "graphite.h"
+
+ /* Translates row ROW of the CloogMatrix MATRIX to a PPL Constraint. */
+
+--- a/gcc/graphite.c
++++ b/gcc/graphite.c
+@@ -67,6 +67,35 @@ along with GCC; see the file COPYING3. If not see
+ #include "graphite-clast-to-gimple.h"
+ #include "graphite-sese-to-poly.h"
+
++__typeof (cloog_pointers__) cloog_pointers__;
++
++static bool
++init_cloog_pointers (void)
++{
++ void *h;
++
++ if (cloog_pointers__.inited)
++ return cloog_pointers__.h != NULL;
++ h = dlopen ("libcloog.so.0", RTLD_LAZY);
++ cloog_pointers__.h = h;
++ if (h == NULL)
++ return false;
++#define DYNSYM(x) \
++ do \
++ { \
++ union { __typeof (cloog_pointers__.p_##x) p; void *q; } u; \
++ u.q = dlsym (h, #x); \
++ if (u.q == NULL) \
++ return false; \
++ cloog_pointers__.p_##x = u.p; \
++ } \
++ while (0)
++ DYNSYMS
++#undef DYNSYM
++ return true;
++}
++
++
+ /* Print global statistics to FILE. */
+
+ static void
+@@ -210,6 +239,12 @@ graphite_initialize (void)
+ return false;
+ }
+
++ if (!init_cloog_pointers ())
++ {
++ sorry ("Graphite loop optimizations cannot be used");
++ return false;
++ }
++
+ recompute_all_dominators ();
+ initialize_original_copy_tables ();
+ cloog_initialize ();
+--- a/gcc/graphite.h
++++ b/gcc/graphite.h
+@@ -21,4 +21,224 @@ along with GCC; see the file COPYING3. If not see
+ #ifndef GCC_GRAPHITE_H
+ #define GCC_GRAPHITE_H
+
++#include <dlfcn.h>
++#define DYNSYMS \
++ DYNSYM (cloog_block_alloc); \
++ DYNSYM (cloog_block_list_free); \
++ DYNSYM (cloog_block_list_malloc); \
++ DYNSYM (cloog_clast_create); \
++ DYNSYM (cloog_clast_free); \
++ DYNSYM (cloog_domain_free); \
++ DYNSYM (cloog_domain_matrix2domain); \
++ DYNSYM (cloog_initialize); \
++ DYNSYM (cloog_loop_malloc); \
++ DYNSYM (cloog_matrix_alloc); \
++ DYNSYM (cloog_matrix_copy); \
++ DYNSYM (cloog_matrix_free); \
++ DYNSYM (cloog_matrix_print); \
++ DYNSYM (cloog_names_malloc); \
++ DYNSYM (cloog_names_scalarize); \
++ DYNSYM (cloog_options_free); \
++ DYNSYM (cloog_options_malloc); \
++ DYNSYM (cloog_program_dump_cloog); \
++ DYNSYM (cloog_program_extract_scalars); \
++ DYNSYM (cloog_program_free); \
++ DYNSYM (cloog_program_generate); \
++ DYNSYM (cloog_program_malloc); \
++ DYNSYM (cloog_program_print); \
++ DYNSYM (cloog_program_scatter); \
++ DYNSYM (cloog_statement_alloc); \
++ DYNSYM (cloog_domain_union); \
++ DYNSYM (cloog_matrix_read); \
++ DYNSYM (cloog_new_pol); \
++ DYNSYM (cloog_vector_gcd); \
++ DYNSYM (ppl_finalize); \
++ DYNSYM (ppl_assign_Coefficient_from_mpz_t); \
++ DYNSYM (ppl_assign_Linear_Expression_from_Linear_Expression); \
++ DYNSYM (ppl_Coefficient_to_mpz_t); \
++ DYNSYM (ppl_Constraint_coefficient); \
++ DYNSYM (ppl_Constraint_inhomogeneous_term); \
++ DYNSYM (ppl_Constraint_space_dimension); \
++ DYNSYM (ppl_Constraint_System_begin); \
++ DYNSYM (ppl_Constraint_System_const_iterator_dereference); \
++ DYNSYM (ppl_Constraint_System_const_iterator_equal_test); \
++ DYNSYM (ppl_Constraint_System_const_iterator_increment); \
++ DYNSYM (ppl_Constraint_System_end); \
++ DYNSYM (ppl_Constraint_System_insert_Constraint); \
++ DYNSYM (ppl_Constraint_System_space_dimension); \
++ DYNSYM (ppl_Constraint_type); \
++ DYNSYM (ppl_delete_Coefficient); \
++ DYNSYM (ppl_delete_Constraint); \
++ DYNSYM (ppl_delete_Constraint_System_const_iterator); \
++ DYNSYM (ppl_delete_Linear_Expression); \
++ DYNSYM (ppl_delete_Pointset_Powerset_C_Polyhedron); \
++ DYNSYM (ppl_delete_Pointset_Powerset_C_Polyhedron_iterator); \
++ DYNSYM (ppl_delete_Polyhedron); \
++ DYNSYM (ppl_Linear_Expression_add_to_coefficient); \
++ DYNSYM (ppl_Linear_Expression_add_to_inhomogeneous); \
++ DYNSYM (ppl_Linear_Expression_coefficient); \
++ DYNSYM (ppl_Linear_Expression_inhomogeneous_term); \
++ DYNSYM (ppl_Linear_Expression_space_dimension); \
++ DYNSYM (ppl_new_Coefficient); \
++ DYNSYM (ppl_new_Coefficient_from_mpz_t); \
++ DYNSYM (ppl_new_Constraint); \
++ DYNSYM (ppl_new_Constraint_System); \
++ DYNSYM (ppl_new_Constraint_System_const_iterator); \
++ DYNSYM (ppl_new_C_Polyhedron_from_C_Polyhedron); \
++ DYNSYM (ppl_new_C_Polyhedron_from_space_dimension); \
++ DYNSYM (ppl_new_C_Polyhedron_recycle_Constraint_System); \
++ DYNSYM (ppl_new_Linear_Expression); \
++ DYNSYM (ppl_new_Linear_Expression_from_Constraint); \
++ DYNSYM (ppl_new_Linear_Expression_from_Linear_Expression); \
++ DYNSYM (ppl_new_Linear_Expression_with_dimension); \
++ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron); \
++ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron); \
++ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension); \
++ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_iterator); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_add_constraint); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_difference_assign); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_intersection_assign); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_is_empty); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_begin); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_end); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_increment); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_maximize); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_minimize); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_size); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_space_dimension); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign); \
++ DYNSYM (ppl_Polyhedron_add_constraint); \
++ DYNSYM (ppl_Polyhedron_add_constraints); \
++ DYNSYM (ppl_Polyhedron_add_space_dimensions_and_embed); \
++ DYNSYM (ppl_Polyhedron_get_constraints); \
++ DYNSYM (ppl_Polyhedron_map_space_dimensions); \
++ DYNSYM (ppl_Polyhedron_remove_space_dimensions); \
++ DYNSYM (ppl_Polyhedron_space_dimension); \
++ DYNSYM (ppl_subtract_Linear_Expression_from_Linear_Expression); \
++ DYNSYM (pprint); \
++ DYNSYM (stmt_block); \
++ DYNSYM (stmt_for); \
++ DYNSYM (stmt_guard); \
++ DYNSYM (stmt_root); \
++ DYNSYM (stmt_user);
++extern struct
++{
++ bool inited;
++ void *h;
++#define DYNSYM(x) __typeof (x) *p_##x
++ DYNSYMS
++#undef DYNSYM
++} cloog_pointers__;
++
++#define cloog_block_alloc (*cloog_pointers__.p_cloog_block_alloc)
++#define cloog_block_list_free (*cloog_pointers__.p_cloog_block_list_free)
++#define cloog_block_list_malloc (*cloog_pointers__.p_cloog_block_list_malloc)
++#define cloog_clast_create (*cloog_pointers__.p_cloog_clast_create)
++#define cloog_clast_free (*cloog_pointers__.p_cloog_clast_free)
++#define cloog_domain_free (*cloog_pointers__.p_cloog_domain_free)
++#define cloog_domain_matrix2domain (*cloog_pointers__.p_cloog_domain_matrix2domain)
++#define cloog_initialize (*cloog_pointers__.p_cloog_initialize)
++#define cloog_loop_malloc (*cloog_pointers__.p_cloog_loop_malloc)
++#define cloog_matrix_alloc (*cloog_pointers__.p_cloog_matrix_alloc)
++#define cloog_matrix_copy (*cloog_pointers__.p_cloog_matrix_copy)
++#define cloog_matrix_free (*cloog_pointers__.p_cloog_matrix_free)
++#define cloog_matrix_print (*cloog_pointers__.p_cloog_matrix_print)
++#define cloog_names_malloc (*cloog_pointers__.p_cloog_names_malloc)
++#define cloog_names_scalarize (*cloog_pointers__.p_cloog_names_scalarize)
++#define cloog_options_free (*cloog_pointers__.p_cloog_options_free)
++#define cloog_options_malloc (*cloog_pointers__.p_cloog_options_malloc)
++#define cloog_program_dump_cloog (*cloog_pointers__.p_cloog_program_dump_cloog)
++#define cloog_program_extract_scalars (*cloog_pointers__.p_cloog_program_extract_scalars)
++#define cloog_program_free (*cloog_pointers__.p_cloog_program_free)
++#define cloog_program_generate (*cloog_pointers__.p_cloog_program_generate)
++#define cloog_program_malloc (*cloog_pointers__.p_cloog_program_malloc)
++#define cloog_program_print (*cloog_pointers__.p_cloog_program_print)
++#define cloog_program_scatter (*cloog_pointers__.p_cloog_program_scatter)
++#define cloog_statement_alloc (*cloog_pointers__.p_cloog_statement_alloc)
++#define cloog_domain_union (*cloog_pointers__.p_cloog_domain_union)
++#define cloog_matrix_read (*cloog_pointers__.p_cloog_matrix_read)
++#define cloog_new_pol (*cloog_pointers__.p_cloog_new_pol)
++#define cloog_vector_gcd (*cloog_pointers__.p_cloog_vector_gcd)
++#define ppl_finalize (*cloog_pointers__.p_ppl_finalize)
++#define ppl_assign_Coefficient_from_mpz_t (*cloog_pointers__.p_ppl_assign_Coefficient_from_mpz_t)
++#define ppl_assign_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_assign_Linear_Expression_from_Linear_Expression)
++#define ppl_Coefficient_to_mpz_t (*cloog_pointers__.p_ppl_Coefficient_to_mpz_t)
++#define ppl_Constraint_coefficient (*cloog_pointers__.p_ppl_Constraint_coefficient)
++#define ppl_Constraint_inhomogeneous_term (*cloog_pointers__.p_ppl_Constraint_inhomogeneous_term)
++#define ppl_Constraint_space_dimension (*cloog_pointers__.p_ppl_Constraint_space_dimension)
++#define ppl_Constraint_System_begin (*cloog_pointers__.p_ppl_Constraint_System_begin)
++#define ppl_Constraint_System_const_iterator_dereference (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_dereference)
++#define ppl_Constraint_System_const_iterator_equal_test (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_equal_test)
++#define ppl_Constraint_System_const_iterator_increment (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_increment)
++#define ppl_Constraint_System_end (*cloog_pointers__.p_ppl_Constraint_System_end)
++#define ppl_Constraint_System_insert_Constraint (*cloog_pointers__.p_ppl_Constraint_System_insert_Constraint)
++#define ppl_Constraint_System_space_dimension (*cloog_pointers__.p_ppl_Constraint_System_space_dimension)
++#define ppl_Constraint_type (*cloog_pointers__.p_ppl_Constraint_type)
++#define ppl_delete_Coefficient (*cloog_pointers__.p_ppl_delete_Coefficient)
++#define ppl_delete_Constraint (*cloog_pointers__.p_ppl_delete_Constraint)
++#define ppl_delete_Constraint_System_const_iterator (*cloog_pointers__.p_ppl_delete_Constraint_System_const_iterator)
++#define ppl_delete_Linear_Expression (*cloog_pointers__.p_ppl_delete_Linear_Expression)
++#define ppl_delete_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_delete_Pointset_Powerset_C_Polyhedron)
++#define ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (*cloog_pointers__.p_ppl_delete_Pointset_Powerset_C_Polyhedron_iterator)
++#define ppl_delete_Polyhedron (*cloog_pointers__.p_ppl_delete_Polyhedron)
++#define ppl_Linear_Expression_add_to_coefficient (*cloog_pointers__.p_ppl_Linear_Expression_add_to_coefficient)
++#define ppl_Linear_Expression_add_to_inhomogeneous (*cloog_pointers__.p_ppl_Linear_Expression_add_to_inhomogeneous)
++#define ppl_Linear_Expression_coefficient (*cloog_pointers__.p_ppl_Linear_Expression_coefficient)
++#define ppl_Linear_Expression_inhomogeneous_term (*cloog_pointers__.p_ppl_Linear_Expression_inhomogeneous_term)
++#define ppl_Linear_Expression_space_dimension (*cloog_pointers__.p_ppl_Linear_Expression_space_dimension)
++#define ppl_new_Coefficient (*cloog_pointers__.p_ppl_new_Coefficient)
++#define ppl_new_Coefficient_from_mpz_t (*cloog_pointers__.p_ppl_new_Coefficient_from_mpz_t)
++#define ppl_new_Constraint (*cloog_pointers__.p_ppl_new_Constraint)
++#define ppl_new_Constraint_System (*cloog_pointers__.p_ppl_new_Constraint_System)
++#define ppl_new_Constraint_System_const_iterator (*cloog_pointers__.p_ppl_new_Constraint_System_const_iterator)
++#define ppl_new_C_Polyhedron_from_C_Polyhedron (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_C_Polyhedron)
++#define ppl_new_C_Polyhedron_from_space_dimension (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_space_dimension)
++#define ppl_new_C_Polyhedron_recycle_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_recycle_Constraint_System)
++#define ppl_new_Linear_Expression (*cloog_pointers__.p_ppl_new_Linear_Expression)
++#define ppl_new_Linear_Expression_from_Constraint (*cloog_pointers__.p_ppl_new_Linear_Expression_from_Constraint)
++#define ppl_new_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_new_Linear_Expression_from_Linear_Expression)
++#define ppl_new_Linear_Expression_with_dimension (*cloog_pointers__.p_ppl_new_Linear_Expression_with_dimension)
++#define ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron)
++#define ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron)
++#define ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension)
++#define ppl_new_Pointset_Powerset_C_Polyhedron_iterator (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_iterator)
++#define ppl_Pointset_Powerset_C_Polyhedron_add_constraint (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_add_constraint)
++#define ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed)
++#define ppl_Pointset_Powerset_C_Polyhedron_difference_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_difference_assign)
++#define ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_intersection_assign)
++#define ppl_Pointset_Powerset_C_Polyhedron_is_empty (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_is_empty)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_begin (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_begin)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_end (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_end)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_increment (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_increment)
++#define ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions)
++#define ppl_Pointset_Powerset_C_Polyhedron_maximize (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_maximize)
++#define ppl_Pointset_Powerset_C_Polyhedron_minimize (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_minimize)
++#define ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions)
++#define ppl_Pointset_Powerset_C_Polyhedron_size (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_size)
++#define ppl_Pointset_Powerset_C_Polyhedron_space_dimension (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_space_dimension)
++#define ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign)
++#define ppl_Polyhedron_add_constraint (*cloog_pointers__.p_ppl_Polyhedron_add_constraint)
++#define ppl_Polyhedron_add_constraints (*cloog_pointers__.p_ppl_Polyhedron_add_constraints)
++#define ppl_Polyhedron_add_space_dimensions_and_embed (*cloog_pointers__.p_ppl_Polyhedron_add_space_dimensions_and_embed)
++#define ppl_Polyhedron_get_constraints (*cloog_pointers__.p_ppl_Polyhedron_get_constraints)
++#define ppl_Polyhedron_map_space_dimensions (*cloog_pointers__.p_ppl_Polyhedron_map_space_dimensions)
++#define ppl_Polyhedron_remove_space_dimensions (*cloog_pointers__.p_ppl_Polyhedron_remove_space_dimensions)
++#define ppl_Polyhedron_space_dimension (*cloog_pointers__.p_ppl_Polyhedron_space_dimension)
++#define ppl_subtract_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_subtract_Linear_Expression_from_Linear_Expression)
++#define pprint (*cloog_pointers__.p_pprint)
++#define stmt_block (*cloog_pointers__.p_stmt_block)
++#define stmt_for (*cloog_pointers__.p_stmt_for)
++#define stmt_guard (*cloog_pointers__.p_stmt_guard)
++#define stmt_root (*cloog_pointers__.p_stmt_root)
++#define stmt_user (*cloog_pointers__.p_stmt_user)
++
++#define cloog_finalize (*cloog_pointers__.p_ppl_finalize)
++
+ #endif /* GCC_GRAPHITE_H */
diff --git a/4.5.1/gentoo/94_all_gcc-4.5-pch-nostdinc.patch b/4.5.1/gentoo/94_all_gcc-4.5-pch-nostdinc.patch
new file mode 100644
index 0000000..023b522
--- /dev/null
+++ b/4.5.1/gentoo/94_all_gcc-4.5-pch-nostdinc.patch
@@ -0,0 +1,28 @@
+Make precompiled headers cross buildable.
+
+http://bugs.gentoo.org/show_bug.cgi?id=262912
+
+diff -urN gcc-4.5.0.orig//libstdc++-v3/include/Makefile.am gcc-4.5.0/libstdc++-v3/include/Makefile.am
+--- gcc-4.5.0.orig//libstdc++-v3/include/Makefile.am 2010-07-27 11:22:34.000000000 +0200
++++ gcc-4.5.0/libstdc++-v3/include/Makefile.am 2010-07-27 11:21:29.000000000 +0200
+@@ -893,7 +893,7 @@
+ ${pch1_output_builddir} ${pch2_output_builddir} ${pch3_output_builddir}
+ pch_output_anchors = \
+ ${pch1_output_anchor} ${pch2_output_anchor} ${pch3_output_anchor}
+-PCHFLAGS=-x c++-header $(CXXFLAGS)
++PCHFLAGS=-x c++-header $(CXXFLAGS) -nostdinc++
+ if GLIBCXX_BUILD_PCH
+ pch_build = ${pch_output}
+ else
+diff -urN gcc-4.5.0.orig//libstdc++-v3/include/Makefile.in gcc-4.5.0/libstdc++-v3/include/Makefile.in
+--- gcc-4.5.0.orig//libstdc++-v3/include/Makefile.in 2010-04-02 20:18:06.000000000 +0200
++++ gcc-4.5.0/libstdc++-v3/include/Makefile.in 2010-07-27 11:21:47.000000000 +0200
+@@ -1119,7 +1119,7 @@
+ pch_output_anchors = \
+ ${pch1_output_anchor} ${pch2_output_anchor} ${pch3_output_anchor}
+
+-PCHFLAGS = -x c++-header $(CXXFLAGS)
++PCHFLAGS = -x c++-header $(CXXFLAGS) -nostdinc++
+ @GLIBCXX_BUILD_PCH_FALSE@pch_build =
+ @GLIBCXX_BUILD_PCH_TRUE@pch_build = ${pch_output}
+
diff --git a/4.5.1/gentoo/README.history b/4.5.1/gentoo/README.history
new file mode 100644
index 0000000..a2bba98
--- /dev/null
+++ b/4.5.1/gentoo/README.history
@@ -0,0 +1,20 @@
+1.0 07.08.2010
+ + 00_all_gcc-4.1-alpha-mieee-default.patch
+ + 01_all_gcc-4.1-alpha-asm-mcpu.patch
+ + 03_all_gcc43-java-nomulti.patch
+ + 08_all_gcc-4.1-cross-compile.patch
+ + 10_all_gcc-default-format-security.patch
+ + 10_all_gcc-default-fortify-source.patch
+ + 11_all_gcc-netbsd-symbolic.patch
+ + 14_all_gcc-sparc64-bsd.patch
+ + 15_all_gcc-libgomp-no-werror.patch
+ + 40_all_gcc-4.4-libiberty.h-asprintf.patch
+ + 47_all_arm-unbreak-armv4t.patch
+ + 51_all_gcc-3.4-libiberty-pic.patch
+ + 53_all_gcc4-superh-default-multilib.patch
+ + 61_all_gcc4-ia64-noteGNUstack.patch
+ + 74_all_sh-pr24836.patch
+ + 91_all_gcc-fbsdshared-spec.patch
+ + 93_all_gcc-4.5-cloog-dl.patch
+ + 94_all_gcc-4.5-pch-nostdinc.patch
+