This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via 4de56d3e6e760c01680196f32e2ce4be19965eb5 (commit) from 27a15be3c4e96cd14589886ead5ed51f8eec9a9c (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 4de56d3e6e760c01680196f32e2ce4be19965eb5 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun May 20 14:34:17 2012 +0200
gcc: Update to 4.7.0.
This is a major update to the latest version of GCC.
Be aware of imminent build failures because of new compiler warnings. There are no really great new features for us, but the compiler should generate better code as always.
-----------------------------------------------------------------------
Summary of changes: gcc/gcc.nm | 80 ++- ...408.patch => gcc-4.7.0-piepatch-20120518.patch} | 896 +++++++++----------- gcc/patches/gcc46-Woverlength-string-asm.patch0 | 180 ---- gcc/patches/gcc46-Woverlength-string.patch0 | 103 --- gcc/patches/gcc46-hack.patch0 | 114 --- gcc/patches/gcc46-unwind-debughook-sdt.patch0 | 88 -- ...decl.patch0 => gcc47-c++-builtin-redecl.patch0} | 46 +- ...gcc46-cloog-dl.patch0 => gcc47-cloog-dl.patch0} | 51 +- gcc/patches/gcc47-i386-libgomp.patch0 | 28 + ....patch0 => gcc47-libgomp-omp_h-multilib.patch0} | 0 gcc/patches/gcc47-libitm-fno-exceptions.patch0 | 28 + gcc/patches/gcc47-libstdc++-docs.patch0 | 26 + ...-rpath.patch0 => gcc47-libtool-no-rpath.patch0} | 0 ...dd-needed.patch0 => gcc47-no-add-needed.patch0} | 10 +- ...{gcc46-ppl-0.10.patch => gcc47-ppl-0.10.patch0} | 128 ++-- .../{gcc46-pr33763.patch0 => gcc47-pr33763.patch0} | 16 +- .../{gcc46-pr38757.patch0 => gcc47-pr38757.patch0} | 20 +- 17 files changed, 724 insertions(+), 1090 deletions(-) rename gcc/patches/{gcc-4.6.3-piepatches-20120408.patch => gcc-4.7.0-piepatch-20120518.patch} (64%) delete mode 100644 gcc/patches/gcc46-Woverlength-string-asm.patch0 delete mode 100644 gcc/patches/gcc46-Woverlength-string.patch0 delete mode 100644 gcc/patches/gcc46-hack.patch0 delete mode 100644 gcc/patches/gcc46-unwind-debughook-sdt.patch0 rename gcc/patches/{gcc46-c++-builtin-redecl.patch0 => gcc47-c++-builtin-redecl.patch0} (70%) rename gcc/patches/{gcc46-cloog-dl.patch0 => gcc47-cloog-dl.patch0} (94%) create mode 100644 gcc/patches/gcc47-i386-libgomp.patch0 rename gcc/patches/{gcc46-libgomp-omp_h-multilib.patch0 => gcc47-libgomp-omp_h-multilib.patch0} (100%) create mode 100644 gcc/patches/gcc47-libitm-fno-exceptions.patch0 create mode 100644 gcc/patches/gcc47-libstdc++-docs.patch0 rename gcc/patches/{gcc46-libtool-no-rpath.patch0 => gcc47-libtool-no-rpath.patch0} (100%) rename gcc/patches/{gcc46-no-add-needed.patch0 => gcc47-no-add-needed.patch0} (91%) rename gcc/patches/{gcc46-ppl-0.10.patch => gcc47-ppl-0.10.patch0} (55%) rename gcc/patches/{gcc46-pr33763.patch0 => gcc47-pr33763.patch0} (86%) rename gcc/patches/{gcc46-pr38757.patch0 => gcc47-pr38757.patch0} (87%)
Difference in files: diff --git a/gcc/gcc.nm b/gcc/gcc.nm index 34cdcac..c806eab 100644 --- a/gcc/gcc.nm +++ b/gcc/gcc.nm @@ -7,8 +7,8 @@ build_cloog_ppl = 1
name = gcc -version = 4.6.3 -release = 6 +version = 4.7.0 +release = 0.1
maintainer = Michael Tremer michael.tremer@ipfire.org groups = Development/Compilers @@ -27,21 +27,6 @@ required_binutils_version = 2.21.51.0.8-1 source_dl = http://ftp.gnu.org/gnu/gcc/%%7Bthisapp%7D/ sources = %{thisapp}.tar.gz
-patches = \ - gcc46-hack.patch0 \ - gcc46-c++-builtin-redecl.patch0 \ - gcc46-pr33763.patch0 \ - gcc46-libgomp-omp_h-multilib.patch0 \ - gcc46-libtool-no-rpath.patch0 \ - gcc46-cloog-dl.patch0 \ - gcc46-pr38757.patch0 \ - gcc46-no-add-needed.patch0 \ - gcc46-unwind-debughook-sdt.patch0 \ - gcc46-ppl-0.10.patch \ - gcc46-Woverlength-string.patch0 \ - gcc46-Woverlength-string-asm.patch0 \ - gcc-4.6.3-piepatches-20120408.patch - build requires autogen @@ -56,6 +41,7 @@ build libffi-devel libmpc-devel mpfr-devel + perl texinfo zlib-devel end @@ -144,18 +130,23 @@ build -e "s/-fno-exceptions/& -fno-asynchronous-unwind-tables/"
# we want to be able to control the pie patch logic via something other - # than ALL_CFLAGS... + # than ALL_CFLAGS and ALL_CXXFLAGS... sed -i gcc/Makefile.in \ -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \ - -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' + -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \ + -e '/^ALL_CXXFLAGS/iHARD_CFLAGS = ' \ + -e 's|^ALL_CXXFLAGS = |ALL_CXXFLAGS = $(HARD_CFLAGS) |'
# Enable the GCC hardening by default. sed -i gcc/Makefile.in \ -e "s|^HARD_CFLAGS = |HARD_CFLAGS = %{HARD_CFLAGS} |"
# Compile the compiler with -fPIC as well. + # However, genautomata crashes with a "Bus Error" when compiled + # with PIC. sed -i gcc/Makefile.in \ - -e "s|^ESP_NOPIE_CFLAGS = .*|ESP_NOPIE_CFLAGS =|" + -e "s|^ESP_NOPIE_CFLAGS = .*|ESP_NOPIE_CFLAGS =|" \ + -e 's|^build/genautomata$(build_exeext) .*|& -fno-PIC|'
# Default to -gdwarf-4 -fno-debug-types-section rather than -gdwarf-2 sed -i gcc/common.opt \ @@ -197,6 +188,8 @@ build --enable-languages=c,c++,lto \ --enable-bootstrap \ --enable-checking=release \ + --disable-build-with-cxx \ + --disable-build-poststage1-with-cxx \ --disable-werror \ --disable-libssp \ --disable-static \ @@ -205,10 +198,19 @@ build --disable-libunwind-exceptions \ --enable-gnu-unique-object \ --enable-linker-build-id \ + --with-linker-hash-style=gnu \ %{configure_options}
# GCC does not support a parallel build. make %{make_bootstrap} BOOT_CFLAGS="${CFLAGS}" + + # Generate man pages. + perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl + for i in %{DIR_APP}/gcc/doc/*.texi; do + cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i + done + make -C gcc generated-manpages + for i in %{DIR_APP}/gcc/doc/*.texi; do mv -f $i.orig $i; done end
#test @@ -264,7 +266,7 @@ build chmod 755 %{BUILDROOT}%{libdir}/libgomp.so.1.*
# libstdc++ - ln -svf ../../../libstdc++.so.6.0.16 ${FULLPATH}/libstdc++.so + ln -svf ../../../libstdc++.so.6.0.17 ${FULLPATH}/libstdc++.so
# libmudflap ln -svf ../../../libmudflap.so.0.0.0 ${FULLPATH}/libmudflap.so @@ -276,6 +278,11 @@ build ln -svf ../../../libquadmath.so.0.0.0 ${FULLPATH}/libquadmath.so chmod 755 %{BUILDROOT}%{libdir}/libquadmath.so.0.* fi + + # libitm + mv -vf %{BUILDROOT}%{libdir}/libitm.spec ${FULLPATH}/ + ln -svf ../../../libitm.so.1.0.0 ${FULLPATH}/libitm.so + chmod 755 %{BUILDROOT}%{libdir}/libitm.so.1.* end
keep_libraries @@ -484,6 +491,37 @@ packages end end
+ package libitm + summary = The GNU Transactional Memory library. + description + This package contains the GNU Transactional Memory library + which is a GCC transactional memory support runtime library. + end + + files + %{libdir}/libitm.so.1* + end + end + + package libitm-devel + summary = The GNU Transactional Memory support. + description + This package contains headers and support files for the + GNU Transactional Memory library. + end + + requires + gcc = %{thisver} + libitm = %{thisver} + end + + files + %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/itm.h + %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/itm_weak.h + %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libitm.so + end + end + package gcc-plugin-devel summary = Support for compiling GCC plugins. description diff --git a/gcc/patches/gcc-4.6.3-piepatches-20120408.patch b/gcc/patches/gcc-4.6.3-piepatches-20120408.patch deleted file mode 100644 index 467b90a..0000000 --- a/gcc/patches/gcc-4.6.3-piepatches-20120408.patch +++ /dev/null @@ -1,885 +0,0 @@ -git://git.overlays.gentoo.org/proj/hardened-gccpatchset.git - -diff -Nur gcc-4.6.3.vanilla/configure gcc-4.6.3/configure ---- gcc-4.6.3.vanilla/configure 2011-12-18 11:03:44.000000000 +0100 -+++ gcc-4.6.3/configure 2012-04-09 12:23:07.039817993 +0200 -@@ -668,6 +668,7 @@ - CFLAGS - CC - target_subdir -+enable_esp - host_subdir - build_subdir - build_libsubdir -@@ -1459,6 +1460,11 @@ - --disable-libquadmath-support - disable libquadmath support for Fortran - --enable-libada build libada directory -+ --enable-esp -+ Enable Stack protector, Position independent executable as -+ default if we have suppot for it when compiling -+ and link with -z relro and -z now as default. -+ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm. - --enable-libssp build libssp directory - --enable-build-with-cxx build with C++ compiler instead of C compiler - --disable-ppl-version-check -@@ -3039,6 +3045,25 @@ - noconfigdirs="$noconfigdirs gnattools" - fi - -+# Check whether --enable-esp was given and target have the support. -+# Check whether --enable-esp or --disable-esp was given. -+if test "${enable_esp+set}" = set; then -+ enableval="$enable_esp" -+ -+ case $target in -+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux*) -+ enable_esp=yes -+ ;; -+ *) -+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported on this $target target." >&5 -+echo "$as_me: error: *** --enable-esp is not supported on this $target target." >&2;} -+ { (exit 1); exit 1; }; } -+ ;; -+ esac -+ -+fi; -+ -+ - # Check whether --enable-libssp was given. - if test "${enable_libssp+set}" = set; then : - enableval=$enable_libssp; ENABLE_LIBSSP=$enableval -@@ -14168,6 +14193,9 @@ - *) stage1_cflags="-g -J" ;; - esac ;; - esac -+if test x$enable_esp = xyes; then -+ stage1_cflags="$stage1_cflags -fno-stack-protector" -+fi - - # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. - if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then -diff -Nur gcc-4.6.3.vanilla/gcc/config/gnu-user.h gcc-4.6.3/gcc/config/gnu-user.h ---- gcc-4.6.3.vanilla/gcc/config/gnu-user.h 2011-01-12 15:29:14.000000000 +0100 -+++ gcc-4.6.3/gcc/config/gnu-user.h 2012-04-09 12:25:51.598251886 +0200 -@@ -41,7 +41,11 @@ - provides part of the support for getting C++ file-scope static - object constructed before entering `main'. */ - --#if defined HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) -+#define GNU_USER_TARGET_STARTFILE_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \ -+ %{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) - #define GNU_USER_TARGET_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}" -diff -Nur gcc-4.6.3.vanilla/gcc/config/rs6000/linux64.h gcc-4.6.3/gcc/config/rs6000/linux64.h ---- gcc-4.6.3.vanilla/gcc/config/rs6000/linux64.h 2011-03-07 08:50:23.000000000 +0100 -+++ gcc-4.6.3/gcc/config/rs6000/linux64.h 2012-04-09 12:25:39.139032665 +0200 -@@ -193,7 +193,7 @@ - #endif - - #define ASM_SPEC32 "-a32 \ --%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \ -+%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \ - %{memb} %{!memb: %{msdata=eabi: -memb}} \ - %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ - %{mcall-freebsd: -mbig} \ -diff -Nur gcc-4.6.3.vanilla/gcc/config/rs6000/sysv4.h gcc-4.6.3/gcc/config/rs6000/sysv4.h ---- gcc-4.6.3.vanilla/gcc/config/rs6000/sysv4.h 2011-03-07 08:50:23.000000000 +0100 -+++ gcc-4.6.3/gcc/config/rs6000/sysv4.h 2012-04-09 12:25:51.599251502 +0200 -@@ -800,7 +800,12 @@ - %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ - %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" - --#ifdef HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) -+#define STARTFILE_LINUX_SPEC "\ -+%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ -+%{mnewlib:ecrti.o%s;:crti.o%s} \ -+%{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) - #define STARTFILE_LINUX_SPEC "\ - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - %{mnewlib:ecrti.o%s;:crti.o%s} \ -diff -Nur gcc-4.6.3.vanilla/gcc/config.in gcc-4.6.3/gcc/config.in ---- gcc-4.6.3.vanilla/gcc/config.in 2012-03-01 13:03:46.000000000 +0100 -+++ gcc-4.6.3/gcc/config.in 2012-04-09 12:24:09.220535670 +0200 -@@ -58,6 +58,12 @@ - #endif - - -+/* Define to 1 to enable crtbeginP.o. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_CRTBEGINP -+#endif -+ -+ - /* Define to 1 to specify that we are using the BID decimal floating point - format instead of DPD */ - #ifndef USED_FOR_TARGET -@@ -77,6 +83,18 @@ - #endif - - -+/* Define to 1 to enable esp. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_ESP -+#endif -+ -+ -+/* Define to 1 to enable esp ssp. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_ESP_SSP -+#endif -+ -+ - /* Define to 1 to enable fixed-point arithmetic extension to C. */ - #ifndef USED_FOR_TARGET - #undef ENABLE_FIXED_POINT -diff -Nur gcc-4.6.3.vanilla/gcc/configure gcc-4.6.3/gcc/configure ---- gcc-4.6.3.vanilla/gcc/configure 2011-11-20 22:24:07.000000000 +0100 -+++ gcc-4.6.3/gcc/configure 2012-04-09 12:24:09.229532218 +0200 -@@ -677,6 +677,8 @@ - HOST_LIBS - GGC - libgcc_visibility -+enable_esp -+enable_crtbeginP - gcc_cv_readelf - gcc_cv_objdump - ORIGINAL_NM_FOR_TARGET -@@ -25606,6 +25608,50 @@ - ;; - esac - -+echo "$as_me:$LINENO: checking linker -z now support" >&5 -+echo $ECHO_N "checking linker -z now support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_now+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_now=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_now=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z now options -+ if $gcc_cv_ld --help 2>/dev/null | grep now > /dev/null; then -+ gcc_cv_ld_now=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_now" >&5 -+echo "${ECHO_T}$gcc_cv_ld_now" >&6 -+ -+echo "$as_me:$LINENO: checking linker -z relro support" >&5 -+echo $ECHO_N "checking linker -z relro support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_relro+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_relro=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_relro=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z relro and -z norelro options -+ if $gcc_cv_ld --help 2>/dev/null | grep relro > /dev/null; then -+ gcc_cv_ld_relro=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_relro" >&5 -+echo "${ECHO_T}$gcc_cv_ld_relro" >&6 -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5 - $as_echo_n "checking linker --build-id support... " >&6; } - if test "${gcc_cv_ld_buildid+set}" = set; then : -@@ -25790,6 +25836,113 @@ - - fi - -+if test x$enable_esp = xyes ; then -+case $target in -+ ia64*-*-linux*) -+ if test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_relro = xyes && test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *) -+ enable_esp_ld=no -+ ;; -+ esac -+else -+ enable_espf_ld=no -+fi -+if test x$enable_esp_ld = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_ESP 1 -+_ACEOF -+ -+fi -+ -+if test x$enable_esp = xyes && test x$enable_esp_ld = xno; then -+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&5 -+echo "$as_me: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+echo "$as_me:$LINENO: checking for crtbeginP.o support" >&5 -+echo $ECHO_N "checking for crtbeginP.o support... $ECHO_C" >&6 -+if test "${enable_crtbeginP+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+if test x$enable_esp = xyes ; then -+ case "$target" in -+ ia64*-*-linux*) -+ enable_crtbeginP=no ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then -+ enable_crtbeginP=yes -+ fi -+ ;; -+ *) enable_crtbeginP=no ;; -+ esac -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $enable_crtbeginP" >&5 -+echo "${ECHO_T}$enable_crtbeginP" >&6 -+ -+if test x$enable_crtbeginP = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_CRTBEGINP 1 -+_ACEOF -+ -+fi -+ -+ -+# Check if we have SSP support. if uClibc we need 0.9.32 or newer and TLS. -+echo "$as_me:$LINENO: checking for SSP support" >&5 -+echo $ECHO_N "checking for SSP support... $ECHO_C" >&6 -+if test "${enable_esp_SSP+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test x$enable_esp = xyes && test x$gcc_cv_libc_provides_ssp = xyes \ -+ && test x$set_have_as_tls = xyes; then -+ if $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \ -+ $target_header_dir/features.h > /dev/null; then -+ if test -f $target_header_dir/bits/uClibc_config.h && \ -+ $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_SUBLEVEL__[ ]+([3-9][2-9]|[4-9][0-9])' \ -+ $target_header_dir/bits/uClibc_config.h > /dev/null && \ -+ $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_TLS__[ ]+1' \ -+ $target_header_dir/bits/uClibc_config.h > /dev/null; then -+ enable_esp_SSP=yes -+ else -+ enable_esp_SSP=no -+ fi -+ else -+ enable_esp_SSP=yes -+ fi -+ else -+ enable_esp_SSP=no -+ fi -+fi -+echo "$as_me:$LINENO: result: $enable_esp_SSP" >&5 -+echo "${ECHO_T}$enable_esp_SSP" >&6 -+ -+if test x$enable_esp_SSP = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_ESP_SSP 1 -+_ACEOF -+ -+fi -+ -+ - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 - # and later they can use TFmode. -diff -Nur gcc-4.6.3.vanilla/gcc/cp/lang-specs.h gcc-4.6.3/gcc/cp/lang-specs.h ---- gcc-4.6.3.vanilla/gcc/cp/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 -+++ gcc-4.6.3/gcc/cp/lang-specs.h 2012-04-09 12:25:11.222744541 +0200 -@@ -47,7 +47,7 @@ - %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ - cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}}%V}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, -@@ -58,7 +58,7 @@ - %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ - cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".ii", "@c++-cpp-output", 0, 0, 0}, -diff -Nur gcc-4.6.3.vanilla/gcc/doc/invoke.texi gcc-4.6.3/gcc/doc/invoke.texi ---- gcc-4.6.3.vanilla/gcc/doc/invoke.texi 2012-01-03 17:43:38.000000000 +0100 -+++ gcc-4.6.3/gcc/doc/invoke.texi 2012-04-09 12:26:06.709453504 +0200 -@@ -8185,6 +8185,11 @@ - @opindex fstack-protector-all - Like @option{-fstack-protector} except that all functions are protected. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector} -+or @option{-nostdlib} or @option{-nodefaultlibs} or -+@option{-fstack-protector} are found. -+ - @item -fsection-anchors - @opindex fsection-anchors - Try to reduce the number of symbolic address calculations by using -@@ -9090,6 +9095,12 @@ - that were used to generate code (@option{-fpie}, @option{-fPIE}, - or model suboptions) when you specify this option. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p} -+are found. -+ - @item -rdynamic - @opindex rdynamic - Pass the flag @option{-export-dynamic} to the ELF linker, on targets -@@ -18099,6 +18110,11 @@ - @code{__pie__} and @code{__PIE__}. The macros have the value 1 - for @option{-fpie} and 2 for @option{-fPIE}. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} are found. -+ - @item -fno-jump-tables - @opindex fno-jump-tables - Do not use jump tables for switch statements even where it would be -diff -Nur gcc-4.6.3.vanilla/gcc/esp.h gcc-4.6.3/gcc/esp.h ---- gcc-4.6.3.vanilla/gcc/esp.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.6.3/gcc/esp.h 2012-04-09 12:25:25.376313618 +0200 -@@ -0,0 +1,145 @@ -+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. -+ * Version 20120403.2 -+ * Magnus Granberg (Zorry) zorry@gentoo.org */ -+#ifndef GCC_ESP_H -+#define GCC_ESP_H -+ -+/* This file will add -fstack-protector-all, -fPIE, -pie and -z now -+ as default if the defines and the spec allow it. -+ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass -+ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. -+ This will add some unsupported upstream commands options as -nopie and -nonow. -+ -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protector-all when building kernels. -+ ESP_CC1_SPEC is added to CC1_SPEC. -+ ESP_CC1_STRICT_OVERFLOW_SPEC is added so we don't disable the strict-overflow check. -+ ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static. -+ ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE or -fpie. -+*/ -+#ifdef ENABLE_ESP -+ -+ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */ -+ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict_overflow)" -+ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: }}" -+ #else -+ #define ESP_CC1_SSP_SPEC "" -+ #endif -+ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_CC1_PIE_SPEC "%{!nopie: }" -+ #else -+ #define ESP_CC1_PIE_SPEC "" -+ #endif -+ #define ESP_CC1_STRICT_OVERFLOW_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}" -+ -+ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable -+ -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check -+ Don't remove the specs in the end */ -+ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) " -+ #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}" -+ -+ /* We use ESP_COMMAND_OPTIONS_SPEC to add pie command-line options. */ -+ #define ESP_COMMAND_OPTIONS_SPEC "%{!D__KERNEL__:%{!nopie:%(esp_options_pie) %(esp_link_pie)}}" -+ -+ /* ESP_OPTIONS_SPEC is added to the compiler spec in gcc/gcc.c */ -+ #define ESP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* ESP_CPP_OPTIONS_SPEC is added to the cpp_options spec in gcc/gcc.c -+ For precompiling headers. */ -+ #define ESP_CPP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector -+ -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined. */ -+ #if ( defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) ) && defined ( ENABLE_ESP_SSP ) -+ #define ESP_OPTIONS_SSP_SPEC \ -+ "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \ -+ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}" -+ #else -+ #define ESP_OPTIONS_SSP_SPEC "" -+ #endif -+ -+ /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie */ -+ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) -+ -+ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -+ -nostdlib -nostartfiles. */ -+ /* With ENABLE_CRTBEGINP we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINP -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" -+ #else -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" -+ #endif -+ -+ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib -+ -nostartfiles */ -+ /* With ENABLE_CRTBEGINP we don't need to check for -static -+ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ -+ #ifdef ENABLE_CRTBEGINP -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" -+ #else -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" -+ #endif -+ -+ /* This will check if -pie is set when (-static) -pg -p -profile. If set it will make gcc print out -+ "-pie and (static)|pg|p|profile are incompatible when linking" */ -+ /* With ENABLE_CRTBEGINP we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINP -+ #define ESP_LINK_PIE_CHECK_SPEC \ -+ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}" -+ #else -+ #define ESP_LINK_PIE_CHECK_SPEC \ -+ "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible when linking}}" -+ #endif -+ -+ /* We don't pass -pie to the linker when -static. */ -+ #ifdef ENABLE_CRTBEGINP -+ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)" -+ #else -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ #else -+ #define ESP_OPTIONS_PIE_SPEC "" -+ #define ESP_LINK_PIE_CHECK_SPEC "" -+ #define ESP_LINK_PIE_SPEC "" -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_cc1", ESP_CC1_SPEC }, \ -+ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ -+ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ -+ { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \ -+ { "esp_link", ESP_LINK_SPEC }, \ -+ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ -+ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ -+ { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \ -+ { "esp_command_options", ESP_COMMAND_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC }, \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ -+ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } -+ -+ static const char *esp_command_options_spec = ESP_COMMAND_OPTIONS_SPEC; -+ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; -+ -+#else /* If not ESP_ENABLE defined do this. */ -+ -+ #define ESP_OPTIONS_SPEC "" -+ #define ESP_CPP_OPTIONS_SPEC "" -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC } -+ -+#endif -+#endif /* End GCC_ESP_H */ -diff -Nur gcc-4.6.3.vanilla/gcc/gcc.c gcc-4.6.3/gcc/gcc.c ---- gcc-4.6.3.vanilla/gcc/gcc.c 2011-02-23 03:04:43.000000000 +0100 -+++ gcc-4.6.3/gcc/gcc.c 2012-04-09 12:25:11.222744541 +0200 -@@ -44,6 +44,7 @@ - #include "flags.h" - #include "opts.h" - #include "vec.h" -+#include "esp.h" /* for --enable-esp support */ - - /* By default there is no special suffix for target executables. */ - /* FIXME: when autoconf is fixed, remove the host check - dj */ -@@ -690,7 +691,9 @@ - - static const char *asm_debug; - static const char *cpp_spec = CPP_SPEC; -+#ifndef ENABLE_ESP - static const char *cc1_spec = CC1_SPEC; -+#endif - static const char *cc1plus_spec = CC1PLUS_SPEC; - static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; - static const char *link_ssp_spec = LINK_SSP_SPEC; -@@ -751,7 +754,7 @@ - static const char *cpp_options = - "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ - %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ -- %{undef} %{save-temps*:-fpch-preprocess}"; -+ %{undef} %{save-temps*:-fpch-preprocess} %(esp_cpp_options)"; - - /* This contains cpp options which are not passed when the preprocessor - output will be used by another program. */ -@@ -925,9 +928,9 @@ - %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ - %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ - cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ -- %(cc1_options)}\ -+ %(cc1_options) %(esp_options)}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, - {"-", - "%{!E:%e-E or -x required when input is from standard input}\ -@@ -950,7 +953,7 @@ - %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, - {".i", "@cpp-output", 0, 0, 0}, - {"@cpp-output", -- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(esp_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {".s", "@assembler", 0, 0, 0}, - {"@assembler", - "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, -@@ -1203,18 +1206,23 @@ - INIT_STATIC_SPEC ("sysroot_hdrs_suffix_spec", &sysroot_hdrs_suffix_spec), - }; - --#ifdef EXTRA_SPECS /* additional specs needed */ -+/* EXTRA_SPECS needs to be defined */ -+#ifndef EXTRA_SPECS -+#define EXTRA_SPECS -+#endif -+ -+/* EXTRA_SPECS and ESP_EXTRA_SPECS add additional specs */ - /* Structure to keep track of just the first two args of a spec_list. -- That is all that the EXTRA_SPECS macro gives us. */ -+ That is all that the EXTRA_SPECS and ESP_EXTRA_SPECS macro gives us. */ - struct spec_list_1 - { - const char *const name; - const char *const ptr; - }; - --static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS }; -+/* ESP_EXTRA_SPECS before EXTRA_SPECS */ -+static const struct spec_list_1 extra_specs_1[] = { ESP_EXTRA_SPECS, EXTRA_SPECS }; - static struct spec_list *extra_specs = (struct spec_list *) 0; --#endif - - /* List of dynamically allocates specs that have been defined so far. */ - -@@ -1306,7 +1314,6 @@ - if (verbose_flag) - fnotice (stderr, "Using built-in specs.\n"); - --#ifdef EXTRA_SPECS - extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1)); - - for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--) -@@ -1319,7 +1326,6 @@ - sl->ptr_spec = &sl->ptr; - next = sl; - } --#endif - - for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--) - { -@@ -6418,6 +6424,12 @@ - gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str, - spec_version, dir_separator_str, NULL); - -+#ifdef ENABLE_ESP -+ /* Process ESP_COMMAND_OPTIONS_SPEC, adding any new options to the end -+ of the command line. */ -+ do_self_spec (esp_command_options_spec); -+#endif -+ - /* Now we have the specs. - Set the `valid' bits for switches that match anything in any spec. */ - -diff -Nur gcc-4.6.3.vanilla/gcc/Makefile.in gcc-4.6.3/gcc/Makefile.in ---- gcc-4.6.3.vanilla/gcc/Makefile.in 2011-08-20 09:51:09.000000000 +0200 -+++ gcc-4.6.3/gcc/Makefile.in 2012-04-09 12:23:38.285405919 +0200 -@@ -642,6 +642,14 @@ - INHIBIT_LIBC_CFLAGS = -Dinhibit_libc - endif - -+# We don't want to compile the compiler with -fPIE. -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOPIE_CFLAGS = -fno-PIE -+else -+ESP_NOPIE_CFLAGS= -+endif -+ - # Options to use when compiling libgcc2.a. - # - LIBGCC2_DEBUG_CFLAGS = -g -@@ -662,7 +670,7 @@ - CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ - -finhibit-size-directive -fno-inline -fno-exceptions \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ -- -fno-stack-protector \ -+ -fno-stack-protector $(ESP_NOPIE_CFLAGS) \ - $(INHIBIT_LIBC_CFLAGS) - - # Additional sources to handle exceptions; overridden by targets as needed. -@@ -693,6 +701,12 @@ - # The rules for compiling them should be in the t-* file for the machine. - EXTRA_PARTS = @extra_parts@ - -+# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes -+enable_crtbeginP = @enable_crtbeginP@ -+ifeq ($(enable_crtbeginP),yes) -+EXTRA_PARTS += crtbeginP.o -+endif -+ - # List of extra object files that should be compiled and linked with - # compiler proper (cc1, cc1obj, cc1plus). - EXTRA_OBJS = @extra_objs@ -@@ -996,12 +1010,12 @@ - - # This is the variable actually used when we compile. If you change this, - # you probably want to update BUILD_CFLAGS in configure.ac --ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \ -+ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \ - $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ - - # The C++ version. --ALL_CXXFLAGS = $(T_CFLAGS) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ -- $(COVERAGE_FLAGS) $(WARN_CXXFLAGS) @DEFS@ -+ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CXXFLAGS) \ -+ $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CXXFLAGS) @DEFS@ - - # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro - # puts -I options in CPPFLAGS, our include files in the srcdir will always -@@ -1920,9 +1934,10 @@ - echo LIBGCC_SYNC = '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars - echo LIBGCC_SYNC_CFLAGS = '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_CFLAGS = '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars -- echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars -+ echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars - echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars -+ echo enable_crtbeginP = '$(enable_crtbeginP)' >> tmp-libgcc.mvars - - mv tmp-libgcc.mvars libgcc.mvars - -@@ -1982,9 +1997,19 @@ - $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ - -o $(T)crtbeginT$(objext) - -+# This is a version of crtbegin for -static -fPIE links if esp is enable. -+ifeq ($(enable_crtbeginP),yes) -+$(T)crtbeginP.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ -+ gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) -+ $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \ -+ -o $(T)crtbeginP$(objext) -+endif -+ - # Compile the start modules crt0.o and mcrt0.o that are linked with - # every program - $(T)crt0.o: s-crt0 ; @true -diff -Nur gcc-4.6.3.vanilla/gcc/objc/lang-specs.h gcc-4.6.3/gcc/objc/lang-specs.h ---- gcc-4.6.3.vanilla/gcc/objc/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 -+++ gcc-4.6.3/gcc/objc/lang-specs.h 2012-04-09 12:25:11.224743774 +0200 -@@ -30,9 +30,9 @@ - %{traditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ -- cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ -+ cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}\ - %{!save-temps*:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objective-c-header", - "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ -@@ -41,18 +41,18 @@ - %{traditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ -- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj -fpreprocessed %b.mi %(cc1_options)%(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}\ - %{!save-temps*:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, - {".mi", "@objective-c-cpp-output", 0, 0, 0}, - {"@objective-c-cpp-output", -- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objc-cpp-output", - "%nobjc-cpp-output is deprecated; please use objective-c-cpp-output instead\n\ -- %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.6.3.vanilla/gcc/objcp/lang-specs.h gcc-4.6.3/gcc/objcp/lang-specs.h ---- gcc-4.6.3.vanilla/gcc/objcp/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 -+++ gcc-4.6.3/gcc/objcp/lang-specs.h 2012-04-09 12:25:11.223744157 +0200 -@@ -36,7 +36,7 @@ - %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ - cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(esp_options) %2\ - -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {"@objective-c++", -@@ -46,16 +46,16 @@ - %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ - cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".mii", "@objective-c++-cpp-output", 0, 0, 0}, - {"@objective-c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objc++-cpp-output", - "%nobjc++-cpp-output is deprecated; please use objective-c++-cpp-output instead\n\ - %{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.6.3.vanilla/gcc/varasm.c gcc-4.6.3/gcc/varasm.c ---- gcc-4.6.3.vanilla/gcc/varasm.c 2011-12-09 20:11:01.000000000 +0100 -+++ gcc-4.6.3/gcc/varasm.c 2012-04-09 12:24:55.766675254 +0200 -@@ -6028,7 +6028,11 @@ - bool is_local; - - is_local = targetm.binds_local_p (decl); -- if (!flag_shlib) -+ #ifdef ENABLE_ESP -+ if (!flag_pic) -+ #else -+ if (!flag_shlib) -+ #endif - { - if (is_local) - kind = TLS_MODEL_LOCAL_EXEC; -diff -Nur gcc-4.6.3.vanilla/libgcc/Makefile.in gcc-4.6.3/libgcc/Makefile.in ---- gcc-4.6.3.vanilla/libgcc/Makefile.in 2011-01-26 05:19:58.000000000 +0100 -+++ gcc-4.6.3/libgcc/Makefile.in 2012-04-09 12:23:38.286405535 +0200 -@@ -298,6 +298,12 @@ - gen-hide-list = echo > $@ - endif - -+# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes -+enable_libgcc_crtbeginP = $(enable_crtbeginP) -+ifeq ($(enable_libgcc_crtbeginP),yes) -+EXTRA_PARTS += crtbeginP.o -+endif -+ - ifneq ($(EXTRA_PARTS),) - extra-parts = libgcc-extra-parts - INSTALL_PARTS = $(EXTRA_PARTS) -@@ -849,6 +855,13 @@ - crtbeginT.o: $(gcc_srcdir)/crtstuff.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS) \ - -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -+ -+# This is a version of crtbegin for -static -fPIE links. -+ifeq ($(enable_libgcc_crtbeginP),yes) -+crtbeginP.o: $(gcc_srcdir)/crtstuff.c -+ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O -+endif - endif - - # Build extra startfiles in the libgcc directory. -diff -Nur gcc-4.6.3.vanilla/libmudflap/configure gcc-4.6.3/libmudflap/configure ---- gcc-4.6.3.vanilla/libmudflap/configure 2011-11-20 22:24:07.000000000 +0100 -+++ gcc-4.6.3/libmudflap/configure 2012-04-09 12:23:07.050818345 +0200 -@@ -652,6 +652,7 @@ - MAINTAINER_MODE_FALSE - MAINTAINER_MODE_TRUE - am__untar -+enable_esp - am__tar - AMTAR - am__leading_dot -diff -Nur gcc-4.6.3.vanilla/Makefile.in gcc-4.6.3/Makefile.in ---- gcc-4.6.3.vanilla/Makefile.in 2012-01-02 12:02:10.000000000 +0100 -+++ gcc-4.6.3/Makefile.in 2012-04-09 12:23:38.283406686 +0200 -@@ -356,9 +356,17 @@ - BUILD_PREFIX = @BUILD_PREFIX@ - BUILD_PREFIX_1 = @BUILD_PREFIX_1@ - -+# Some stuff don't compile with SSP -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOSSP_CFLAGS = -fno-stack-protector -+else -+ESP_NOSSP_CFLAGS= -+endif -+ - # Flags to pass to stage2 and later makes. They are defined - # here so that they can be overridden by Makefile fragments. --BOOT_CFLAGS= -g -O2 -+BOOT_CFLAGS= -g -O2 $(ESP_NOSSP_CFLAGS) - BOOT_LDFLAGS= - BOOT_ADAFLAGS=-gnatpg -gnata - -@@ -403,9 +411,9 @@ - - CFLAGS = @CFLAGS@ - LDFLAGS = @LDFLAGS@ --LIBCFLAGS = $(CFLAGS) -+LIBCFLAGS = $(CFLAGS) $(ESP_NOSSP_CFLAGS) - CXXFLAGS = @CXXFLAGS@ --LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESP_NOSSP_CFLAGS) - GOCFLAGS = $(CFLAGS) - - TFLAGS = diff --git a/gcc/patches/gcc-4.7.0-piepatch-20120518.patch b/gcc/patches/gcc-4.7.0-piepatch-20120518.patch new file mode 100644 index 0000000..813713d --- /dev/null +++ b/gcc/patches/gcc-4.7.0-piepatch-20120518.patch @@ -0,0 +1,833 @@ +diff -Nur gcc-4.7.0-vanilla/configure gcc-4.7.0/configure +--- gcc-4.7.0-vanilla/configure 2012-02-02 11:20:32.000000000 +0100 ++++ gcc-4.7.0/configure 2012-05-18 10:53:11.645610347 +0200 +@@ -671,6 +671,7 @@ + CFLAGS + CC + EXTRA_CONFIGARGS_LIBJAVA ++enable_esp + target_subdir + host_subdir + build_subdir +@@ -749,6 +750,7 @@ + enable_libquadmath + enable_libquadmath_support + enable_libada ++enable_esp + enable_libssp + enable_static_libjava + enable_bootstrap +@@ -1467,6 +1469,11 @@ + --disable-libquadmath-support + disable libquadmath support for Fortran + --enable-libada build libada directory ++ --enable-esp Enable Stack protector, Position independent ++ executable as default if we have suppot for it when ++ compiling and link with -z relro and -z now as ++ default. Linux targets supported i*86, x86_64, ++ x86_x32, powerpc, powerpc64, ia64 and arm. + --enable-libssp build libssp directory + --enable-static-libjava[=ARG] + build static libjava [default=no] +@@ -2985,6 +2992,24 @@ + noconfigdirs="$noconfigdirs gnattools" + fi + ++# Check whether --enable-esp was given and target have the support. ++# Check whether --enable-esp was given. ++if test "${enable_esp+set}" = set; then : ++ enableval=$enable_esp; ++ case $target in ++ i?86*-*-linux* | x86_??*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux*) ++ enable_esp=yes ++ ;; ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** --enable-esp is not supported on this $target target." >&5 ++$as_echo "$as_me: WARNING: *** --enable-esp is not supported on this $target target." >&2;} ++ ;; ++ esac ++ ++fi ++ ++ ++ + # Check whether --enable-libssp was given. + if test "${enable_libssp+set}" = set; then : + enableval=$enable_libssp; ENABLE_LIBSSP=$enableval +@@ -14422,6 +14447,11 @@ + CFLAGS="$saved_CFLAGS" + fi + ++# Disable -fstack-protector on stage1 ++if test x$enable_esp = xyes; then ++ stage1_cflags="$stage1_cflags -fno-stack-protector" ++fi ++ + + + # Enable --enable-checking in stage1 of the compiler. +diff -Nur gcc-4.7.0-vanilla/gcc/esp.h gcc-4.7.0/gcc/esp.h +--- gcc-4.7.0-vanilla/gcc/esp.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.7.0/gcc/esp.h 2012-05-18 10:54:28.787077373 +0200 +@@ -0,0 +1,145 @@ ++/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. ++ * Version 20120403.2 ++ * Magnus Granberg (Zorry) zorry@gentoo.org */ ++#ifndef GCC_ESP_H ++#define GCC_ESP_H ++ ++/* This file will add -fstack-protector-all, -fPIE, -pie and -z now ++ as default if the defines and the spec allow it. ++ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass ++ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. ++ This will add some unsupported upstream commands options as -nopie and -nonow. ++ -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protector-all when building kernels. ++ ESP_CC1_SPEC is added to CC1_SPEC. ++ ESP_CC1_STRICT_OVERFLOW_SPEC is added so we don't disable the strict-overflow check. ++ ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static. ++ ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE or -fpie. ++*/ ++#ifdef ENABLE_ESP ++ ++ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */ ++ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict_overflow)" ++ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) ++ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: }}" ++ #else ++ #define ESP_CC1_SSP_SPEC "" ++ #endif ++ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) ++ #define ESP_CC1_PIE_SPEC "%{!nopie: }" ++ #else ++ #define ESP_CC1_PIE_SPEC "" ++ #endif ++ #define ESP_CC1_STRICT_OVERFLOW_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}" ++ ++ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable ++ -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check ++ Don't remove the specs in the end */ ++ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) " ++ #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}" ++ ++ /* We use ESP_COMMAND_OPTIONS_SPEC to add pie command-line options. */ ++ #define ESP_COMMAND_OPTIONS_SPEC "%{!D__KERNEL__:%{!nopie:%(esp_options_pie) %(esp_link_pie)}}" ++ ++ /* ESP_OPTIONS_SPEC is added to the compiler spec in gcc/gcc.c */ ++ #define ESP_OPTIONS_SPEC "%(esp_options_ssp)" ++ ++ /* ESP_CPP_OPTIONS_SPEC is added to the cpp_options spec in gcc/gcc.c ++ For precompiling headers. */ ++ #define ESP_CPP_OPTIONS_SPEC "%(esp_options_ssp)" ++ ++ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector ++ -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined. */ ++ #if ( defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) ) && defined ( ENABLE_ESP_SSP ) ++ #define ESP_OPTIONS_SSP_SPEC \ ++ "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \ ++ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}" ++ #else ++ #define ESP_OPTIONS_SSP_SPEC "" ++ #endif ++ ++ /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie */ ++ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) ++ ++ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static ++ -nostdlib -nostartfiles. */ ++ /* With ENABLE_CRTBEGINP we don't need to check for -static */ ++ #ifdef ENABLE_CRTBEGINP ++ #define ESP_OPTIONS_PIE_SPEC \ ++ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ ++ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" ++ #else ++ #define ESP_OPTIONS_PIE_SPEC \ ++ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ ++ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" ++ #endif ++ ++ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib ++ -nostartfiles */ ++ /* With ENABLE_CRTBEGINP we don't need to check for -static ++ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ ++ #ifdef ENABLE_CRTBEGINP ++ #define ESP_LINK_PIE_SPEC \ ++ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ ++ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" ++ #else ++ #define ESP_LINK_PIE_SPEC \ ++ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ ++ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" ++ #endif ++ ++ /* This will check if -pie is set when (-static) -pg -p -profile. If set it will make gcc print out ++ "-pie and (static)|pg|p|profile are incompatible when linking" */ ++ /* With ENABLE_CRTBEGINP we don't need to check for -static */ ++ #ifdef ENABLE_CRTBEGINP ++ #define ESP_LINK_PIE_CHECK_SPEC \ ++ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}" ++ #else ++ #define ESP_LINK_PIE_CHECK_SPEC \ ++ "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible when linking}}" ++ #endif ++ ++ /* We don't pass -pie to the linker when -static. */ ++ #ifdef ENABLE_CRTBEGINP ++ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)" ++ #else ++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" ++ #endif ++ ++ #else ++ #define ESP_OPTIONS_PIE_SPEC "" ++ #define ESP_LINK_PIE_CHECK_SPEC "" ++ #define ESP_LINK_PIE_SPEC "" ++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" ++ #endif ++ ++ /* We add extra spec name's to the EXTRA_SPECS list */ ++ #define ESP_EXTRA_SPECS \ ++ { "esp_cc1", ESP_CC1_SPEC }, \ ++ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ ++ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ ++ { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \ ++ { "esp_link", ESP_LINK_SPEC }, \ ++ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ ++ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ ++ { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \ ++ { "esp_command_options", ESP_COMMAND_OPTIONS_SPEC }, \ ++ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC }, \ ++ { "esp_options", ESP_OPTIONS_SPEC }, \ ++ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ ++ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } ++ ++ static const char *esp_command_options_spec = ESP_COMMAND_OPTIONS_SPEC; ++ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; ++ ++#else /* If not ESP_ENABLE defined do this. */ ++ ++ #define ESP_OPTIONS_SPEC "" ++ #define ESP_CPP_OPTIONS_SPEC "" ++ ++ /* We add extra spec name's to the EXTRA_SPECS list */ ++ #define ESP_EXTRA_SPECS \ ++ { "esp_options", ESP_OPTIONS_SPEC }, \ ++ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC } ++ ++#endif ++#endif /* End GCC_ESP_H */ +diff -Nur gcc-4.7.0-vanilla/gcc/common.opt gcc-4.7.0/gcc/common.opt +--- gcc-4.7.0-vanilla/gcc/common.opt 2012-02-01 10:20:32.000000000 +0100 ++++ gcc-4.7.0/gcc/common.opt 2012-05-18 10:56:19.708624714 +0200 +@@ -2268,6 +2268,9 @@ + nodefaultlibs + Driver + ++nopie ++Driver ++ + nostartfiles + Driver + +diff -Nur gcc-4.7.0-vanilla/gcc/config/gnu-user.h gcc-4.7.0/gcc/config/gnu-user.h +--- gcc-4.7.0-vanilla/gcc/config/gnu-user.h 2011-04-28 18:49:49.000000000 +0200 ++++ gcc-4.7.0/gcc/config/gnu-user.h 2012-05-18 10:56:49.987593058 +0200 +@@ -41,7 +41,11 @@ + provides part of the support for getting C++ file-scope static + object constructed before entering `main'. */ + +-#if defined HAVE_LD_PIE ++#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) ++#define GNU_USER_TARGET_STARTFILE_SPEC \ ++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \ ++ %{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" ++#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) + #define GNU_USER_TARGET_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}" +diff -Nur gcc-4.7.0-vanilla/gcc/config/rs6000/linux64.h gcc-4.7.0/gcc/config/rs6000/linux64.h +--- gcc-4.7.0-vanilla/gcc/config/rs6000/linux64.h 2012-03-12 17:16:51.000000000 +0100 ++++ gcc-4.7.0/gcc/config/rs6000/linux64.h 2012-05-18 10:57:30.248880643 +0200 +@@ -180,7 +180,7 @@ + #endif + + #define ASM_SPEC32 "-a32 \ +-%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \ ++%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \ + %{memb} %{!memb: %{msdata=eabi: -memb}} \ + %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ + %{mcall-freebsd: -mbig} \ +diff -Nur gcc-4.7.0-vanilla/gcc/config/rs6000/sysv4.h gcc-4.7.0/gcc/config/rs6000/sysv4.h +--- gcc-4.7.0-vanilla/gcc/config/rs6000/sysv4.h 2011-04-11 20:46:05.000000000 +0200 ++++ gcc-4.7.0/gcc/config/rs6000/sysv4.h 2012-05-18 10:56:49.988593089 +0200 +@@ -785,7 +785,12 @@ + %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ + %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" + +-#ifdef HAVE_LD_PIE ++#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) ++#define STARTFILE_LINUX_SPEC "\ ++%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ ++%{mnewlib:ecrti.o%s;:crti.o%s} \ ++%{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" ++#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) + #define STARTFILE_LINUX_SPEC "\ + %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ + %{mnewlib:ecrti.o%s;:crti.o%s} \ +diff -Nur gcc-4.7.0-vanilla/gcc/config.in gcc-4.7.0/gcc/config.in +--- gcc-4.7.0-vanilla/gcc/config.in 2012-03-22 08:37:39.000000000 +0100 ++++ gcc-4.7.0/gcc/config.in 2012-05-18 10:53:34.954355771 +0200 +@@ -58,6 +58,12 @@ + #endif + + ++/* Define to 1 to enable crtbeginP.o. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_CRTBEGINP ++#endif ++ ++ + /* Define to 1 to specify that we are using the BID decimal floating point + format instead of DPD */ + #ifndef USED_FOR_TARGET +@@ -77,6 +83,18 @@ + #endif + + ++/* Define to 1 to enable esp. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_ESP ++#endif ++ ++ ++/* Define to 1 to enable esp. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_ESP_SSP ++#endif ++ ++ + /* Define to 1 to enable fixed-point arithmetic extension to C. */ + #ifndef USED_FOR_TARGET + #undef ENABLE_FIXED_POINT +diff -Nur gcc-4.7.0-vanilla/gcc/configure gcc-4.7.0/gcc/configure +--- gcc-4.7.0-vanilla/gcc/configure 2012-03-08 14:54:54.000000000 +0100 ++++ gcc-4.7.0/gcc/configure 2012-05-18 10:53:11.651610539 +0200 +@@ -600,6 +600,8 @@ + + ac_subst_vars='LTLIBOBJS + LIBOBJS ++enable_esp ++enable_crtbeginP + enable_plugin + pluginlibs + CLOOGINC +@@ -917,6 +919,7 @@ + enable_plugin + enable_libquadmath_support + with_linker_hash_style ++enable_esp + ' + ac_precious_vars='build_alias + host_alias +@@ -1630,6 +1633,11 @@ + --enable-plugin enable plugin support + --disable-libquadmath-support + disable libquadmath support for Fortran ++ --enable-esp Enable Stack protector, Position independent ++ executable and Fortify_sources as default if we have ++ suppot for it when compiling and link -z now as ++ default. Linux targets supported i*86, x86_64, ++ x86_x32, powerpc, powerpc64, ia64, mips and arm + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -27404,6 +27412,113 @@ + + fi + ++# -------------- ++# Esp checks ++# -------------- ++ ++# Check whether --enable-esp was given and target have the support. ++# Check whether --enable-esp was given. ++if test "${enable_esp+set}" = set; then : ++ enableval=$enable_esp; set_enable_esp=$enableval ++else ++ set_enable_esp=no ++fi ++ ++if test $set_enable_esp = yes ; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $target support esp" >&5 ++$as_echo_n "checking if $target support esp... " >&6; } ++if test $set_enable_esp = yes ; then ++ case "$target" in ++ i?86*-*-linux* | x86_??*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux* | mips*-*-linux*) ++ enable_esp=yes ++ ++$as_echo "#define ENABLE_ESP 1" >>confdefs.h ++ ++ ;; ++ *) ++ enable_esp=no ++ ;; ++ esac ++else ++ enable_esp=no ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_esp" >&5 ++$as_echo "$enable_esp" >&6; } ++fi ++ ++if test $enable_esp = yes ; then ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can default to use -fstack-protector" >&5 ++$as_echo_n "checking if we can default to use -fstack-protector... " >&6; } ++ ssp_link_test=no ++ if test x$gcc_cv_libc_provides_ssp = xyes && test x$set_have_as_tls = yes; then ++ if $EGREP '^ *#[ ]*define[ ]+__UCLIBC__[ ]+1' \ ++ $target_header_dir/features.h > /dev/null; then ++ if test -f $target_header_dir/bits/uClibc_config.h && \ ++ $EGREP '^ *#[ ]*define[ ]+__UCLIBC_SUBLEVEL__[ ]+([3-9][2-9]|[4-9][0-9])' \ ++ $target_header_dir/bits/uClibc_config.h > /dev/null && \ ++ $EGREP '^ *#[ ]*define[ ]+__UCLIBC_HAS_TLS__[ ]+1' \ ++ $target_header_dir/bits/uClibc_config.h > /dev/null; then ++ ssp_link_test=yes ++ fi ++ else ++ ssp_link_test=yes ++ fi ++ fi ++ if test x$ssp_link_test=xyes ; then ++ saved_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -O2 -fstack-protector -Werror" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; }; enable_esp_ssp=yes ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; }; enable_esp_ssp=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ CFLAGS="$saved_CFLAGS" ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ enable_esp_ssp=no ++ fi ++ if test $enable_esp_ssp = yes ; then ++ ++$as_echo "#define ENABLE_ESP_SSP 1" >>confdefs.h ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for crtbeginP.o support" >&5 ++$as_echo_n "checking checking for crtbeginP.o support... " >&6; } ++ case "$target" in ++ ia64*-*-linux*) ++ enable_crtbeginP=no ;; ++ *-*-linux*) ++ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then ++ enable_crtbeginP=yes ++ ++$as_echo "#define ENABLE_CRTBEGINP 1" >>confdefs.h ++ ++ fi ++ ;; ++ *) enable_crtbeginP=no ;; ++ esac ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_crtbeginP" >&5 ++$as_echo "$enable_crtbeginP" >&6; } ++ ++fi ++ + # Configure the subdirectories + # AC_CONFIG_SUBDIRS($subdirs) + +diff -Nur gcc-4.7.0-vanilla/gcc/cp/lang-specs.h gcc-4.7.0/gcc/cp/lang-specs.h +--- gcc-4.7.0-vanilla/gcc/cp/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 ++++ gcc-4.7.0/gcc/cp/lang-specs.h 2012-05-18 10:54:40.279444906 +0200 +@@ -47,7 +47,7 @@ + %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ + cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ + %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2\ ++ %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\ + %W{o*:--output-pch=%*}}%V}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, +@@ -58,7 +58,7 @@ + %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ + cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ + %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2\ ++ %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {".ii", "@c++-cpp-output", 0, 0, 0}, +diff -Nur gcc-4.7.0-vanilla/gcc/doc/invoke.texi gcc-4.7.0/gcc/doc/invoke.texi +--- gcc-4.7.0-vanilla/gcc/doc/invoke.texi 2012-03-14 00:18:07.000000000 +0100 ++++ gcc-4.7.0/gcc/doc/invoke.texi 2012-05-18 10:56:59.156886298 +0200 +@@ -8479,6 +8479,11 @@ + @opindex fstack-protector-all + Like @option{-fstack-protector} except that all functions are protected. + ++NOTE: When --enable-esp this option is enabled by default ++for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector} ++or @option{-nostdlib} or @option{-nodefaultlibs} or ++@option{-fstack-protector} are found. ++ + @item -fsection-anchors + @opindex fsection-anchors + Try to reduce the number of symbolic address calculations by using +@@ -9457,6 +9462,12 @@ + that were used to generate code (@option{-fpie}, @option{-fPIE}, + or model suboptions) when you specify this option. + ++NOTE: When --enable-esp this option is enabled by default ++for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} ++or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or ++@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p} ++are found. ++ + @item -rdynamic + @opindex rdynamic + Pass the flag @option{-export-dynamic} to the ELF linker, on targets +@@ -19125,6 +19136,11 @@ + @code{__pie__} and @code{__PIE__}. The macros have the value 1 + for @option{-fpie} and 2 for @option{-fPIE}. + ++NOTE: When --enable-esp this option is enabled by default ++for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} ++or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or ++@option{-nostartfiles} or @option{-shared} are found. ++ + @item -fno-jump-tables + @opindex fno-jump-tables + Do not use jump tables for switch statements even where it would be +diff -Nur gcc-4.7.0-vanilla/gcc/gcc.c gcc-4.7.0/gcc/gcc.c +--- gcc-4.7.0-vanilla/gcc/gcc.c 2012-02-28 18:31:38.000000000 +0100 ++++ gcc-4.7.0/gcc/gcc.c 2012-05-18 10:54:40.279444906 +0200 +@@ -45,6 +45,7 @@ + #include "opts.h" + #include "params.h" + #include "vec.h" ++#include "esp.h" /* for --enable-esp support */ + #include "filenames.h" + + /* By default there is no special suffix for target executables. */ +@@ -705,7 +706,9 @@ + + static const char *asm_debug; + static const char *cpp_spec = CPP_SPEC; ++#ifndef ENABLE_ESP + static const char *cc1_spec = CC1_SPEC; ++#endif + static const char *cc1plus_spec = CC1PLUS_SPEC; + static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; + static const char *link_ssp_spec = LINK_SSP_SPEC; +@@ -767,7 +770,7 @@ + static const char *cpp_options = + "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ + %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ +- %{undef} %{save-temps*:-fpch-preprocess}"; ++ %{undef} %{save-temps*:-fpch-preprocess} %(esp_cpp_options)"; + + /* This contains cpp options which are not passed when the preprocessor + output will be used by another program. */ +@@ -946,9 +949,9 @@ + %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ + %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ + cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ +- %(cc1_options)}\ ++ %(cc1_options) %(esp_options)}\ + %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ +- cc1 %(cpp_unique_options) %(cc1_options)}}}\ ++ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, + {"-", + "%{!E:%e-E or -x required when input is from standard input}\ +@@ -971,7 +974,7 @@ + %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, + {".i", "@cpp-output", 0, 0, 0}, + {"@cpp-output", +- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(esp_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {".s", "@assembler", 0, 0, 0}, + {"@assembler", + "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, +@@ -1225,18 +1228,23 @@ + INIT_STATIC_SPEC ("self_spec", &self_spec), + }; + +-#ifdef EXTRA_SPECS /* additional specs needed */ ++/* EXTRA_SPECS needs to be defined */ ++#ifndef EXTRA_SPECS ++#define EXTRA_SPECS ++#endif ++ ++/* EXTRA_SPECS and ESP_EXTRA_SPECS add additional specs */ + /* Structure to keep track of just the first two args of a spec_list. +- That is all that the EXTRA_SPECS macro gives us. */ ++ That is all that the EXTRA_SPECS and ESP_EXTRA_SPECS macro gives us. */ + struct spec_list_1 + { + const char *const name; + const char *const ptr; + }; + +-static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS }; ++/* ESP_EXTRA_SPECS before EXTRA_SPECS */ ++static const struct spec_list_1 extra_specs_1[] = { ESP_EXTRA_SPECS, EXTRA_SPECS }; + static struct spec_list *extra_specs = (struct spec_list *) 0; +-#endif + + /* List of dynamically allocates specs that have been defined so far. */ + +@@ -1328,7 +1336,6 @@ + if (verbose_flag) + fnotice (stderr, "Using built-in specs.\n"); + +-#ifdef EXTRA_SPECS + extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1)); + + for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--) +@@ -1341,7 +1348,6 @@ + sl->ptr_spec = &sl->ptr; + next = sl; + } +-#endif + + for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--) + { +@@ -6449,6 +6455,12 @@ + gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str, + spec_version, dir_separator_str, NULL); + ++#ifdef ENABLE_ESP ++ /* Process ESP_COMMAND_OPTIONS_SPEC, adding any new options to the end ++ of the command line. */ ++ do_self_spec (esp_command_options_spec); ++#endif ++ + /* Now we have the specs. + Set the `valid' bits for switches that match anything in any spec. */ + +diff -Nur gcc-4.7.0-vanilla/gcc/Makefile.in gcc-4.7.0/gcc/Makefile.in +--- gcc-4.7.0-vanilla/gcc/Makefile.in 2012-03-07 11:59:56.000000000 +0100 ++++ gcc-4.7.0/gcc/Makefile.in 2012-05-18 10:54:00.275165546 +0200 +@@ -247,6 +247,14 @@ + endif + endif + ++# We don't want to compile the compiler with -fPIE, it make PCH fail. ++enable_esp = @enable_esp@ ++ifeq ($(enable_esp),yes) ++ESP_NOPIE_CFLAGS = -fno-PIE ++else ++ESP_NOPIE_CFLAGS= ++endif ++ + # ------------------------------------------- + # Programs which operate on the build machine + # ------------------------------------------- +@@ -975,12 +983,13 @@ + + # This is the variable actually used when we compile. If you change this, + # you probably want to update BUILD_CFLAGS in configure.ac +-ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \ ++ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \ + $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ + + # The C++ version. +-ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ +- $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) @DEFS@ ++ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) \ ++ $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) \ ++ $(WARN_CXXFLAGS) @DEFS@ + + # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro + # puts -I options in CPPFLAGS, our include files in the srcdir will always +@@ -1815,6 +1824,8 @@ + echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars + echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars + echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars ++ echo enable_esp = '$(enable_esp)' >> tmp-libgcc.mvars ++ echo enable_crtbeginP = '@enable_crtbeginP@' >> tmp-libgcc.mvars + + mv tmp-libgcc.mvars libgcc.mvars + +diff -Nur gcc-4.7.0-vanilla/gcc/objc/lang-specs.h gcc-4.7.0/gcc/objc/lang-specs.h +--- gcc-4.7.0-vanilla/gcc/objc/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 ++++ gcc-4.7.0/gcc/objc/lang-specs.h 2012-05-18 10:54:40.281444970 +0200 +@@ -30,9 +30,9 @@ + %{traditional|traditional-cpp:\ + %eGNU Objective C no longer supports traditional compilation}\ + %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ +- cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ ++ cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}\ + %{!save-temps*:%{!no-integrated-cpp:\ +- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ ++ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {"@objective-c-header", + "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ +@@ -41,18 +41,18 @@ + %{traditional|traditional-cpp:\ + %eGNU Objective C no longer supports traditional compilation}\ + %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ +- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ cc1obj -fpreprocessed %b.mi %(cc1_options)%(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + -o %g.s %{!o*:--output-pch=%i.gch}\ + %W{o*:--output-pch=%*}%V}\ + %{!save-temps*:%{!no-integrated-cpp:\ +- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + -o %g.s %{!o*:--output-pch=%i.gch}\ + %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, + {".mi", "@objective-c-cpp-output", 0, 0, 0}, + {"@objective-c-cpp-output", +- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {"@objc-cpp-output", + "%nobjc-cpp-output is deprecated; please use objective-c-cpp-output instead\n\ +- %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff -Nur gcc-4.7.0-vanilla/gcc/objcp/lang-specs.h gcc-4.7.0/gcc/objcp/lang-specs.h +--- gcc-4.7.0-vanilla/gcc/objcp/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 ++++ gcc-4.7.0/gcc/objcp/lang-specs.h 2012-05-18 10:54:40.281444969 +0200 +@@ -36,7 +36,7 @@ + %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ + cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ + %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2\ ++ %(cc1_options) %(esp_options) %2\ + -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {"@objective-c++", +@@ -46,16 +46,16 @@ + %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ + cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ + %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2\ ++ %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {".mii", "@objective-c++-cpp-output", 0, 0, 0}, + {"@objective-c++-cpp-output", + "%{!M:%{!MM:%{!E:\ +- cc1objplus -fpreprocessed %i %(cc1_options) %2\ ++ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {"@objc++-cpp-output", + "%nobjc++-cpp-output is deprecated; please use objective-c++-cpp-output instead\n\ + %{!M:%{!MM:%{!E:\ +- cc1objplus -fpreprocessed %i %(cc1_options) %2\ ++ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff -Nur gcc-4.7.0-vanilla/gcc/varasm.c gcc-4.7.0/gcc/varasm.c +--- gcc-4.7.0-vanilla/gcc/varasm.c 2012-02-20 12:47:25.000000000 +0100 ++++ gcc-4.7.0/gcc/varasm.c 2012-05-18 10:55:21.633767441 +0200 +@@ -6186,7 +6186,11 @@ + bool is_local; + + is_local = targetm.binds_local_p (decl); +- if (!flag_shlib) ++ #ifdef ENABLE_ESP ++ if (!flag_pic) ++ #else ++ if (!flag_shlib) ++ #endif + { + if (is_local) + kind = TLS_MODEL_LOCAL_EXEC; +diff -Nur gcc-4.7.0-vanilla/libgcc/Makefile.in gcc-4.7.0/libgcc/Makefile.in +--- gcc-4.7.0-vanilla/libgcc/Makefile.in 2011-11-22 04:01:02.000000000 +0100 ++++ gcc-4.7.0/libgcc/Makefile.in 2012-05-18 10:54:00.276165578 +0200 +@@ -219,6 +219,17 @@ + DECNUMINC = + endif + ++ifeq ($(enable_esp),yes) ++ESP_NOPIE_CFLAGS = -fno-PIE ++else ++ESP_NOPIE_CFLAGS= ++endif ++ ++# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes ++ifeq ($(enable_crtbeginP),yes) ++EXTRA_PARTS += crtbeginP.o ++endif ++ + # Options to use when compiling libgcc2.a. + # + LIBGCC2_DEBUG_CFLAGS = -g +@@ -279,7 +290,7 @@ + CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ +- -fno-stack-protector \ ++ -fno-stack-protector $(ESP_NOPIE_CFLAGS) \ + $(INHIBIT_LIBC_CFLAGS) + + # Extra flags to use when compiling crt{begin,end}.o. +@@ -966,6 +977,13 @@ + # This is a version of crtbegin for -static links. + crtbeginT$(objext): $(srcdir)/crtstuff.c + $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN -DCRTSTUFFT_O ++ ++# This is a version of crtbegin for -static -fPIE links. ++ifeq ($(enable_crtbeginP),yes) ++crtbeginP$(objext): $(srcdir)/crtstuff.c ++ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ ++ -c $< -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O ++endif + endif + + ifeq ($(CUSTOM_CRTIN),) +diff -Nur gcc-4.7.0-vanilla/Makefile.in gcc-4.7.0/Makefile.in +--- gcc-4.7.0-vanilla/Makefile.in 2012-01-02 11:59:04.000000000 +0100 ++++ gcc-4.7.0/Makefile.in 2012-05-18 10:54:00.273165482 +0200 +@@ -362,9 +362,17 @@ + BUILD_PREFIX = @BUILD_PREFIX@ + BUILD_PREFIX_1 = @BUILD_PREFIX_1@ + ++# Some stuff don't compile with SSP ++enable_esp = @enable_esp@ ++ifeq ($(enable_esp),yes) ++ESP_NOSSP_CFLAGS = -fno-stack-protector ++else ++ESP_NOSSP_CFLAGS= ++endif ++ + # Flags to pass to stage2 and later makes. They are defined + # here so that they can be overridden by Makefile fragments. +-BOOT_CFLAGS= -g -O2 ++BOOT_CFLAGS= -g -O2 $(ESP_NOSSP_CFLAGS) + BOOT_LDFLAGS= + BOOT_ADAFLAGS=-gnatpg -gnata + +@@ -410,9 +418,9 @@ + + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ +-LIBCFLAGS = $(CFLAGS) ++LIBCFLAGS = $(CFLAGS) $(ESP_NOSSP_CFLAGS) + CXXFLAGS = @CXXFLAGS@ +-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates ++LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESP_NOSSP_CFLAGS) + GOCFLAGS = $(CFLAGS) + + TFLAGS = diff --git a/gcc/patches/gcc46-Woverlength-string-asm.patch0 b/gcc/patches/gcc46-Woverlength-string-asm.patch0 deleted file mode 100644 index 47aae37..0000000 --- a/gcc/patches/gcc46-Woverlength-string-asm.patch0 +++ /dev/null @@ -1,180 +0,0 @@ -2011-02-02 Tom Tromey tromey@redhat.com - - * c-parser.c (c_parser_asm_string_literal): Clear - warn_overlength_strings. - - * gcc.dg/Woverlength-strings-pedantic-c90-asm.c: New file. - * gcc.dg/Woverlength-strings-pedantic-c89-asm.c: New file. - * gcc.dg/Woverlength-strings-pedantic-c99-asm.c: New file. - ---- gcc/c-parser.c -+++ gcc/c-parser.c -@@ -3264,6 +3264,8 @@ static tree - c_parser_asm_string_literal (c_parser *parser) - { - tree str; -+ int save_flag = warn_overlength_strings; -+ warn_overlength_strings = 0; - if (c_parser_next_token_is (parser, CPP_STRING)) - { - str = c_parser_peek_token (parser)->value; -@@ -3281,6 +3283,7 @@ c_parser_asm_string_literal (c_parser *parser) - c_parser_error (parser, "expected string literal"); - str = NULL_TREE; - } -+ warn_overlength_strings = save_flag; - return str; - } - ---- gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c89-asm.c -+++ gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c89-asm.c -@@ -0,0 +1,47 @@ -+/* -Woverlength-strings complains about string constants which are too long -+ for the C standard's "minimum maximum" limits. It is off by default, -+ but implied by -pedantic. */ -+ -+/* { dg-options "-std=c89 -pedantic" } */ -+ -+#define TEN " " -+#define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN -+#define THO HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN -+ -+/* C89's minimum-maximum is 509. */ -+__asm__ (HUN HUN HUN HUN HUN TEN); -+ -+/* C99's minimum-maximum is 4095. */ -+__asm__ ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456"); -+ -+void -+f (void) -+{ -+ /* C89's minimum-maximum is 509. */ -+ __asm__ (HUN HUN HUN HUN HUN TEN); -+ __asm__ (HUN HUN HUN HUN HUN TEN : : ); -+ __asm__ goto (HUN HUN HUN HUN HUN TEN : : : : label); -+ -+ /* C99's minimum-maximum is 4095. */ -+ __asm__ ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456"); -+ __asm__ ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456" : : ); -+ __asm__ goto ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456" : : : : label); -+ -+ label: ; -+} ---- gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c90-asm.c -+++ gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c90-asm.c -@@ -0,0 +1,48 @@ -+/* -Woverlength-strings complains about string constants which are too long -+ for the C standard's "minimum maximum" limits. It is off by default, -+ but implied by -pedantic. */ -+ -+/* { dg-options "-std=c90 -pedantic" } */ -+ -+#define TEN " " -+#define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN -+#define THO HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN -+ -+/* C89's minimum-maximum is 509. */ -+__asm__ (HUN HUN HUN HUN HUN TEN); -+ -+/* C99's minimum-maximum is 4095. */ -+__asm__ ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456"); -+ -+void -+f (void) -+{ -+ /* C89's minimum-maximum is 509. */ -+ __asm__ (HUN HUN HUN HUN HUN TEN); -+ __asm__ (HUN HUN HUN HUN HUN TEN : :); -+ __asm__ goto (HUN HUN HUN HUN HUN TEN : : : : label); -+ -+ /* C99's minimum-maximum is 4095. */ -+ __asm__ ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456"); -+ __asm__ ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456" : :); -+ __asm__ goto ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456" : : : : label); -+ -+ label: ; -+} -+ ---- gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c99-asm.c -+++ gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c99-asm.c -@@ -0,0 +1,48 @@ -+/* -Woverlength-strings complains about string constants which are too long -+ for the C standard's "minimum maximum" limits. It is off by default, -+ but implied by -pedantic. */ -+ -+/* { dg-options "-std=c99 -pedantic" } */ -+ -+#define TEN " " -+#define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN -+#define THO HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN -+ -+/* C89's minimum-maximum is 509. */ -+__asm__ (HUN HUN HUN HUN HUN TEN); -+ -+/* C99's minimum-maximum is 4095. */ -+__asm__ ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456"); -+ -+void -+f (void) -+{ -+ /* C89's minimum-maximum is 509. */ -+ __asm__ (HUN HUN HUN HUN HUN TEN); -+ __asm__ (HUN HUN HUN HUN HUN TEN : :); -+ __asm__ goto (HUN HUN HUN HUN HUN TEN : : : : label); -+ -+ /* C99's minimum-maximum is 4095. */ -+ __asm__ ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456"); -+ __asm__ ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456" : :); -+ __asm__ goto ( -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456" : : : : label); -+ -+ label: ; -+} -+ diff --git a/gcc/patches/gcc46-Woverlength-string.patch0 b/gcc/patches/gcc46-Woverlength-string.patch0 deleted file mode 100644 index cda5cbf..0000000 --- a/gcc/patches/gcc46-Woverlength-string.patch0 +++ /dev/null @@ -1,103 +0,0 @@ -2011-01-18 Tom Tromey tromey@redhat.com - - * c-parser.c (disable_extension_diagnostics): Save - warn_overlength_strings. - (restore_extension_diagnostics): Restore warn_overlength_strings. - - * gcc.dg/Woverlength-strings-pedantic-c89-ext.c: New file. - * gcc.dg/Woverlength-strings-pedantic-c90-ext.c: New file. - * gcc.dg/Woverlength-strings-pedantic-c99-ext.c: New file. - ---- gcc/c-parser.c (revision 168933) -+++ gcc/c-parser.c (working copy) -@@ -1045,13 +1045,15 @@ - | (warn_traditional << 2) - | (flag_iso << 3) - | (warn_long_long << 4) -- | (warn_cxx_compat << 5)); -+ | (warn_cxx_compat << 5) -+ | (warn_overlength_strings << 6)); - cpp_opts->cpp_pedantic = pedantic = 0; - warn_pointer_arith = 0; - cpp_opts->cpp_warn_traditional = warn_traditional = 0; - flag_iso = 0; - cpp_opts->cpp_warn_long_long = warn_long_long = 0; - warn_cxx_compat = 0; -+ warn_overlength_strings = 0; - return ret; - } - -@@ -1067,6 +1069,7 @@ - flag_iso = (flags >> 3) & 1; - cpp_opts->cpp_warn_long_long = warn_long_long = (flags >> 4) & 1; - warn_cxx_compat = (flags >> 5) & 1; -+ warn_overlength_strings = (flags >> 6) & 1; - } - - /* Possibly kinds of declarator to parse. */ ---- gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c89-ext.c (revision 0) -+++ gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c89-ext.c (revision 0) -@@ -0,0 +1,19 @@ -+/* -Woverlength-strings complains about string constants which are too long -+ for the C standard's "minimum maximum" limits. It is off by default, -+ but implied by -pedantic. */ -+ -+/* { dg-options "-std=c89 -pedantic" } */ -+ -+#define TEN "xxxxxxxxxx" -+#define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN -+#define THO HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN -+ -+/* C89's minimum-maximum is 509. */ -+const char x510[] = __extension__ HUN HUN HUN HUN HUN TEN; -+ -+/* C99's minimum-maximum is 4095. */ -+const char x4096[] = __extension__ -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456"; ---- gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c90-ext.c (revision 0) -+++ gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c90-ext.c (revision 0) -@@ -0,0 +1,19 @@ -+/* -Woverlength-strings complains about string constants which are too long -+ for the C standard's "minimum maximum" limits. It is off by default, -+ but implied by -pedantic. */ -+ -+/* { dg-options "-std=c90 -pedantic" } */ -+ -+#define TEN "xxxxxxxxxx" -+#define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN -+#define THO HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN -+ -+/* C89's minimum-maximum is 509. */ -+const char x510[] = __extension__ HUN HUN HUN HUN HUN TEN; -+ -+/* C99's minimum-maximum is 4095. */ -+const char x4096[] = __extension__ -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456"; ---- gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c99-ext.c (revision 0) -+++ gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c99-ext.c (revision 0) -@@ -0,0 +1,19 @@ -+/* -Woverlength-strings complains about string constants which are too long -+ for the C standard's "minimum maximum" limits. It is off by default, -+ but implied by -pedantic. */ -+ -+/* { dg-options "-std=c99 -pedantic" } */ -+ -+#define TEN "xxxxxxxxxx" -+#define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN -+#define THO HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN -+ -+/* C89's minimum-maximum is 509. */ -+const char x510[] = HUN HUN HUN HUN HUN TEN; -+ -+/* C99's minimum-maximum is 4095. */ -+const char x4096[] = __extension__ -+ THO THO THO THO /* 4000 */ -+ TEN TEN TEN TEN TEN /* 4050 */ -+ TEN TEN TEN TEN /* 4090 */ -+ "123456"; diff --git a/gcc/patches/gcc46-c++-builtin-redecl.patch0 b/gcc/patches/gcc46-c++-builtin-redecl.patch0 deleted file mode 100644 index 1f36f1f..0000000 --- a/gcc/patches/gcc46-c++-builtin-redecl.patch0 +++ /dev/null @@ -1,102 +0,0 @@ -2007-10-02 Jakub Jelinek jakub@redhat.com - - * decl.c (duplicate_decls): When redeclaring a builtin function, - keep the merged decl builtin whenever types match, even if new - decl defines a function. - - * gcc.dg/builtins-65.c: New test. - * g++.dg/ext/builtin10.C: New test. - ---- gcc/cp/decl.c.jj 2007-10-01 22:11:09.000000000 +0200 -+++ gcc/cp/decl.c 2007-10-02 11:39:46.000000000 +0200 -@@ -2001,23 +2001,21 @@ duplicate_decls (tree newdecl, tree oldd - DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl); - DECL_RESULT (olddecl) = DECL_RESULT (newdecl); - } -+ /* If redeclaring a builtin function, it stays built in. */ -+ if (types_match && DECL_BUILT_IN (olddecl)) -+ { -+ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl); -+ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl); -+ /* If we're keeping the built-in definition, keep the rtl, -+ regardless of declaration matches. */ -+ COPY_DECL_RTL (olddecl, newdecl); -+ } - if (new_defines_function) - /* If defining a function declared with other language - linkage, use the previously declared language linkage. */ - SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl)); - else if (types_match) - { -- /* If redeclaring a builtin function, and not a definition, -- it stays built in. */ -- if (DECL_BUILT_IN (olddecl)) -- { -- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl); -- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl); -- /* If we're keeping the built-in definition, keep the rtl, -- regardless of declaration matches. */ -- COPY_DECL_RTL (olddecl, newdecl); -- } -- - DECL_RESULT (newdecl) = DECL_RESULT (olddecl); - /* Don't clear out the arguments if we're just redeclaring a - function. */ ---- gcc/testsuite/gcc.dg/builtins-65.c.jj 2007-10-02 11:23:51.000000000 +0200 -+++ gcc/testsuite/gcc.dg/builtins-65.c 2007-10-02 11:24:12.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* { dg-do compile } */ -+/* { dg-options "-O2" } */ -+ -+typedef __SIZE_TYPE__ size_t; -+extern void __chk_fail (void); -+extern int snprintf (char *, size_t, const char *, ...); -+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...) -+{ -+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b) -+ __chk_fail (); -+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ()); -+} -+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf"); -+ -+char buf[10]; -+ -+int -+main (void) -+{ -+ snprintf (buf, 10, "%d%d\n", 10, 10); -+ return 0; -+} -+ -+/* { dg-final { scan-assembler "mysnprintf" } } */ -+/* { dg-final { scan-assembler-not "__chk_fail" } } */ ---- gcc/testsuite/g++.dg/ext/builtin10.C.jj 2007-10-02 11:19:45.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/builtin10.C 2007-10-02 11:23:26.000000000 +0200 -@@ -0,0 +1,27 @@ -+// { dg-do compile } -+// { dg-options "-O2" } -+ -+typedef __SIZE_TYPE__ size_t; -+extern "C" { -+extern void __chk_fail (void); -+extern int snprintf (char *, size_t, const char *, ...); -+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...) -+{ -+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b) -+ __chk_fail (); -+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ()); -+} -+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf"); -+} -+ -+char buf[10]; -+ -+int -+main (void) -+{ -+ snprintf (buf, 10, "%d%d\n", 10, 10); -+ return 0; -+} -+ -+// { dg-final { scan-assembler "mysnprintf" } } -+// { dg-final { scan-assembler-not "__chk_fail" } } diff --git a/gcc/patches/gcc46-cloog-dl.patch0 b/gcc/patches/gcc46-cloog-dl.patch0 deleted file mode 100644 index 11ce82b..0000000 --- a/gcc/patches/gcc46-cloog-dl.patch0 +++ /dev/null @@ -1,459 +0,0 @@ -2011-01-04 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_CLOOG_UTIL_H, GRAPHITE_POLY_H): New. - (graphite*.o): Adjust dependencies. - * graphite-cloog-compat.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-poly.h: Include graphite-cloog-util.h. - ---- gcc/Makefile.in.jj 2011-01-03 13:44:14.163900902 +0100 -+++ gcc/Makefile.in 2011-01-04 17:48:53.588775911 +0100 -@@ -984,6 +984,8 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plug - PLUGIN_H = plugin.h $(GCC_PLUGIN_H) - PLUGIN_VERSION_H = plugin-version.h configargs.h - LIBFUNCS_H = libfuncs.h $(HASHTAB_H) -+GRAPHITE_CLOOG_UTIL_H = graphite-cloog-util.h graphite-cloog-compat.h -+GRAPHITE_POLY_H = graphite-poly.h $(GRAPHITE_CLOOG_UTIL_H) - - # - # Now figure out from those variables how to compile and link. -@@ -1037,7 +1039,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),-ldl) $(PLUGINLIBS) $(HOST_LIBS) \ - $(ZLIB) - # Any system libraries needed just for GNAT. - SYSLIBS = @GNAT_LIBEXC@ -@@ -2668,40 +2670,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYS - $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) tree-pass.h value-prof.h - graphite.o : graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \ - $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h \ -- $(DBGCNT_H) graphite-ppl.h graphite-poly.h graphite-scop-detection.h \ -+ $(DBGCNT_H) graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h \ - graphite-clast-to-gimple.h graphite-sese-to-poly.h - graphite-blocking.o : graphite-blocking.c $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \ -- sese.h graphite-ppl.h graphite-poly.h -+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) - graphite-clast-to-gimple.o : graphite-clast-to-gimple.c $(CONFIG_H) \ - $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \ -- $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-cloog-util.h \ -- graphite-ppl.h graphite-poly.h graphite-clast-to-gimple.h \ -+ $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h $(GRAPHITE_CLOOG_UTIL_H) \ -+ graphite-ppl.h $(GRAPHITE_POLY_H) graphite-clast-to-gimple.h \ - graphite-dependences.h graphite-cloog-compat.h - graphite-cloog-util.o : graphite-cloog-util.c $(CONFIG_H) $(SYSTEM_H) \ -- coretypes.h graphite-cloog-util.h graphite-cloog-compat.h -+ coretypes.h $(GRAPHITE_CLOOG_UTIL_H) graphite-cloog-compat.h - graphite-dependences.o : graphite-dependences.c $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \ -- sese.h graphite-ppl.h graphite-poly.h graphite-dependences.h \ -- graphite-cloog-util.h -+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-dependences.h \ -+ $(GRAPHITE_CLOOG_UTIL_H) - graphite-flattening.o : graphite-flattening.c $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \ -- sese.h graphite-ppl.h graphite-poly.h -+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) - graphite-interchange.o : graphite-interchange.c $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \ -- sese.h graphite-ppl.h graphite-poly.h -+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) - graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) gimple-pretty-print.h \ -- $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h graphite-poly.h \ -- graphite-dependences.h graphite-cloog-util.h -+ $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \ -+ graphite-dependences.h $(GRAPHITE_CLOOG_UTIL_H) - graphite-ppl.o : graphite-ppl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ -- graphite-cloog-util.h graphite-ppl.h -+ $(GRAPHITE_CLOOG_UTIL_H) graphite-ppl.h - graphite-scop-detection.o : graphite-scop-detection.c $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H) \ -- sese.h graphite-ppl.h graphite-poly.h graphite-scop-detection.h -+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h - graphite-sese-to-poly.o : graphite-sese-to-poly.c $(CONFIG_H) \ - $(SYSTEM_H) coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) \ -- $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h graphite-poly.h \ -+ $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \ - graphite-sese-to-poly.h - tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \ -@@ -3482,6 +3484,11 @@ $(out_object_file): $(out_file) $(CONFIG - $(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 $@ \ ---- gcc/graphite-cloog-compat.h.jj 2011-01-03 12:53:05.000000000 +0100 -+++ gcc/graphite-cloog-compat.h 2011-01-04 17:34:09.857757544 +0100 -@@ -272,4 +272,277 @@ static inline int cloog_matrix_nrows (Cl - return m->NbRows; - } - #endif /* CLOOG_ORG */ -+ -+#include <dlfcn.h> -+#if PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11 -+#define DYNSYMS_PPL11 -+#else -+#define DYNSYMS_PPL11 \ -+ DYNSYM (ppl_new_PIP_Problem_from_constraints); \ -+ DYNSYM (ppl_PIP_Problem_is_satisfiable); \ -+ DYNSYM (ppl_delete_PIP_Problem); -+#endif -+#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); \ -+ DYNSYM (ppl_delete_Constraint_System); \ -+ DYNSYM (ppl_initialize); \ -+ DYNSYM (ppl_new_Constraint_System_from_Constraint); \ -+ DYNSYM (ppl_new_C_Polyhedron_from_Constraint_System); \ -+ DYNSYM (ppl_Polyhedron_affine_image); \ -+ DYNSYM (ppl_io_fprint_Pointset_Powerset_C_Polyhedron); \ -+ DYNSYMS_PPL11 -+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) -+#ifndef CLOOG_ORG -+#undef cloog_loop_malloc -+#define cloog_loop_malloc(STATE) (*cloog_pointers__.p_cloog_loop_malloc) () -+#else -+#define cloog_loop_malloc (*cloog_pointers__.p_cloog_loop_malloc) -+#endif -+#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) -+#ifndef CLOOG_ORG -+#undef cloog_options_malloc -+#define cloog_options_malloc(STATE) (*cloog_pointers__.p_cloog_options_malloc) () -+#undef cloog_program_dump_cloog -+#define cloog_program_dump_cloog(DUMPFILE, PROGRAM, SCATTERINGLIST) \ -+ (*cloog_pointers__.p_cloog_program_dump_cloog) (DUMPFILE, PROGRAM) -+#undef cloog_program_extract_scalars -+#define cloog_program_extract_scalars(PROG, SCATT, OPT) \ -+ (*cloog_pointers__.p_cloog_program_extract_scalars) (PROG, SCATT) -+#else -+#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) -+#endif -+#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) -+#ifndef CLOOG_ORG -+#undef cloog_program_scatter -+#define cloog_program_scatter(PROG, SCATT, OPT) \ -+ (*cloog_pointers__.p_cloog_program_scatter) (PROG, SCATT) -+#undef cloog_statement_alloc -+#define cloog_statement_alloc(STATE, INDEX) \ -+ (*cloog_pointers__.p_cloog_statement_alloc) (INDEX) -+#else -+#define cloog_program_scatter (*cloog_pointers__.p_cloog_program_scatter) -+#define cloog_statement_alloc (*cloog_pointers__.p_cloog_statement_alloc) -+#endif -+#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 ppl_delete_Constraint_System (*cloog_pointers__.p_ppl_delete_Constraint_System) -+#define ppl_initialize (*cloog_pointers__.p_ppl_initialize) -+#define ppl_new_Constraint_System_from_Constraint (*cloog_pointers__.p_ppl_new_Constraint_System_from_Constraint) -+#define ppl_new_C_Polyhedron_from_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_Constraint_System) -+#define ppl_Polyhedron_affine_image (*cloog_pointers__.p_ppl_Polyhedron_affine_image) -+#define ppl_io_fprint_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_io_fprint_Pointset_Powerset_C_Polyhedron) -+#if !(PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11) -+#define ppl_new_PIP_Problem_from_constraints (*cloog_pointers__.p_ppl_new_PIP_Problem_from_constraints) -+#define ppl_PIP_Problem_is_satisfiable (*cloog_pointers__.p_ppl_PIP_Problem_is_satisfiable) -+#define ppl_delete_PIP_Problem (*cloog_pointers__.p_ppl_delete_PIP_Problem) -+#endif -+ -+#define cloog_finalize (*cloog_pointers__.p_ppl_finalize) -+ -+ - #endif /* GRAPHITE_CLOOG_COMPAT_H */ ---- gcc/graphite.c.jj 2011-01-03 12:53:05.194056513 +0100 -+++ gcc/graphite.c 2011-01-04 16:18:32.385007767 +0100 -@@ -56,6 +56,35 @@ along with GCC; see the file COPYING3. - - CloogState *cloog_state; - -+__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 -@@ -201,6 +230,12 @@ graphite_initialize (void) - return false; - } - -+ if (!init_cloog_pointers ()) -+ { -+ sorry ("Graphite loop optimizations cannot be used"); -+ return false; -+ } -+ - scev_reset (); - recompute_all_dominators (); - initialize_original_copy_tables (); ---- gcc/graphite-clast-to-gimple.c.jj 2011-01-03 12:53:05.000000000 +0100 -+++ gcc/graphite-clast-to-gimple.c 2011-01-04 16:29:55.738007463 +0100 -@@ -738,10 +738,10 @@ clast_get_body_of_loop (struct clast_stm - from STMT_FOR. */ - - static tree --gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_for, int level, -+gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_fora, int level, - tree lb_type, tree ub_type) - { -- 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); - CloogStatement *cs = body->statement; - poly_bb_p pbb = (poly_bb_p) cloog_statement_usr (cs); ---- gcc/graphite-poly.h.jj 2011-01-03 12:53:05.000000000 +0100 -+++ gcc/graphite-poly.h 2011-01-04 17:35:53.308788629 +0100 -@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. - #ifndef GCC_GRAPHITE_POLY_H - #define GCC_GRAPHITE_POLY_H - -+#include "graphite-cloog-util.h" -+ - typedef struct poly_dr *poly_dr_p; - DEF_VEC_P(poly_dr_p); - DEF_VEC_ALLOC_P (poly_dr_p, heap); diff --git a/gcc/patches/gcc46-hack.patch0 b/gcc/patches/gcc46-hack.patch0 deleted file mode 100644 index 4689ce8..0000000 --- a/gcc/patches/gcc46-hack.patch0 +++ /dev/null @@ -1,114 +0,0 @@ ---- libada/Makefile.in.jj 2009-01-14 12:07:35.000000000 +0100 -+++ libada/Makefile.in 2009-01-15 14:25:33.000000000 +0100 -@@ -69,18 +69,40 @@ version := $(shell cat $(srcdir)/../gcc/ - libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR) - ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR)) - -+DEFAULTMULTIFLAGS := -+ifeq ($(MULTISUBDIR),) -+targ:=$(subst -, ,$(target)) -+arch:=$(word 1,$(targ)) -+ifeq ($(words $(targ)),2) -+osys:=$(word 2,$(targ)) -+else -+osys:=$(word 3,$(targ)) -+endif -+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),) -+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64) -+DEFAULTMULTIFLAGS := -m64 -+else -+ifeq ($(strip $(filter-out s390%, $(arch))),) -+DEFAULTMULTIFLAGS := -m31 -+else -+DEFAULTMULTIFLAGS := -m32 -+endif -+endif -+endif -+endif -+ - # exeext should not be used because it's the *host* exeext. We're building - # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus - # definitions just in case something slips through the safety net provided - # by recursive make invocations in gcc/ada/Makefile.in - LIBADA_FLAGS_TO_PASS = \ - "MAKEOVERRIDES=" \ -- "LDFLAGS=$(LDFLAGS)" \ -+ "LDFLAGS=$(strip $(LDFLAGS) $(DEFAULTMULTIFLAGS))" \ - "LN_S=$(LN_S)" \ - "SHELL=$(SHELL)" \ -- "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \ -- "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \ -- "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \ -+ "GNATLIBFLAGS=$(strip $(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \ -+ "GNATLIBCFLAGS=$(strip $(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \ -+ "GNATLIBCFLAGS_FOR_C=$(strip $(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \ - "TARGET_LIBGCC2_CFLAGS=$(TARGET_LIBGCC2_CFLAGS)" \ - "THREAD_KIND=$(THREAD_KIND)" \ - "TRACE=$(TRACE)" \ -@@ -91,7 +113,7 @@ LIBADA_FLAGS_TO_PASS = \ - "exeext=.exeext.should.not.be.used " \ - 'CC=the.host.compiler.should.not.be.needed' \ - "GCC_FOR_TARGET=$(CC)" \ -- "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" -+ "CFLAGS=$(strip $(CFLAGS) $(DEFAULTMULTIFLAGS) $(WARN_CFLAGS))" - - # Rules to build gnatlib. - .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons ---- gcc/ada/sem_util.adb (revision 161677) -+++ gcc/ada/sem_util.adb (working copy) -@@ -2246,7 +2246,11 @@ - end if; - - elsif Is_Entity_Name (A2) then -+ -+ -- Triggered by -Wall -+ pragma Warnings (Off); - return Denotes_Same_Prefix (A2, A1); -+ pragma Warnings (On); - - elsif Nkind_In (A1, N_Selected_Component, N_Indexed_Component, N_Slice) - and then -@@ -4694,7 +4698,7 @@ - Exp : Node_Id; - Assn : Node_Id; - Choice : Node_Id; -- Comp_Type : Entity_Id; -+ Comp_Type : Entity_Id := Empty; - Is_Array_Aggr : Boolean; - - begin ---- config-ml.in.jj 2010-06-30 09:50:44.000000000 +0200 -+++ config-ml.in 2010-07-02 21:24:17.994211151 +0200 -@@ -516,6 +516,8 @@ multi-do: - ADAFLAGS="$(ADAFLAGS) $${flags}" \ - prefix="$(prefix)" \ - exec_prefix="$(exec_prefix)" \ -+ mandir="$(mandir)" \ -+ infodir="$(infodir)" \ - GCJFLAGS="$(GCJFLAGS) $${flags}" \ - GOCFLAGS="$(GOCFLAGS) $${flags}" \ - CXXFLAGS="$(CXXFLAGS) $${flags}" \ ---- libjava/Makefile.am.jj 2010-07-09 11:17:33.729604090 +0200 -+++ libjava/Makefile.am 2010-07-09 13:16:41.894375641 +0200 -@@ -710,7 +710,8 @@ if USE_LIBGCJ_BC - ## later. - @echo Installing dummy lib libgcj_bc.so.1.0.0; \ - rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ -- mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ -+ $(INSTALL) $(INSTALL_STRIP_FLAG) $(here)/.libs/libgcj_bc.so $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ -+ rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0; \ - $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \ - -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \ - rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \ ---- libjava/Makefile.in.jj 2010-07-09 11:17:34.000000000 +0200 -+++ libjava/Makefile.in 2010-07-09 13:18:07.542572270 +0200 -@@ -12665,7 +12665,8 @@ install-exec-hook: install-binPROGRAMS i - install-libexecsubPROGRAMS - @USE_LIBGCJ_BC_TRUE@ @echo Installing dummy lib libgcj_bc.so.1.0.0; \ - @USE_LIBGCJ_BC_TRUE@ rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ --@USE_LIBGCJ_BC_TRUE@ mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ -+@USE_LIBGCJ_BC_TRUE@ $(INSTALL) $(INSTALL_STRIP_FLAG) $(here)/.libs/libgcj_bc.so $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ -+@USE_LIBGCJ_BC_TRUE@ rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0; \ - @USE_LIBGCJ_BC_TRUE@ $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \ - @USE_LIBGCJ_BC_TRUE@ -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \ - @USE_LIBGCJ_BC_TRUE@ rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \ diff --git a/gcc/patches/gcc46-libgomp-omp_h-multilib.patch0 b/gcc/patches/gcc46-libgomp-omp_h-multilib.patch0 deleted file mode 100644 index d0e98d1..0000000 --- a/gcc/patches/gcc46-libgomp-omp_h-multilib.patch0 +++ /dev/null @@ -1,17 +0,0 @@ -2008-06-09 Jakub Jelinek jakub@redhat.com - - * omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs. - ---- libgomp/omp.h.in.jj 2008-06-09 13:34:05.000000000 +0200 -+++ libgomp/omp.h.in 2008-06-09 13:34:48.000000000 +0200 -@@ -42,8 +42,8 @@ typedef struct - - typedef struct - { -- unsigned char _x[@OMP_NEST_LOCK_SIZE@] -- __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@))); -+ unsigned char _x[8 + sizeof (void *)] -+ __attribute__((__aligned__(sizeof (void *)))); - } omp_nest_lock_t; - #endif - diff --git a/gcc/patches/gcc46-libtool-no-rpath.patch0 b/gcc/patches/gcc46-libtool-no-rpath.patch0 deleted file mode 100644 index 466c661..0000000 --- a/gcc/patches/gcc46-libtool-no-rpath.patch0 +++ /dev/null @@ -1,27 +0,0 @@ -libtool sucks. ---- ltmain.sh.jj 2007-12-07 14:53:21.000000000 +0100 -+++ ltmain.sh 2008-09-05 21:51:48.000000000 +0200 -@@ -5394,6 +5394,7 @@ EOF - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do -+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then -@@ -6071,6 +6072,7 @@ EOF - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do -+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then -@@ -6120,6 +6122,7 @@ EOF - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do -+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then diff --git a/gcc/patches/gcc46-no-add-needed.patch0 b/gcc/patches/gcc46-no-add-needed.patch0 deleted file mode 100644 index 8aac209..0000000 --- a/gcc/patches/gcc46-no-add-needed.patch0 +++ /dev/null @@ -1,52 +0,0 @@ -2010-02-08 Roland McGrath roland@redhat.com - - * config/rs6000/sysv4.h (LINK_EH_SPEC): Pass --no-add-needed to the - linker. - * config/gnu-user.h (LINK_EH_SPEC): Likewise. - * config/alpha/elf.h (LINK_EH_SPEC): Likewise. - * config/ia64/linux.h (LINK_EH_SPEC): Likewise. - ---- gcc/config/alpha/elf.h.jj 2011-01-03 12:52:31.118056764 +0100 -+++ gcc/config/alpha/elf.h 2011-01-04 18:14:10.931874160 +0100 -@@ -438,7 +438,7 @@ extern int alpha_this_gpdisp_sequence_nu - I imagine that other systems will catch up. In the meantime, it - doesn't harm to make sure that the data exists to be used later. */ - #if defined(HAVE_LD_EH_FRAME_HDR) --#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " -+#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " - #endif - - /* A C statement (sans semicolon) to output to the stdio stream STREAM ---- gcc/config/ia64/linux.h.jj 2011-01-03 13:02:11.462994522 +0100 -+++ gcc/config/ia64/linux.h 2011-01-04 18:14:10.931874160 +0100 -@@ -82,7 +82,7 @@ do { \ - Signalize that because we have fde-glibc, we don't need all C shared libs - linked against -lgcc_s. */ - #undef LINK_EH_SPEC --#define LINK_EH_SPEC "" -+#define LINK_EH_SPEC "--no-add-needed " - - #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" - ---- gcc/config/gnu-user.h.jj 2011-01-03 12:53:03.739057299 +0100 -+++ gcc/config/gnu-user.h 2011-01-04 18:14:10.932814884 +0100 -@@ -82,7 +82,7 @@ see the files COPYING3 and COPYING.RUNTI - #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC - - #if defined(HAVE_LD_EH_FRAME_HDR) --#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " -+#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " - #endif - - #undef LINK_GCC_C_SEQUENCE_SPEC ---- gcc/config/rs6000/sysv4.h.jj 2011-01-03 13:02:18.255994215 +0100 -+++ gcc/config/rs6000/sysv4.h 2011-01-04 18:14:10.933888871 +0100 -@@ -869,7 +869,7 @@ extern int fixuplabelno; - -dynamic-linker " LINUX_DYNAMIC_LINKER "}}" - - #if defined(HAVE_LD_EH_FRAME_HDR) --# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " -+# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " - #endif - - #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \ diff --git a/gcc/patches/gcc46-ppl-0.10.patch b/gcc/patches/gcc46-ppl-0.10.patch deleted file mode 100644 index e7c2d87..0000000 --- a/gcc/patches/gcc46-ppl-0.10.patch +++ /dev/null @@ -1,115 +0,0 @@ -diff -Nur gcc-4.6.0-vanilla/configure gcc-4.6.0/configure ---- gcc-4.6.0-vanilla/configure 2011-03-16 19:27:36.000000000 +0100 -+++ gcc-4.6.0/configure 2011-04-07 21:41:50.876254183 +0200 -@@ -5776,7 +5776,7 @@ - saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pplinc $gmpinc" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.11 (revision 0 or later) of PPL" >&5 --$as_echo_n "checking for version 0.11 (revision 0 or later) of PPL... " >&6; } -+$as_echo_n "checking for version 0.10 (revision 0 or later) of PPL... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include "ppl_c.h" -@@ -5784,7 +5784,7 @@ - main () - { - -- #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11 -+ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10 - choke me - #endif - -diff -Nur gcc-4.6.0-vanilla/configure.ac gcc-4.6.0/configure.ac ---- gcc-4.6.0-vanilla/configure.ac 2011-03-16 19:27:36.000000000 +0100 -+++ gcc-4.6.0/configure.ac 2011-04-07 21:41:04.254292244 +0200 -@@ -1688,9 +1688,9 @@ - if test "$enable_ppl_version_check" != no; then - saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pplinc $gmpinc" -- AC_MSG_CHECKING([for version 0.11 (revision 0 or later) of PPL]) -+ AC_MSG_CHECKING([for version 0.10 (revision 0 or later) of PPL]) - AC_TRY_COMPILE([#include "ppl_c.h"],[ -- #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11 -+ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10 - choke me - #endif - ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ]) -diff -Nur gcc-4.6.0-vanilla/gcc/doc/install.texi gcc-4.6.0/gcc/doc/install.texi ---- gcc-4.6.0-vanilla/gcc/doc/install.texi 2011-03-21 13:13:26.000000000 +0100 -+++ gcc-4.6.0/gcc/doc/install.texi 2011-04-07 21:40:12.957333674 +0200 -@@ -362,7 +362,7 @@ - distribution is found in a subdirectory of your GCC sources named - @file{mpc}, it will be built together with GCC@. - --@item Parma Polyhedra Library (PPL) version 0.11 -+@item Parma Polyhedra Library (PPL) version 0.10 - - Necessary to build GCC with the Graphite loop optimizations. - It can be downloaded from @uref{http://www.cs.unipr.it/ppl/Download/%7D. -diff -Nur gcc-4.6.0-vanilla/gcc/graphite-ppl.c gcc-4.6.0/gcc/graphite-ppl.c ---- gcc-4.6.0-vanilla/gcc/graphite-ppl.c 2011-01-25 07:46:43.000000000 +0100 -+++ gcc-4.6.0/gcc/graphite-ppl.c 2011-04-07 21:40:12.958333672 +0200 -@@ -521,6 +521,15 @@ - bool - ppl_powerset_is_empty (ppl_Pointset_Powerset_C_Polyhedron_t ps) - { -+#if PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11 -+ /* On PPL 0.10, -+ ppl_Pointset_Powerset_C_Polyhedron_contains_integer_point (ps) -+ takes too long on some cases and so we call _is_empty instead. */ -+ return ppl_Pointset_Powerset_C_Polyhedron_is_empty (ps); -+ -+#else -+ /* On PPL 0.11 or later, we can check for integer feasibility using -+ the PIP solver. */ - ppl_PIP_Problem_t pip; - ppl_dimension_type d; - ppl_const_Constraint_System_t pcs; -@@ -561,6 +570,7 @@ - ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (end); - - return !has_integer_solutions; -+#endif - } - - #endif -diff -Nur gcc-4.6.0-vanilla/gcc/testsuite/gcc.dg/graphite/interchange-11.c gcc-4.6.0/gcc/testsuite/gcc.dg/graphite/interchange-11.c ---- gcc-4.6.0-vanilla/gcc/testsuite/gcc.dg/graphite/interchange-11.c 2011-01-25 07:45:54.000000000 +0100 -+++ gcc-4.6.0/gcc/testsuite/gcc.dg/graphite/interchange-11.c 2011-04-07 21:40:12.974333658 +0200 -@@ -46,5 +46,5 @@ - return 0; - } - --/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ -+/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ - /* { dg-final { cleanup-tree-dump "graphite" } } */ -diff -Nur gcc-4.6.0-vanilla/gcc/testsuite/gcc.dg/graphite/interchange-13.c gcc-4.6.0/gcc/testsuite/gcc.dg/graphite/interchange-13.c ---- gcc-4.6.0-vanilla/gcc/testsuite/gcc.dg/graphite/interchange-13.c 2011-01-25 07:45:54.000000000 +0100 -+++ gcc-4.6.0/gcc/testsuite/gcc.dg/graphite/interchange-13.c 2011-04-07 21:40:12.975333657 +0200 -@@ -50,5 +50,5 @@ - } - - --/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ -+/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ - /* { dg-final { cleanup-tree-dump "graphite" } } */ -diff -Nur gcc-4.6.0-vanilla/gcc/testsuite/gcc.dg/graphite/interchange-1.c gcc-4.6.0/gcc/testsuite/gcc.dg/graphite/interchange-1.c ---- gcc-4.6.0-vanilla/gcc/testsuite/gcc.dg/graphite/interchange-1.c 2011-01-25 07:45:54.000000000 +0100 -+++ gcc-4.6.0/gcc/testsuite/gcc.dg/graphite/interchange-1.c 2011-04-07 21:40:12.975333657 +0200 -@@ -49,5 +49,5 @@ - return 0; - } - --/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ -+/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ - /* { dg-final { cleanup-tree-dump "graphite" } } */ -diff -Nur gcc-4.6.0-vanilla/gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 gcc-4.6.0/gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 ---- gcc-4.6.0-vanilla/gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 2011-01-25 07:47:34.000000000 +0100 -+++ gcc-4.6.0/gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 2011-04-07 21:40:12.976333657 +0200 -@@ -24,5 +24,5 @@ - - end Program FOO - --! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } -+! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } - ! { dg-final { cleanup-tree-dump "graphite" } } diff --git a/gcc/patches/gcc46-pr33763.patch0 b/gcc/patches/gcc46-pr33763.patch0 deleted file mode 100644 index 86c8ac7..0000000 --- a/gcc/patches/gcc46-pr33763.patch0 +++ /dev/null @@ -1,153 +0,0 @@ -2007-11-06 Jakub Jelinek jakub@redhat.com - - PR tree-optimization/33763 - * gcc.dg/pr33763.c: New test. - * g++.dg/opt/inline13.C: New test. - -2007-11-06 Jan Hubicka jh@suse.cz - - PR tree-optimization/33763 - * tree-inline.c (expand_call_inline): Silently ignore always_inline - attribute for redefined extern inline functions. - ---- gcc/tree-inline.c.jj 2007-11-06 09:29:04.000000000 +0100 -+++ gcc/tree-inline.c 2007-11-06 16:19:12.000000000 +0100 -@@ -3157,6 +3157,12 @@ expand_call_inline (basic_block bb, gimp - goto egress; - - if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) -+ /* For extern inline functions that get redefined we always -+ silently ignored alway_inline flag. Better behaviour would -+ be to be able to keep both bodies and use extern inline body -+ for inlining, but we can't do that because frontends overwrite -+ the body. */ -+ && !cg_edge->callee->local.redefined_extern_inline - /* Avoid warnings during early inline pass. */ - && cgraph_global_info_ready) - { ---- gcc/testsuite/gcc.dg/pr33763.c.jj 2007-11-06 16:19:12.000000000 +0100 -+++ gcc/testsuite/gcc.dg/pr33763.c 2007-11-06 16:19:12.000000000 +0100 -@@ -0,0 +1,60 @@ -+/* PR tree-optimization/33763 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2" } */ -+ -+typedef struct -+{ -+ void *a; -+ void *b; -+} T; -+extern void *foo (const char *, const char *); -+extern void *bar (void *, const char *, T); -+extern int baz (const char *, int); -+ -+extern inline __attribute__ ((always_inline, gnu_inline)) int -+baz (const char *x, int y) -+{ -+ return 2; -+} -+ -+int -+baz (const char *x, int y) -+{ -+ return 1; -+} -+ -+int xa, xb; -+ -+static void * -+inl (const char *x, const char *y) -+{ -+ T t = { &xa, &xb }; -+ int *f = (int *) __builtin_malloc (sizeof (int)); -+ const char *z; -+ int o = 0; -+ void *r = 0; -+ -+ for (z = y; *z; z++) -+ { -+ if (*z == 'r') -+ o |= 1; -+ if (*z == 'w') -+ o |= 2; -+ } -+ if (o == 1) -+ *f = baz (x, 0); -+ if (o == 2) -+ *f = baz (x, 1); -+ if (o == 3) -+ *f = baz (x, 2); -+ -+ if (o && *f > 0) -+ r = bar (f, "w", t); -+ return r; -+} -+ -+void * -+foo (const char *x, const char *y) -+{ -+ return inl (x, y); -+} ---- gcc/testsuite/g++.dg/opt/inline13.C.jj 2007-11-06 16:20:20.000000000 +0100 -+++ gcc/testsuite/g++.dg/opt/inline13.C 2007-11-06 16:21:30.000000000 +0100 -@@ -0,0 +1,60 @@ -+// PR tree-optimization/33763 -+// { dg-do compile } -+// { dg-options "-O2" } -+ -+typedef struct -+{ -+ void *a; -+ void *b; -+} T; -+extern void *foo (const char *, const char *); -+extern void *bar (void *, const char *, T); -+extern int baz (const char *, int); -+ -+extern inline __attribute__ ((always_inline, gnu_inline)) int -+baz (const char *x, int y) -+{ -+ return 2; -+} -+ -+int -+baz (const char *x, int y) -+{ -+ return 1; -+} -+ -+int xa, xb; -+ -+static void * -+inl (const char *x, const char *y) -+{ -+ T t = { &xa, &xb }; -+ int *f = (int *) __builtin_malloc (sizeof (int)); -+ const char *z; -+ int o = 0; -+ void *r = 0; -+ -+ for (z = y; *z; z++) -+ { -+ if (*z == 'r') -+ o |= 1; -+ if (*z == 'w') -+ o |= 2; -+ } -+ if (o == 1) -+ *f = baz (x, 0); -+ if (o == 2) -+ *f = baz (x, 1); -+ if (o == 3) -+ *f = baz (x, 2); -+ -+ if (o && *f > 0) -+ r = bar (f, "w", t); -+ return r; -+} -+ -+void * -+foo (const char *x, const char *y) -+{ -+ return inl (x, y); -+} diff --git a/gcc/patches/gcc46-pr38757.patch0 b/gcc/patches/gcc46-pr38757.patch0 deleted file mode 100644 index 5e6bf57..0000000 --- a/gcc/patches/gcc46-pr38757.patch0 +++ /dev/null @@ -1,105 +0,0 @@ -2009-03-18 Jakub Jelinek jakub@redhat.com - - PR debug/38757 - * langhooks.h (struct lang_hooks): Add source_language langhook. - * langhooks-def.h (LANG_HOOKS_SOURCE_LANGUAGE): Define to NULL. - (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_SOURCE_LANGUAGE. - * c-lang.c (c_source_language): New function. - (LANG_HOOKS_SOURCE_LANGUAGE): Define. - * dwarf2out.c (add_prototyped_attribute): Add DW_AT_prototype - also for DW_LANG_{C,C99,ObjC}. - (gen_compile_unit_die): Use lang_hooks.source_language () to - determine if DW_LANG_C99 or DW_LANG_C89 should be returned. - ---- gcc/langhooks.h.jj 2011-01-03 12:53:05.125745450 +0100 -+++ gcc/langhooks.h 2011-01-04 17:59:43.166744926 +0100 -@@ -467,6 +467,10 @@ struct lang_hooks - gimplification. */ - bool deep_unsharing; - -+ /* Return year of the source language standard version if the FE supports -+ multiple versions of the standard. */ -+ int (*source_language) (void); -+ - /* Whenever you add entries here, make sure you adjust langhooks-def.h - and langhooks.c accordingly. */ - }; ---- gcc/langhooks-def.h.jj 2011-01-03 12:53:05.000000000 +0100 -+++ gcc/langhooks-def.h 2011-01-04 18:00:44.858851030 +0100 -@@ -118,6 +118,7 @@ extern void lhd_omp_firstprivatize_type_ - #define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS NULL - #define LANG_HOOKS_EH_USE_CXA_END_CLEANUP false - #define LANG_HOOKS_DEEP_UNSHARING false -+#define LANG_HOOKS_SOURCE_LANGUAGE NULL - - /* Attribute hooks. */ - #define LANG_HOOKS_ATTRIBUTE_TABLE NULL -@@ -307,7 +308,8 @@ extern void lhd_end_section (void); - LANG_HOOKS_EH_RUNTIME_TYPE, \ - LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS, \ - LANG_HOOKS_EH_USE_CXA_END_CLEANUP, \ -- LANG_HOOKS_DEEP_UNSHARING \ -+ LANG_HOOKS_DEEP_UNSHARING, \ -+ LANG_HOOKS_SOURCE_LANGUAGE \ - } - - #endif /* GCC_LANG_HOOKS_DEF_H */ ---- gcc/c-lang.c.jj 2011-01-03 12:53:05.376056936 +0100 -+++ gcc/c-lang.c 2011-01-04 17:59:43.167743798 +0100 -@@ -36,6 +36,12 @@ along with GCC; see the file COPYING3. - - enum c_language_kind c_language = clk_c; - -+static int -+c_source_language (void) -+{ -+ return flag_isoc99 ? 1999 : 1989; -+} -+ - /* Lang hooks common to C and ObjC are declared in c-objc-common.h; - consequently, there should be very few hooks below. */ - -@@ -43,6 +49,8 @@ enum c_language_kind c_language = clk_c; - #define LANG_HOOKS_NAME "GNU C" - #undef LANG_HOOKS_INIT - #define LANG_HOOKS_INIT c_objc_common_init -+#undef LANG_HOOKS_SOURCE_LANGUAGE -+#define LANG_HOOKS_SOURCE_LANGUAGE c_source_language - - /* Each front end provides its own lang hook initializer. */ - struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; ---- gcc/dwarf2out.c.jj 2011-01-03 12:53:05.102056475 +0100 -+++ gcc/dwarf2out.c 2011-01-04 18:03:14.534151763 +0100 -@@ -17650,9 +17650,18 @@ add_bit_size_attribute (dw_die_ref die, - static inline void - add_prototyped_attribute (dw_die_ref die, tree func_type) - { -- if (get_AT_unsigned (comp_unit_die (), DW_AT_language) == DW_LANG_C89 -- && prototype_p (func_type)) -- add_AT_flag (die, DW_AT_prototyped, 1); -+ switch (get_AT_unsigned (comp_unit_die (), DW_AT_language)) -+ { -+ case DW_LANG_C: -+ case DW_LANG_C89: -+ case DW_LANG_C99: -+ case DW_LANG_ObjC: -+ if (prototype_p (func_type) != NULL) -+ add_AT_flag (die, DW_AT_prototyped, 1); -+ break; -+ default: -+ break; -+ } - } - - /* Add an 'abstract_origin' attribute below a given DIE. The DIE is found -@@ -19875,6 +19884,10 @@ gen_compile_unit_die (const char *filena - language = DW_LANG_ObjC; - else if (strcmp (language_string, "GNU Objective-C++") == 0) - language = DW_LANG_ObjC_plus_plus; -+ else if (strcmp (language_string, "GNU C") == 0 -+ && lang_hooks.source_language -+ && lang_hooks.source_language () >= 1999) -+ language = DW_LANG_C99; - } - - add_AT_unsigned (die, DW_AT_language, language); diff --git a/gcc/patches/gcc46-unwind-debughook-sdt.patch0 b/gcc/patches/gcc46-unwind-debughook-sdt.patch0 deleted file mode 100644 index 3b87e39..0000000 --- a/gcc/patches/gcc46-unwind-debughook-sdt.patch0 +++ /dev/null @@ -1,88 +0,0 @@ -2011-01-14 Tom Tromey tromey@redhat.com - - * unwind-dw2.c: Include sys/sdt.h if it exists. - (_Unwind_DebugHook): Use STAP_PROBE2. - * config.in, configure: Rebuild. - * configure.ac: Check for sys/sdt.h. - ---- gcc/configure.ac -+++ gcc/configure.ac -@@ -4313,6 +4313,16 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then - [Define if your target C library provides stack protector support]) - fi - -+# Test for <sys/sdt.h> on the target. -+GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) -+AC_MSG_CHECKING(sys/sdt.h in the target C library) -+have_sys_sdt_h=no -+if test -f $target_header_dir/sys/sdt.h; then -+ AC_DEFINE(HAVE_SYS_SDT_H, 1, -+ [Define if your target C library provides sys/sdt.h]) -+fi -+AC_MSG_RESULT($have_sys_sdt_h) -+ - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 - # and later they can use TFmode. ---- gcc/unwind-dw2.c -+++ gcc/unwind-dw2.c -@@ -37,6 +37,10 @@ - #include "gthr.h" - #include "unwind-dw2.h" - -+#ifdef HAVE_SYS_SDT_H -+#include <sys/sdt.h> -+#endif -+ - #ifndef __USING_SJLJ_EXCEPTIONS__ - - #ifndef STACK_GROWS_DOWNWARD -@@ -1493,7 +1497,13 @@ static void - _Unwind_DebugHook (void *cfa __attribute__ ((__unused__)), - void *handler __attribute__ ((__unused__))) - { -+ /* We only want to use stap probes starting with v3. Earlier -+ versions added too much startup cost. */ -+#if defined (HAVE_SYS_SDT_H) && defined (STAP_PROBE2) && _SDT_NOTE_TYPE >= 3 -+ STAP_PROBE2 (libgcc, unwind, cfa, handler); -+#else - asm (""); -+#endif - } - - /* Install TARGET into CURRENT so that we can return to it. This is a - ---- gcc/config.in.jj 2011-01-22 10:21:47.000000000 +0100 -+++ gcc/config.in 2011-01-22 11:10:39.000000000 +0100 -@@ -1405,6 +1407,9 @@ - #endif - - -+/* Define if your target C library provides sys/sdt.h */ -+#undef HAVE_SYS_SDT_H -+ - /* Define to 1 if you have the <sys/stat.h> header file. */ - #ifndef USED_FOR_TARGET - #undef HAVE_SYS_STAT_H ---- gcc/configure.jj 2011-01-22 10:20:55.000000000 +0100 -+++ gcc/configure 2011-01-22 11:10:34.990648298 +0100 -@@ -25757,6 +25757,19 @@ $as_echo "#define TARGET_LIBC_PROVIDES_S - - fi - -+# Test for <sys/sdt.h> on the target. -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 -+$as_echo_n "checking sys/sdt.h in the target C library... " >&6; } -+have_sys_sdt_h=no -+if test -f $target_header_dir/sys/sdt.h; then -+ -+$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 -+$as_echo "$have_sys_sdt_h" >&6; } -+ - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 - # and later they can use TFmode. diff --git a/gcc/patches/gcc47-c++-builtin-redecl.patch0 b/gcc/patches/gcc47-c++-builtin-redecl.patch0 new file mode 100644 index 0000000..fa30745 --- /dev/null +++ b/gcc/patches/gcc47-c++-builtin-redecl.patch0 @@ -0,0 +1,134 @@ +2007-10-02 Jakub Jelinek jakub@redhat.com + + * decl.c (duplicate_decls): When redeclaring a builtin function, + keep the merged decl builtin whenever types match, even if new + decl defines a function. + + * gcc.dg/builtins-85.c: New test. + * g++.dg/ext/builtin30.C: New test. + +--- gcc/cp/decl.c.jj 2007-10-01 22:11:09.000000000 +0200 ++++ gcc/cp/decl.c 2007-10-02 11:39:46.000000000 +0200 +@@ -2137,39 +2137,37 @@ duplicate_decls (tree newdecl, tree oldd + DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl); + DECL_RESULT (olddecl) = DECL_RESULT (newdecl); + } ++ /* If redeclaring a builtin function, it stays built in. */ ++ if (types_match && DECL_BUILT_IN (olddecl)) ++ { ++ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl); ++ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl); ++ /* If we're keeping the built-in definition, keep the rtl, ++ regardless of declaration matches. */ ++ COPY_DECL_RTL (olddecl, newdecl); ++ if (DECL_BUILT_IN_CLASS (newdecl) == BUILT_IN_NORMAL) ++ { ++ enum built_in_function fncode = DECL_FUNCTION_CODE (newdecl); ++ switch (fncode) ++ { ++ /* If a compatible prototype of these builtin functions ++ is seen, assume the runtime implements it with the ++ expected semantics. */ ++ case BUILT_IN_STPCPY: ++ if (builtin_decl_explicit_p (fncode)) ++ set_builtin_decl_implicit_p (fncode, true); ++ break; ++ default: ++ break; ++ } ++ } ++ } + if (new_defines_function) + /* If defining a function declared with other language + linkage, use the previously declared language linkage. */ + SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl)); + else if (types_match) + { +- /* If redeclaring a builtin function, and not a definition, +- it stays built in. */ +- if (DECL_BUILT_IN (olddecl)) +- { +- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl); +- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl); +- /* If we're keeping the built-in definition, keep the rtl, +- regardless of declaration matches. */ +- COPY_DECL_RTL (olddecl, newdecl); +- if (DECL_BUILT_IN_CLASS (newdecl) == BUILT_IN_NORMAL) +- { +- enum built_in_function fncode = DECL_FUNCTION_CODE (newdecl); +- switch (fncode) +- { +- /* If a compatible prototype of these builtin functions +- is seen, assume the runtime implements it with the +- expected semantics. */ +- case BUILT_IN_STPCPY: +- if (builtin_decl_explicit_p (fncode)) +- set_builtin_decl_implicit_p (fncode, true); +- break; +- default: +- break; +- } +- } +- } +- + DECL_RESULT (newdecl) = DECL_RESULT (olddecl); + /* Don't clear out the arguments if we're just redeclaring a + function. */ +--- gcc/testsuite/gcc.dg/builtins-85.c.jj 2007-10-02 11:23:51.000000000 +0200 ++++ gcc/testsuite/gcc.dg/builtins-85.c 2007-10-02 11:24:12.000000000 +0200 +@@ -0,0 +1,25 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2" } */ ++ ++typedef __SIZE_TYPE__ size_t; ++extern void __chk_fail (void); ++extern int snprintf (char *, size_t, const char *, ...); ++extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...) ++{ ++ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b) ++ __chk_fail (); ++ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ()); ++} ++extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf"); ++ ++char buf[10]; ++ ++int ++main (void) ++{ ++ snprintf (buf, 10, "%d%d\n", 10, 10); ++ return 0; ++} ++ ++/* { dg-final { scan-assembler "mysnprintf" } } */ ++/* { dg-final { scan-assembler-not "__chk_fail" } } */ +--- gcc/testsuite/g++.dg/ext/builtin30.C.jj 2007-10-02 11:19:45.000000000 +0200 ++++ gcc/testsuite/g++.dg/ext/builtin30.C 2007-10-02 11:23:26.000000000 +0200 +@@ -0,0 +1,27 @@ ++// { dg-do compile } ++// { dg-options "-O2" } ++ ++typedef __SIZE_TYPE__ size_t; ++extern "C" { ++extern void __chk_fail (void); ++extern int snprintf (char *, size_t, const char *, ...); ++extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...) ++{ ++ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b) ++ __chk_fail (); ++ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ()); ++} ++extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf"); ++} ++ ++char buf[10]; ++ ++int ++main (void) ++{ ++ snprintf (buf, 10, "%d%d\n", 10, 10); ++ return 0; ++} ++ ++// { dg-final { scan-assembler "mysnprintf" } } ++// { dg-final { scan-assembler-not "__chk_fail" } } diff --git a/gcc/patches/gcc47-cloog-dl.patch0 b/gcc/patches/gcc47-cloog-dl.patch0 new file mode 100644 index 0000000..1ed7165 --- /dev/null +++ b/gcc/patches/gcc47-cloog-dl.patch0 @@ -0,0 +1,472 @@ +2011-01-04 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_CLOOG_UTIL_H, GRAPHITE_POLY_H): New. + (graphite*.o): Adjust dependencies. + * graphite-cloog-compat.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-poly.h: Include graphite-cloog-util.h. + +--- gcc/Makefile.in.jj 2011-01-03 13:44:14.163900902 +0100 ++++ gcc/Makefile.in 2011-01-04 17:48:53.588775911 +0100 +@@ -962,6 +962,8 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plug + PLUGIN_H = plugin.h $(GCC_PLUGIN_H) + PLUGIN_VERSION_H = plugin-version.h configargs.h + LIBFUNCS_H = libfuncs.h $(HASHTAB_H) ++GRAPHITE_CLOOG_UTIL_H = graphite-cloog-util.h graphite-cloog-compat.h ++GRAPHITE_POLY_H = graphite-poly.h $(GRAPHITE_CLOOG_UTIL_H) + + # + # Now figure out from those variables how to compile and link. +@@ -1016,7 +1018,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) + # and the system's installed libraries. + LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) \ + $(LIBDECNUMBER) $(HOST_LIBS) +-BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ ++BACKENDLIBS = $(GMPLIBS) $(if $(CLOOGLIBS),-ldl) $(PLUGINLIBS) $(HOST_LIBS) \ + $(ZLIB) + # Any system libraries needed just for GNAT. + SYSLIBS = @GNAT_LIBEXC@ +@@ -2602,40 +2604,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYS + $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) tree-pass.h value-prof.h + graphite.o : graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \ + $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h \ +- $(DBGCNT_H) graphite-ppl.h graphite-poly.h graphite-scop-detection.h \ ++ $(DBGCNT_H) graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h \ + graphite-clast-to-gimple.h graphite-sese-to-poly.h + graphite-blocking.o : graphite-blocking.c $(CONFIG_H) $(SYSTEM_H) \ + coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \ +- sese.h graphite-ppl.h graphite-poly.h ++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) + graphite-clast-to-gimple.o : graphite-clast-to-gimple.c $(CONFIG_H) \ + $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \ +- $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-cloog-util.h \ +- graphite-ppl.h graphite-poly.h graphite-clast-to-gimple.h \ ++ $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h $(GRAPHITE_CLOOG_UTIL_H) \ ++ graphite-ppl.h $(GRAPHITE_POLY_H) graphite-clast-to-gimple.h \ + graphite-dependences.h graphite-cloog-compat.h + graphite-cloog-util.o : graphite-cloog-util.c $(CONFIG_H) $(SYSTEM_H) \ +- coretypes.h graphite-cloog-util.h graphite-cloog-compat.h ++ coretypes.h $(GRAPHITE_CLOOG_UTIL_H) graphite-cloog-compat.h + graphite-dependences.o : graphite-dependences.c $(CONFIG_H) $(SYSTEM_H) \ + coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \ +- sese.h graphite-ppl.h graphite-poly.h graphite-dependences.h \ +- graphite-cloog-util.h ++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-dependences.h \ ++ $(GRAPHITE_CLOOG_UTIL_H) + graphite-flattening.o : graphite-flattening.c $(CONFIG_H) $(SYSTEM_H) \ + coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \ +- sese.h graphite-ppl.h graphite-poly.h ++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) + graphite-interchange.o : graphite-interchange.c $(CONFIG_H) $(SYSTEM_H) \ + coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \ +- sese.h graphite-ppl.h graphite-poly.h ++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) + graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ + $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) gimple-pretty-print.h \ +- $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h graphite-poly.h \ +- graphite-dependences.h graphite-cloog-util.h ++ $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \ ++ graphite-dependences.h $(GRAPHITE_CLOOG_UTIL_H) + graphite-ppl.o : graphite-ppl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ +- graphite-cloog-util.h graphite-ppl.h ++ $(GRAPHITE_CLOOG_UTIL_H) graphite-ppl.h + graphite-scop-detection.o : graphite-scop-detection.c $(CONFIG_H) $(SYSTEM_H) \ + coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H) \ +- sese.h graphite-ppl.h graphite-poly.h graphite-scop-detection.h ++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h + graphite-sese-to-poly.o : graphite-sese-to-poly.c $(CONFIG_H) \ + $(SYSTEM_H) coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) \ +- $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h graphite-poly.h \ ++ $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \ + graphite-sese-to-poly.h + tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ + $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \ +@@ -3454,6 +3456,15 @@ $(common_out_object_file): $(common_out_ + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ + $< $(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)) ++graphite%.o : \ ++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) ++graphite.o : \ ++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) ++ + # Build auxiliary files that support ecoff format. + mips-tfile: mips-tfile.o $(LIBDEPS) + $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \ +--- gcc/graphite-cloog-compat.h.jj 2011-01-03 12:53:05.000000000 +0100 ++++ gcc/graphite-cloog-compat.h 2011-01-04 17:34:09.857757544 +0100 +@@ -272,4 +272,279 @@ static inline int cloog_matrix_nrows (Cl + return m->NbRows; + } + #endif /* CLOOG_ORG */ ++ ++#include <dlfcn.h> ++#if PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11 ++#define DYNSYMS_PPL11 ++#else ++#define DYNSYMS_PPL11 \ ++ DYNSYM (ppl_new_PIP_Problem_from_constraints); \ ++ DYNSYM (ppl_PIP_Problem_is_satisfiable); \ ++ DYNSYM (ppl_delete_PIP_Problem); ++#endif ++#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); \ ++ DYNSYM (stmt_ass); \ ++ DYNSYM (ppl_delete_Constraint_System); \ ++ DYNSYM (ppl_initialize); \ ++ DYNSYM (ppl_new_Constraint_System_from_Constraint); \ ++ DYNSYM (ppl_new_C_Polyhedron_from_Constraint_System); \ ++ DYNSYM (ppl_Polyhedron_affine_image); \ ++ DYNSYM (ppl_io_fprint_Pointset_Powerset_C_Polyhedron); \ ++ DYNSYMS_PPL11 ++extern struct cloog_pointers_s__ ++{ ++ 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) ++#ifndef CLOOG_ORG ++#undef cloog_loop_malloc ++#define cloog_loop_malloc(STATE) (*cloog_pointers__.p_cloog_loop_malloc) () ++#else ++#define cloog_loop_malloc (*cloog_pointers__.p_cloog_loop_malloc) ++#endif ++#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) ++#ifndef CLOOG_ORG ++#undef cloog_options_malloc ++#define cloog_options_malloc(STATE) (*cloog_pointers__.p_cloog_options_malloc) () ++#undef cloog_program_dump_cloog ++#define cloog_program_dump_cloog(DUMPFILE, PROGRAM, SCATTERINGLIST) \ ++ (*cloog_pointers__.p_cloog_program_dump_cloog) (DUMPFILE, PROGRAM) ++#undef cloog_program_extract_scalars ++#define cloog_program_extract_scalars(PROG, SCATT, OPT) \ ++ (*cloog_pointers__.p_cloog_program_extract_scalars) (PROG, SCATT) ++#else ++#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) ++#endif ++#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) ++#ifndef CLOOG_ORG ++#undef cloog_program_scatter ++#define cloog_program_scatter(PROG, SCATT, OPT) \ ++ (*cloog_pointers__.p_cloog_program_scatter) (PROG, SCATT) ++#undef cloog_statement_alloc ++#define cloog_statement_alloc(STATE, INDEX) \ ++ (*cloog_pointers__.p_cloog_statement_alloc) (INDEX) ++#else ++#define cloog_program_scatter (*cloog_pointers__.p_cloog_program_scatter) ++#define cloog_statement_alloc (*cloog_pointers__.p_cloog_statement_alloc) ++#endif ++#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 stmt_ass (*cloog_pointers__.p_stmt_ass) ++#define ppl_delete_Constraint_System (*cloog_pointers__.p_ppl_delete_Constraint_System) ++#define ppl_initialize (*cloog_pointers__.p_ppl_initialize) ++#define ppl_new_Constraint_System_from_Constraint (*cloog_pointers__.p_ppl_new_Constraint_System_from_Constraint) ++#define ppl_new_C_Polyhedron_from_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_Constraint_System) ++#define ppl_Polyhedron_affine_image (*cloog_pointers__.p_ppl_Polyhedron_affine_image) ++#define ppl_io_fprint_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_io_fprint_Pointset_Powerset_C_Polyhedron) ++#if !(PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11) ++#define ppl_new_PIP_Problem_from_constraints (*cloog_pointers__.p_ppl_new_PIP_Problem_from_constraints) ++#define ppl_PIP_Problem_is_satisfiable (*cloog_pointers__.p_ppl_PIP_Problem_is_satisfiable) ++#define ppl_delete_PIP_Problem (*cloog_pointers__.p_ppl_delete_PIP_Problem) ++#endif ++ ++#define cloog_finalize (*cloog_pointers__.p_ppl_finalize) ++ ++ + #endif /* GRAPHITE_CLOOG_COMPAT_H */ +--- gcc/graphite.c.jj 2011-01-03 12:53:05.194056513 +0100 ++++ gcc/graphite.c 2011-01-04 16:18:32.385007767 +0100 +@@ -56,6 +56,35 @@ along with GCC; see the file COPYING3. + + CloogState *cloog_state; + ++__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 +@@ -201,6 +230,12 @@ graphite_initialize (void) + return false; + } + ++ if (!init_cloog_pointers ()) ++ { ++ sorry ("Graphite loop optimizations cannot be used"); ++ return false; ++ } ++ + scev_reset (); + recompute_all_dominators (); + initialize_original_copy_tables (); +--- gcc/graphite-clast-to-gimple.c.jj 2011-01-03 12:53:05.000000000 +0100 ++++ gcc/graphite-clast-to-gimple.c 2011-01-04 16:29:55.738007463 +0100 +@@ -836,7 +836,7 @@ clast_get_body_of_loop (struct clast_stm + from STMT_FOR. */ + + static tree +-type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip) ++type_for_clast_for (struct clast_for *stmt_fora, ivs_params_p ip) + { + mpz_t bound_one, bound_two; + tree lb_type, ub_type; +@@ -844,8 +844,8 @@ type_for_clast_for (struct clast_for *st + mpz_init (bound_one); + mpz_init (bound_two); + +- lb_type = type_for_clast_expr (stmt_for->LB, ip, bound_one, bound_two); +- ub_type = type_for_clast_expr (stmt_for->UB, ip, bound_one, bound_two); ++ lb_type = type_for_clast_expr (stmt_fora->LB, ip, bound_one, bound_two); ++ ub_type = type_for_clast_expr (stmt_fora->UB, ip, bound_one, bound_two); + + mpz_clear (bound_one); + mpz_clear (bound_two); +--- gcc/graphite-poly.h.jj 2011-01-03 12:53:05.000000000 +0100 ++++ gcc/graphite-poly.h 2011-01-04 17:35:53.308788629 +0100 +@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. + #ifndef GCC_GRAPHITE_POLY_H + #define GCC_GRAPHITE_POLY_H + ++#include "graphite-cloog-util.h" ++ + typedef struct poly_dr *poly_dr_p; + DEF_VEC_P(poly_dr_p); + DEF_VEC_ALLOC_P (poly_dr_p, heap); diff --git a/gcc/patches/gcc47-i386-libgomp.patch0 b/gcc/patches/gcc47-i386-libgomp.patch0 new file mode 100644 index 0000000..f6a6b91 --- /dev/null +++ b/gcc/patches/gcc47-i386-libgomp.patch0 @@ -0,0 +1,28 @@ +--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100 ++++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100 +@@ -44,14 +44,14 @@ if test $enable_linux_futex = yes; then + ;; + + # Note that bare i386 is not included here. We need cmpxchg. +- i[456]86-*-linux*) ++ i[456]86-*-linux*) + config_path="linux/x86 linux posix" + case " ${CC} ${CFLAGS} " in + *" -m64 "*) + ;; + *) + if test -z "$with_arch"; then +- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}" ++ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic" + fi + esac + ;; +@@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then + config_path="linux/x86 linux posix" + case " ${CC} ${CFLAGS} " in + *" -m32 "*) +- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686" ++ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic" + ;; + esac + ;; diff --git a/gcc/patches/gcc47-libgomp-omp_h-multilib.patch0 b/gcc/patches/gcc47-libgomp-omp_h-multilib.patch0 new file mode 100644 index 0000000..d0e98d1 --- /dev/null +++ b/gcc/patches/gcc47-libgomp-omp_h-multilib.patch0 @@ -0,0 +1,17 @@ +2008-06-09 Jakub Jelinek jakub@redhat.com + + * omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs. + +--- libgomp/omp.h.in.jj 2008-06-09 13:34:05.000000000 +0200 ++++ libgomp/omp.h.in 2008-06-09 13:34:48.000000000 +0200 +@@ -42,8 +42,8 @@ typedef struct + + typedef struct + { +- unsigned char _x[@OMP_NEST_LOCK_SIZE@] +- __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@))); ++ unsigned char _x[8 + sizeof (void *)] ++ __attribute__((__aligned__(sizeof (void *)))); + } omp_nest_lock_t; + #endif + diff --git a/gcc/patches/gcc47-libitm-fno-exceptions.patch0 b/gcc/patches/gcc47-libitm-fno-exceptions.patch0 new file mode 100644 index 0000000..8b9d590 --- /dev/null +++ b/gcc/patches/gcc47-libitm-fno-exceptions.patch0 @@ -0,0 +1,28 @@ +2011-12-22 Jakub Jelinek jakub@redhat.com + + * Makefile.am (beginend.lo): Append -fno-exceptions to + CXXFLAGS. + * Makefile.in: Regenerated. + +--- libitm/Makefile.am.jj 2011-12-20 13:47:57.000000000 +0100 ++++ libitm/Makefile.am 2011-12-22 09:14:06.663469165 +0100 +@@ -72,6 +72,8 @@ endif + if ARCH_X86_AVX + x86_avx.lo : XCFLAGS += -mavx + endif ++beginend.lo : CXXCOMPILE += -fno-exceptions ++beginend.lo : LTCXXCOMPILE += -fno-exceptions + + if ARCH_FUTEX + libitm_la_SOURCES += futex.cc +--- libitm/Makefile.in.jj 2011-12-20 13:47:57.000000000 +0100 ++++ libitm/Makefile.in 2011-12-22 09:14:29.466329944 +0100 +@@ -1278,6 +1278,8 @@ vpath % $(strip $(search_path)) + @LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@ > $@ || (rm -f $@ ; exit 1) + @ARCH_X86_TRUE@x86_sse.lo : XCFLAGS += -msse + @ARCH_X86_AVX_TRUE@x86_avx.lo : XCFLAGS += -mavx ++beginend.lo : CXXCOMPILE += -fno-exceptions ++beginend.lo : LTCXXCOMPILE += -fno-exceptions + + all-local: $(STAMP_GENINSRC) + diff --git a/gcc/patches/gcc47-libstdc++-docs.patch0 b/gcc/patches/gcc47-libstdc++-docs.patch0 new file mode 100644 index 0000000..577dd49 --- /dev/null +++ b/gcc/patches/gcc47-libstdc++-docs.patch0 @@ -0,0 +1,26 @@ +--- libstdc++-v3/doc/html/index.html.jj 2011-01-03 12:53:21.282829010 +0100 ++++ libstdc++-v3/doc/html/index.html 2011-01-04 18:06:28.999851145 +0100 +@@ -5,6 +5,8 @@ + <a class="link" href="http://www.fsf.org/">FSF + </a> + </p><p> ++ Release 4.7.0 ++ </p><p> + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the +--- libstdc++-v3/doc/html/api.html.jj 2011-01-03 12:53:21.000000000 +0100 ++++ libstdc++-v3/doc/html/api.html 2011-01-04 18:12:01.672757784 +0100 +@@ -19,8 +19,11 @@ + member functions for the library classes, finding out what is in a + particular include file, looking at inheritance diagrams, etc. + </p><p> +- The API documentation, rendered into HTML, can be viewed online: ++ The API documentation, rendered into HTML, can be viewed here: + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p> ++ <a class="ulink" href="api/index.html">for the 4.7 release, local ++ </a> ++ </p></li><li class="listitem"><p> + <a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.4/index.html">for the 3.4 release + </a> + </p></li><li class="listitem"><p> diff --git a/gcc/patches/gcc47-libtool-no-rpath.patch0 b/gcc/patches/gcc47-libtool-no-rpath.patch0 new file mode 100644 index 0000000..466c661 --- /dev/null +++ b/gcc/patches/gcc47-libtool-no-rpath.patch0 @@ -0,0 +1,27 @@ +libtool sucks. +--- ltmain.sh.jj 2007-12-07 14:53:21.000000000 +0100 ++++ ltmain.sh 2008-09-05 21:51:48.000000000 +0200 +@@ -5394,6 +5394,7 @@ EOF + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do ++ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then +@@ -6071,6 +6072,7 @@ EOF + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do ++ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then +@@ -6120,6 +6122,7 @@ EOF + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do ++ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then diff --git a/gcc/patches/gcc47-no-add-needed.patch0 b/gcc/patches/gcc47-no-add-needed.patch0 new file mode 100644 index 0000000..7e38b0b --- /dev/null +++ b/gcc/patches/gcc47-no-add-needed.patch0 @@ -0,0 +1,52 @@ +2010-02-08 Roland McGrath roland@redhat.com + + * config/rs6000/sysv4.h (LINK_EH_SPEC): Pass --no-add-needed to the + linker. + * config/gnu-user.h (LINK_EH_SPEC): Likewise. + * config/alpha/elf.h (LINK_EH_SPEC): Likewise. + * config/ia64/linux.h (LINK_EH_SPEC): Likewise. + +--- gcc/config/alpha/elf.h.jj 2011-01-03 12:52:31.118056764 +0100 ++++ gcc/config/alpha/elf.h 2011-01-04 18:14:10.931874160 +0100 +@@ -438,7 +438,7 @@ extern int alpha_this_gpdisp_sequence_nu + I imagine that other systems will catch up. In the meantime, it + doesn't harm to make sure that the data exists to be used later. */ + #if defined(HAVE_LD_EH_FRAME_HDR) +-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " + #endif + + /* A C statement (sans semicolon) to output to the stdio stream STREAM +--- gcc/config/ia64/linux.h.jj 2011-01-03 13:02:11.462994522 +0100 ++++ gcc/config/ia64/linux.h 2011-01-04 18:14:10.931874160 +0100 +@@ -77,7 +77,7 @@ do { \ + Signalize that because we have fde-glibc, we don't need all C shared libs + linked against -lgcc_s. */ + #undef LINK_EH_SPEC +-#define LINK_EH_SPEC "" ++#define LINK_EH_SPEC "--no-add-needed " + + /* Put all *tf routines in libgcc. */ + #undef LIBGCC2_HAS_TF_MODE +--- gcc/config/gnu-user.h.jj 2011-01-03 12:53:03.739057299 +0100 ++++ gcc/config/gnu-user.h 2011-01-04 18:14:10.932814884 +0100 +@@ -82,7 +82,7 @@ see the files COPYING3 and COPYING.RUNTI + #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC + + #if defined(HAVE_LD_EH_FRAME_HDR) +-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " + #endif + + #undef LINK_GCC_C_SEQUENCE_SPEC +--- gcc/config/rs6000/sysv4.h.jj 2011-01-03 13:02:18.255994215 +0100 ++++ gcc/config/rs6000/sysv4.h 2011-01-04 18:14:10.933888871 +0100 +@@ -820,7 +820,7 @@ extern int fixuplabelno; + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}" + + #if defined(HAVE_LD_EH_FRAME_HDR) +-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " + #endif + + #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \ diff --git a/gcc/patches/gcc47-ppl-0.10.patch0 b/gcc/patches/gcc47-ppl-0.10.patch0 new file mode 100644 index 0000000..d43f34f --- /dev/null +++ b/gcc/patches/gcc47-ppl-0.10.patch0 @@ -0,0 +1,121 @@ +2011-01-28 Jakub Jelinek jakub@redhat.com + + Revert: + 2011-01-25 Sebastian Pop sebastian.pop@amd.com + + * configure: Regenerated. + * configure.ac: Check for version 0.11 (or later revision) of PPL. +gcc/ + * doc/install.texi: Update the expected version number of PPL to 0.11. + * graphite-ppl.c (ppl_powerset_is_empty): Remove now dead code under + #if PPL_VERSION_MINOR < 11. + +--- gcc/doc/install.texi (revision 169207) ++++ gcc/doc/install.texi (revision 169206) +@@ -332,7 +332,7 @@ and @option{--with-mpc-include}. Altern + distribution is found in a subdirectory of your GCC sources named + @file{mpc}, it will be built together with GCC@. + +-@item Parma Polyhedra Library (PPL) version 0.11 ++@item Parma Polyhedra Library (PPL) version 0.10 + + Necessary to build GCC with the Graphite loop optimizations. + It can be downloaded from @uref{http://www.cs.unipr.it/ppl/Download/%7D. +--- gcc/graphite-ppl.c (revision 169207) ++++ gcc/graphite-ppl.c (revision 169206) +@@ -521,6 +521,15 @@ debug_gmp_value (mpz_t val) + bool + ppl_powerset_is_empty (ppl_Pointset_Powerset_C_Polyhedron_t ps) + { ++#if PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11 ++ /* On PPL 0.10, ++ ppl_Pointset_Powerset_C_Polyhedron_contains_integer_point (ps) ++ takes too long on some cases and so we call _is_empty instead. */ ++ return ppl_Pointset_Powerset_C_Polyhedron_is_empty (ps); ++ ++#else ++ /* On PPL 0.11 or later, we can check for integer feasibility using ++ the PIP solver. */ + ppl_PIP_Problem_t pip; + ppl_dimension_type d; + ppl_const_Constraint_System_t pcs; +@@ -561,6 +570,7 @@ ppl_powerset_is_empty (ppl_Pointset_Powe + ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (end); + + return !has_integer_solutions; ++#endif + } + + #endif +--- configure.ac (revision 169207) ++++ configure.ac (revision 169206) +@@ -1688,9 +1688,9 @@ if test "x$with_ppl" != xno; then + if test "$enable_ppl_version_check" != no; then + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $pplinc $gmpinc" +- AC_MSG_CHECKING([for version 0.11 (revision 0 or later) of PPL]) ++ AC_MSG_CHECKING([for version 0.10 (revision 0 or later) of PPL]) + AC_TRY_COMPILE([#include "ppl_c.h"],[ +- #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11 ++ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10 + choke me + #endif + ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ]) +--- configure (revision 169207) ++++ configure (revision 169206) +@@ -5775,8 +5775,8 @@ fi + if test "$enable_ppl_version_check" != no; then + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $pplinc $gmpinc" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.11 (revision 0 or later) of PPL" >&5 +-$as_echo_n "checking for version 0.11 (revision 0 or later) of PPL... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.10 (revision 0 or later) of PPL" >&5 ++$as_echo_n "checking for version 0.10 (revision 0 or later) of PPL... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include "ppl_c.h" +@@ -5784,7 +5784,7 @@ int + main () + { + +- #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11 ++ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10 + choke me + #endif + +--- gcc/testsuite/gcc.dg/graphite/interchange-11.c.jj 2011-01-28 09:38:11.000000000 +0100 ++++ gcc/testsuite/gcc.dg/graphite/interchange-11.c 2011-01-28 11:06:56.461429848 +0100 +@@ -46,5 +46,5 @@ main (void) + return 0; + } + +-/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ ++/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ + /* { dg-final { cleanup-tree-dump "graphite" } } */ +--- gcc/testsuite/gcc.dg/graphite/interchange-13.c.jj 2011-01-28 09:38:12.000000000 +0100 ++++ gcc/testsuite/gcc.dg/graphite/interchange-13.c 2011-01-28 11:07:08.182429223 +0100 +@@ -50,5 +50,5 @@ main (void) + } + + +-/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ ++/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ + /* { dg-final { cleanup-tree-dump "graphite" } } */ +--- gcc/testsuite/gcc.dg/graphite/interchange-1.c.jj 2011-01-28 09:38:13.000000000 +0100 ++++ gcc/testsuite/gcc.dg/graphite/interchange-1.c 2011-01-28 11:06:42.160429193 +0100 +@@ -49,5 +49,5 @@ main (void) + return 0; + } + +-/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */ ++/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */ + /* { dg-final { cleanup-tree-dump "graphite" } } */ +--- gcc/testsuite/gfortran.dg/graphite/interchange-3.f90.jj 2011-01-28 09:38:05.000000000 +0100 ++++ gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 2011-01-28 11:07:46.313420441 +0100 +@@ -24,5 +24,5 @@ Program FOO + + end Program FOO + +-! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } ++! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } + ! { dg-final { cleanup-tree-dump "graphite" } } diff --git a/gcc/patches/gcc47-pr33763.patch0 b/gcc/patches/gcc47-pr33763.patch0 new file mode 100644 index 0000000..0cf0723 --- /dev/null +++ b/gcc/patches/gcc47-pr33763.patch0 @@ -0,0 +1,153 @@ +2007-11-06 Jakub Jelinek jakub@redhat.com + + PR tree-optimization/33763 + * gcc.dg/pr33763.c: New test. + * g++.dg/opt/inline13.C: New test. + +2007-11-06 Jan Hubicka jh@suse.cz + + PR tree-optimization/33763 + * tree-inline.c (expand_call_inline): Silently ignore always_inline + attribute for redefined extern inline functions. + +--- gcc/tree-inline.c.jj 2007-11-06 09:29:04.000000000 +0100 ++++ gcc/tree-inline.c 2007-11-06 16:19:12.000000000 +0100 +@@ -3817,6 +3817,12 @@ expand_call_inline (basic_block bb, gimp + goto egress; + + if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) ++ /* For extern inline functions that get redefined we always ++ silently ignored always_inline flag. Better behaviour would ++ be to be able to keep both bodies and use extern inline body ++ for inlining, but we can't do that because frontends overwrite ++ the body. */ ++ && !cg_edge->callee->local.redefined_extern_inline + /* Avoid warnings during early inline pass. */ + && cgraph_global_info_ready + /* PR 20090218-1_0.c. Body can be provided by another module. */ +--- gcc/testsuite/gcc.dg/pr33763.c.jj 2007-11-06 16:19:12.000000000 +0100 ++++ gcc/testsuite/gcc.dg/pr33763.c 2007-11-06 16:19:12.000000000 +0100 +@@ -0,0 +1,60 @@ ++/* PR tree-optimization/33763 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2" } */ ++ ++typedef struct ++{ ++ void *a; ++ void *b; ++} T; ++extern void *foo (const char *, const char *); ++extern void *bar (void *, const char *, T); ++extern int baz (const char *, int); ++ ++extern inline __attribute__ ((always_inline, gnu_inline)) int ++baz (const char *x, int y) ++{ ++ return 2; ++} ++ ++int ++baz (const char *x, int y) ++{ ++ return 1; ++} ++ ++int xa, xb; ++ ++static void * ++inl (const char *x, const char *y) ++{ ++ T t = { &xa, &xb }; ++ int *f = (int *) __builtin_malloc (sizeof (int)); ++ const char *z; ++ int o = 0; ++ void *r = 0; ++ ++ for (z = y; *z; z++) ++ { ++ if (*z == 'r') ++ o |= 1; ++ if (*z == 'w') ++ o |= 2; ++ } ++ if (o == 1) ++ *f = baz (x, 0); ++ if (o == 2) ++ *f = baz (x, 1); ++ if (o == 3) ++ *f = baz (x, 2); ++ ++ if (o && *f > 0) ++ r = bar (f, "w", t); ++ return r; ++} ++ ++void * ++foo (const char *x, const char *y) ++{ ++ return inl (x, y); ++} +--- gcc/testsuite/g++.dg/opt/inline13.C.jj 2007-11-06 16:20:20.000000000 +0100 ++++ gcc/testsuite/g++.dg/opt/inline13.C 2007-11-06 16:21:30.000000000 +0100 +@@ -0,0 +1,60 @@ ++// PR tree-optimization/33763 ++// { dg-do compile } ++// { dg-options "-O2" } ++ ++typedef struct ++{ ++ void *a; ++ void *b; ++} T; ++extern void *foo (const char *, const char *); ++extern void *bar (void *, const char *, T); ++extern int baz (const char *, int); ++ ++extern inline __attribute__ ((always_inline, gnu_inline)) int ++baz (const char *x, int y) ++{ ++ return 2; ++} ++ ++int ++baz (const char *x, int y) ++{ ++ return 1; ++} ++ ++int xa, xb; ++ ++static void * ++inl (const char *x, const char *y) ++{ ++ T t = { &xa, &xb }; ++ int *f = (int *) __builtin_malloc (sizeof (int)); ++ const char *z; ++ int o = 0; ++ void *r = 0; ++ ++ for (z = y; *z; z++) ++ { ++ if (*z == 'r') ++ o |= 1; ++ if (*z == 'w') ++ o |= 2; ++ } ++ if (o == 1) ++ *f = baz (x, 0); ++ if (o == 2) ++ *f = baz (x, 1); ++ if (o == 3) ++ *f = baz (x, 2); ++ ++ if (o && *f > 0) ++ r = bar (f, "w", t); ++ return r; ++} ++ ++void * ++foo (const char *x, const char *y) ++{ ++ return inl (x, y); ++} diff --git a/gcc/patches/gcc47-pr38757.patch0 b/gcc/patches/gcc47-pr38757.patch0 new file mode 100644 index 0000000..5fd23ea --- /dev/null +++ b/gcc/patches/gcc47-pr38757.patch0 @@ -0,0 +1,105 @@ +2009-03-18 Jakub Jelinek jakub@redhat.com + + PR debug/38757 + * langhooks.h (struct lang_hooks): Add source_language langhook. + * langhooks-def.h (LANG_HOOKS_SOURCE_LANGUAGE): Define to NULL. + (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_SOURCE_LANGUAGE. + * c-lang.c (c_source_language): New function. + (LANG_HOOKS_SOURCE_LANGUAGE): Define. + * dwarf2out.c (add_prototyped_attribute): Add DW_AT_prototype + also for DW_LANG_{C,C99,ObjC}. + (gen_compile_unit_die): Use lang_hooks.source_language () to + determine if DW_LANG_C99 or DW_LANG_C89 should be returned. + +--- gcc/langhooks.h.jj 2011-01-03 12:53:05.125745450 +0100 ++++ gcc/langhooks.h 2011-01-04 17:59:43.166744926 +0100 +@@ -467,6 +467,10 @@ struct lang_hooks + gimplification. */ + bool deep_unsharing; + ++ /* Return year of the source language standard version if the FE supports ++ multiple versions of the standard. */ ++ int (*source_language) (void); ++ + /* Whenever you add entries here, make sure you adjust langhooks-def.h + and langhooks.c accordingly. */ + }; +--- gcc/langhooks-def.h.jj 2011-01-03 12:53:05.000000000 +0100 ++++ gcc/langhooks-def.h 2011-01-04 18:00:44.858851030 +0100 +@@ -118,6 +118,7 @@ extern void lhd_omp_firstprivatize_type_ + #define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS NULL + #define LANG_HOOKS_EH_USE_CXA_END_CLEANUP false + #define LANG_HOOKS_DEEP_UNSHARING false ++#define LANG_HOOKS_SOURCE_LANGUAGE NULL + + /* Attribute hooks. */ + #define LANG_HOOKS_ATTRIBUTE_TABLE NULL +@@ -307,7 +308,8 @@ extern void lhd_end_section (void); + LANG_HOOKS_EH_RUNTIME_TYPE, \ + LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS, \ + LANG_HOOKS_EH_USE_CXA_END_CLEANUP, \ +- LANG_HOOKS_DEEP_UNSHARING \ ++ LANG_HOOKS_DEEP_UNSHARING, \ ++ LANG_HOOKS_SOURCE_LANGUAGE \ + } + + #endif /* GCC_LANG_HOOKS_DEF_H */ +--- gcc/c-lang.c.jj 2011-01-03 12:53:05.376056936 +0100 ++++ gcc/c-lang.c 2011-01-04 17:59:43.167743798 +0100 +@@ -36,6 +36,12 @@ along with GCC; see the file COPYING3. + + enum c_language_kind c_language = clk_c; + ++static int ++c_source_language (void) ++{ ++ return flag_isoc99 ? 1999 : 1989; ++} ++ + /* Lang hooks common to C and ObjC are declared in c-objc-common.h; + consequently, there should be very few hooks below. */ + +@@ -45,6 +51,8 @@ enum c_language_kind c_language = clk_c; + #define LANG_HOOKS_INIT c_objc_common_init + #undef LANG_HOOKS_INIT_TS + #define LANG_HOOKS_INIT_TS c_common_init_ts ++#undef LANG_HOOKS_SOURCE_LANGUAGE ++#define LANG_HOOKS_SOURCE_LANGUAGE c_source_language + + /* Each front end provides its own lang hook initializer. */ + struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; +--- gcc/dwarf2out.c.jj 2011-01-03 12:53:05.102056475 +0100 ++++ gcc/dwarf2out.c 2011-01-04 18:03:14.534151763 +0100 +@@ -15793,9 +15793,18 @@ add_bit_size_attribute (dw_die_ref die, + static inline void + add_prototyped_attribute (dw_die_ref die, tree func_type) + { +- if (get_AT_unsigned (comp_unit_die (), DW_AT_language) == DW_LANG_C89 +- && prototype_p (func_type)) +- add_AT_flag (die, DW_AT_prototyped, 1); ++ switch (get_AT_unsigned (comp_unit_die (), DW_AT_language)) ++ { ++ case DW_LANG_C: ++ case DW_LANG_C89: ++ case DW_LANG_C99: ++ case DW_LANG_ObjC: ++ if (prototype_p (func_type)) ++ add_AT_flag (die, DW_AT_prototyped, 1); ++ break; ++ default: ++ break; ++ } + } + + /* Add an 'abstract_origin' attribute below a given DIE. The DIE is found +@@ -18438,6 +18447,10 @@ gen_compile_unit_die (const char *filena + if (strcmp (language_string, "GNU Go") == 0) + language = DW_LANG_Go; + } ++ else if (strcmp (language_string, "GNU C") == 0 ++ && lang_hooks.source_language ++ && lang_hooks.source_language () >= 1999) ++ language = DW_LANG_C99; + } + + add_AT_unsigned (die, DW_AT_language, language);
hooks/post-receive -- IPFire 3.x development tree