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.
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
source_dl = http://ftp.gnu.org/gnu/gcc/%{thisapp}/
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
libffi-devel
libmpc-devel
mpfr-devel
+ perl
texinfo
zlib-devel
end
-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 \
--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 \
--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
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
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
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
-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 @@
+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
- target_subdir
+ EXTRA_CONFIGARGS_LIBJAVA
+enable_esp
+ target_subdir
host_subdir
build_subdir
- build_libsubdir
-@@ -1459,6 +1460,11 @@
+@@ -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, powerpc, powerpc64, ia64 and arm.
++ --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-build-with-cxx build with C++ compiler instead of C compiler
- --disable-ppl-version-check
-@@ -3039,6 +3045,25 @@
+ --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 or --disable-esp was given.
-+if test "${enable_esp+set}" = set; then
-+ enableval="$enable_esp"
-+
++# Check whether --enable-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*)
++ i?86*-*-linux* | x86_??*-*-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; }; }
++ { $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;
++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 @@
-
+@@ -14422,6 +14447,11 @@
+ CFLAGS="$saved_CFLAGS"
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
-+
++# Disable -fstack-protector on stage1
++if test x$enable_esp = xyes; then
++ stage1_cflags="$stage1_cflags -fno-stack-protector"
+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
+ # 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
+
+#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"
+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. */
- /* FIXME: when autoconf is fixed, remove the host check - dj */
-@@ -690,7 +691,9 @@
+@@ -705,7 +706,9 @@
static const char *asm_debug;
static const char *cpp_spec = CPP_SPEC;
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 @@
+@@ -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*}\
/* This contains cpp options which are not passed when the preprocessor
output will be used by another program. */
-@@ -925,9 +928,9 @@
+@@ -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} \
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1},
{"-",
"%{!E:%e-E or -x required when input is from standard input}\
-@@ -950,7 +953,7 @@
+@@ -971,7 +974,7 @@
%W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
{".i", "@cpp-output", 0, 0, 0},
{"@cpp-output",
{".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),
+@@ -1225,18 +1228,23 @@
+ INIT_STATIC_SPEC ("self_spec", &self_spec),
};
-#ifdef EXTRA_SPECS /* additional specs needed */
/* List of dynamically allocates specs that have been defined so far. */
-@@ -1306,7 +1314,6 @@
+@@ -1328,7 +1336,6 @@
if (verbose_flag)
fnotice (stderr, "Using built-in specs.\n");
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 @@
+@@ -1341,7 +1348,6 @@
sl->ptr_spec = &sl->ptr;
next = sl;
}
for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--)
{
-@@ -6418,6 +6424,12 @@
+@@ -6449,6 +6455,12 @@
gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str,
spec_version, dir_separator_str, NULL);
/* 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
+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.
++# 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
+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 @@
+ # -------------------------------------------
+ # 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
$(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@
+-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
-@@ -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
+@@ -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_crtbeginP = '$(enable_crtbeginP)' >> 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
-@@ -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
+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}\
- %{!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
+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}}\
- 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 @@
+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 (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 > \$@
+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
-+enable_libgcc_crtbeginP = $(enable_crtbeginP)
-+ifeq ($(enable_libgcc_crtbeginP),yes)
++ifeq ($(enable_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
+ # 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_libgcc_crtbeginP),yes)
-+crtbeginP.o: $(gcc_srcdir)/crtstuff.c
++ifeq ($(enable_crtbeginP),yes)
++crtbeginP$(objext): $(srcdir)/crtstuff.c
+ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \
-+ -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O
++ -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 @@
+ 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@
BOOT_LDFLAGS=
BOOT_ADAFLAGS=-gnatpg -gnata
-@@ -403,9 +411,9 @@
+@@ -410,9 +418,9 @@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
+++ /dev/null
-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: ;
-+}
-+
+++ /dev/null
-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";
+++ /dev/null
---- 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; \
+++ /dev/null
-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.
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.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
-@@ -2001,23 +2001,21 @@ duplicate_decls (tree newdecl, tree oldd
+@@ -2137,39 +2137,37 @@ duplicate_decls (tree newdecl, tree oldd
DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
}
+ /* 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
- /* 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-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
+--- 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" } */
+
+/* { 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
+--- 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" }
--- 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
+@@ -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)
#\f
# Now figure out from those variables how to compile and link.
-@@ -1037,7 +1039,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
+@@ -1016,7 +1018,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# and the system's installed libraries.
- LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \
- $(HOST_LIBS)
+ 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@
-@@ -2668,40 +2670,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYS
+@@ -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 \
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
+@@ -3454,6 +3456,15 @@ $(common_out_object_file): $(common_out_
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
- $(out_file) $(OUTPUT_OPTION)
+ $< $(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 version.o $(LIBDEPS)
+ 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,277 @@ static inline int cloog_matrix_nrows (Cl
+@@ -272,4 +272,279 @@ static inline int cloog_matrix_nrows (Cl
return m->NbRows;
}
#endif /* CLOOG_ORG */
+ 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_Polyhedron_affine_image); \
+ DYNSYM (ppl_io_fprint_Pointset_Powerset_C_Polyhedron); \
+ DYNSYMS_PPL11
-+extern struct
++extern struct cloog_pointers_s__
+{
+ bool inited;
+ void *h;
+#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)
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
+@@ -836,7 +836,7 @@ 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)
+-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)
{
-- 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);
+ 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.
--- /dev/null
+--- 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
+ ;;
--- /dev/null
+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)
+
--- /dev/null
+--- 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>
/* 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 { \
+@@ -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 "
- #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
-
+ /* 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
#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 "}}"
+@@ -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} "
-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 @@
+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@.
Necessary to build GCC with the Graphite loop optimizations.
It can be downloaded from @uref{http://www.cs.unipr.it/ppl/Download/}.
-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 @@
+--- 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)
{
ppl_PIP_Problem_t pip;
ppl_dimension_type d;
ppl_const_Constraint_System_t pcs;
-@@ -561,6 +570,7 @@
+@@ -561,6 +570,7 @@ ppl_powerset_is_empty (ppl_Pointset_Powe
ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (end);
return !has_integer_solutions;
}
#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 @@
+--- 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" } } */
-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 @@
+--- 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" } } */
-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 @@
+--- 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" } } */
-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 @@
+--- 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
--- 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
+@@ -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 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. */
++ /* 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)
- {
+ && 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 @@
#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.
+@@ -36,6 +36,12 @@ along with GCC; see the file COPYING3.
enum c_language_kind c_language = clk_c;
/* 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
+@@ -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
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,
+@@ -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)
{
+ case DW_LANG_C89:
+ case DW_LANG_C99:
+ case DW_LANG_ObjC:
-+ if (prototype_p (func_type) != NULL)
++ if (prototype_p (func_type))
+ add_AT_flag (die, DW_AT_prototyped, 1);
+ break;
+ default:
}
/* 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;
+@@ -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)