From: Michael Tremer Date: Thu, 12 Nov 2015 00:22:18 +0000 (+0000) Subject: gcc: Update to version 5.2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fgcc-5;p=people%2Fms%2Fipfire-3.x.git gcc: Update to version 5.2 NEEDS WORK Signed-off-by: Michael Tremer --- diff --git a/gcc/gcc.nm b/gcc/gcc.nm index b2ad5a1e4..c837095c6 100644 --- a/gcc/gcc.nm +++ b/gcc/gcc.nm @@ -3,12 +3,12 @@ # Copyright (C) - IPFire Development Team # ############################################################################### -# Configure build to compile with cloog. -build_cloog = 1 +# Configure build to compile with graphite +build_graphite = 0 name = gcc -version = 4.9.3 -release = 3 +version = 5.2.0 +release = 0.1 maintainer = Michael Tremer groups = Development/Compilers @@ -23,7 +23,6 @@ end # This is the at least required version of binutils. binutils_version = 2.24 -cloog_version = 0.18.1 source_dl = http://ftp.gnu.org/gnu/gcc/%{thisapp}/ source_dl += ftp://gcc.gnu.org/pub/gcc/infrastructure/ @@ -41,17 +40,16 @@ build glibc-devel >= 2.16 gmp-devel libffi-devel - libmpc-devel + libmpc-devel >= 0.8.1 mpfr-devel perl texinfo zlib-devel end - # If cloog support is enabled, we require the devel packages for build. - if "%{build_cloog}" == "1" - requires += cloog-devel >= %{cloog_version} - requires += isl-devel + # If graphite support is enabled, we require the devel packages for build. + if "%{build_graphite}" == "1" + requires += isl-devel >= 0.14 end # Build libquadmath (only on x86). @@ -94,7 +92,7 @@ build end if "%{DISTRO_ARCH}" == "aarch64" - make_bootstrap = bootstrap + build_libubsan = 1 end if "%{DISTRO_ARCH}" == "armv7hl" @@ -103,7 +101,6 @@ build configure_options += --disable-sjlj-exceptions configure_options += \ - --with-cpu=cortex-a8 \ --with-tune=cortex-a8 \ --with-arch=armv7-a \ --with-float=hard \ @@ -122,11 +119,9 @@ build build_libubsan = 1 end - if "%{build_cloog}" == "1" + if "%{build_graphite}" == "1" configure_options += \ - --with-cloog=%{prefix} \ - --with-isl=%{prefix} \ - --enable-cloog-backend=isl + --with-isl end # CFLAGS for hardening. @@ -182,12 +177,16 @@ build #./contrib/gcc_update --touch end + export CC=gcc + export CXX=g++ + build cd %{DIR_SRC}/gcc-build # Modify CFLAGS CFLAGS="%{CFLAGS}" CFLAGS=$(echo ${CFLAGS} | sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g') + CFLAGS=$(echo ${CFLAGS} | sed -e 's/-Werror=format-security//g') CFLAGS=$(echo ${CFLAGS} | sed -e 's/-m64//g;s/-m32//g;s/-m31//g') CFLAGS=$(echo ${CFLAGS} | sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g') CFLAGS=$(echo ${CFLAGS} | sed -e 's/-march=i.86//g') @@ -195,7 +194,7 @@ build CFLAGS=$(echo "${CFLAGS}" | sed -e 's/[[:blank:]]\+/ /g') CXXFLAGS=$(echo ${CFLAGS} | sed -e 's/ -Wall//g') CXXFLAGS=$(echo ${CXXFLAGS} | sed -e 's/ -fexceptions / /g') - CXXFLAGS=$(echo ${CXXFLAGS} | sed -e 's/ -Werror=format-security / -Wformat -Werror=format-security /g') + #CXXFLAGS=$(echo ${CXXFLAGS} | sed -e 's/ -Werror=format-security / -Wformat -Werror=format-security /g') case "${CFLAGS}" in *-fasynchronous-unwind-tables*) @@ -233,6 +232,7 @@ build --enable-plugin \ --enable-initfini-array \ --disable-libgcj \ + --enable-gnu-indirect-function \ %{configure_options} # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58012 @@ -304,7 +304,8 @@ build chmod 755 %{BUILDROOT}%{libdir}/libgomp.so.1.* # libstdc++ - ln -svf ../../../libstdc++.so.6.0.20 ${FULLPATH}/libstdc++.so + ln -svf ../../../libstdc++.so.6.0.21 ${FULLPATH}/libstdc++.so + mv -vf %{BUILDROOT}%{libdir}/lib{std,sup}c++.a ${FULLPATH} # libquadmath if [ "%{build_libquadmath}" = "1" ]; then @@ -345,6 +346,8 @@ build keep_libraries %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libgcc.a %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libgcc_eh.a + %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libstdc++.a + %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libsupc++.a end end @@ -477,6 +480,20 @@ packages end end + package libstdc++-static + summary = Static libraries for the GNU standard C++ library + description = %{summary} + + requires + libstdc++-devel = %{thisver} + end + + files + %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libstdc++.a + %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libsupc++.a + end + end + package libgomp summary = GCC OpenMP v3.0 shared support library. description @@ -576,7 +593,7 @@ packages end files - %{libdir}/libasan.so.1* + %{libdir}/libasan.so.2* end end diff --git a/gcc/patches/01_all_gcc49_configure.patch b/gcc/patches/01_all_gcc51_configure.patch similarity index 99% rename from gcc/patches/01_all_gcc49_configure.patch rename to gcc/patches/01_all_gcc51_configure.patch index ab9aae047..4f58ab991 100644 --- a/gcc/patches/01_all_gcc49_configure.patch +++ b/gcc/patches/01_all_gcc51_configure.patch @@ -75,9 +75,9 @@ enable_plugin pluginlibs @@ -920,6 +922,7 @@ - enable_plugin enable_libquadmath_support with_linker_hash_style + with_diagnostics_color +enable_esp ' ac_precious_vars='build_alias diff --git a/gcc/patches/03_all_gcc49_Makefile.in.patch b/gcc/patches/03_all_gcc51_Makefile.in.patch similarity index 79% rename from gcc/patches/03_all_gcc49_Makefile.in.patch rename to gcc/patches/03_all_gcc51_Makefile.in.patch index bf53d3ca0..6aac099c5 100644 --- a/gcc/patches/03_all_gcc49_Makefile.in.patch +++ b/gcc/patches/03_all_gcc51_Makefile.in.patch @@ -1,11 +1,12 @@ -2012-01-17 Magnus Granberg +2015-04-23 Magnus Granberg * gcc/Makefile.in Add -fno-PIE. to ALL_CFLAGS and - ALL_CXXFLAGS if enable_esp yes. - Echo enable_esp and enable_crtbeginP to tmp-libgcc.mvars. + ALL_CXXFLAGS if enable_esp yes. + Echo enable_esp and enable_crtbeginP to tmp-libgcc.mvars. * libgcc/Makefile.in Add crtbeginP.o to EXTRA_PARTS if enable_crtbeginP yes - We add new file crtbeginP.o if enable_crtbeginP yes - Add -fno-PIE. to CRTSTUFF_CFLAGS. + We add new file crtbeginP.o if enable_crtbeginP yes + Add -fno-PIE. to CRTSTUFF_CFLAGS. + Disable -fstack-check --- a/gcc/Makefile.in 2011-11-09 02:20:14.000000000 +0100 +++ b/gcc/Makefile.in 2011-12-24 22:28:08.864804375 +0100 @@ -70,15 +71,24 @@ # Options to use when compiling libgcc2.a. # LIBGCC2_DEBUG_CFLAGS = -g +@@ -225,7 +225,7 @@ endif + LIBGCC2_DEBUG_CFLAGS = -g + LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ + $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \ +- -fbuilding-libgcc -fno-stack-protector \ ++ -fbuilding-libgcc -fno-stack-protector -fstack-check=no \ + $(INHIBIT_LIBC_CFLAGS) + + # Additional options to use when compiling libgcc2.a. @@ -279,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF - 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) + -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \ +- $(INHIBIT_LIBC_CFLAGS) ++ $(ESP_NOPIE_CFLAGS) -fstack-check=no $(INHIBIT_LIBC_CFLAGS) # Extra flags to use when compiling crt{begin,end}.o. + CRTSTUFF_T_CFLAGS = @@ -966,6 +977,13 @@ crtendS$(objext): $(srcdir)/crtstuff.c # This is a version of crtbegin for -static links. crtbeginT$(objext): $(srcdir)/crtstuff.c diff --git a/gcc/patches/04_all_gcc49_default_ssp.patch b/gcc/patches/04_all_gcc49_default_ssp.patch deleted file mode 100644 index 50e2645d8..000000000 --- a/gcc/patches/04_all_gcc49_default_ssp.patch +++ /dev/null @@ -1,261 +0,0 @@ -2014-04-27 Magnus Granberg - - Patch orig: Debian/Ubuntu - # 484714 - We Add -fstack-protector-strong as default and change - ssp-buffer-size - ---- a/configure.ac -+++ b/configure.ac -@@ -3238,6 +3238,9 @@ case $build in - esac ;; - esac - -+# Needed when we build with -fstack-protector as default. -+stage1_cflags="$stage1_cflags -fno-stack-protector" -+ - AC_SUBST(stage1_cflags) - - # Enable --enable-checking in stage1 of the compiler. ---- a/configure -+++ b/configure -@@ -14453,7 +14453,8 @@ case $build in - esac ;; - esac - -- -+# Needed when we build with -fstack-protector as default. -+stage1_cflags="$stage1_cflags -fno-stack-protector" - - # Enable --enable-checking in stage1 of the compiler. - # Check whether --enable-stage1-checking was given. ---- a/Makefile.in -+++ b/Makefile.in -@@ -362,7 +362,7 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ - - # 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 -fno-stack-protector - BOOT_LDFLAGS= - BOOT_ADAFLAGS= -gnatpg - -@@ -408,9 +408,9 @@ GNATMAKE = @GNATMAKE@ - - CFLAGS = @CFLAGS@ - LDFLAGS = @LDFLAGS@ --LIBCFLAGS = $(CFLAGS) -+LIBCFLAGS = $(CFLAGS) -fno-stack-protector - CXXFLAGS = @CXXFLAGS@ --LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fno-stack-protector - GOCFLAGS = $(CFLAGS) - - TFLAGS = ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -9239,6 +9251,11 @@ Like @option{-fstack-protector} but incl - be protected --- those that have local array definitions, or have - references to local frame addresses. - -+NOTE: In Gentoo GCC 4.9.0 and later versions this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector}, -+@option{-nostdlib}, @option{-ffreestanding}, @option{-fstack-protector}, -+@option{-fstack-protector-strong}or @option{-fstack-protector-all}are found. -+ - @item -fsection-anchors - @opindex fsection-anchors - Try to reduce the number of symbolic address calculations by using -@@ -9461,6 +9465,9 @@ - The minimum size of buffers (i.e.@: arrays) that receive stack smashing - protection when @option{-fstack-protection} is used. - -+NOTE: In Gentoo this is change from "8" to "4", to increase -+the number of functions protected by the stack protector. -+ - @item max-jump-thread-duplication-stmts - Maximum number of statements allowed in a block that needs to be - duplicated when threading jumps. ---- a/gcc/cp/lang-specs.h -+++ b/gcc/cp/lang-specs.h -@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see - %(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) %(ssp_default) %2\ - %{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}}%V}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, -@@ -57,11 +57,11 @@ along with GCC; see the file COPYING3. If not see - %(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) %(ssp_default) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".ii", "@c++-cpp-output", 0, 0, 0}, - {"@c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1plus -fpreprocessed %i %(cc1_options) %2\ -+ cc1plus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -651,6 +651,19 @@ proper position among the other output files. */ - #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G" - #endif - -+#ifndef SSP_DEFAULT_SPEC -+#if defined ( TARGET_LIBC_PROVIDES_SSP ) && defined ( EFAULT_SSP ) -+#define SSP_DEFAULT_SPEC "%{fno-stack-protector|fstack-protector| \ -+ fstack-protector-strong|fstack-protector-all| \ -+ ffreestanding|nostdlib:;:-fstack-protector-strong}" -+/* Add -fno-stack-protector for the use of gcc-specs-ssp. */ -+#define CC1_SSP_DEFAULT_SPEC "%{!fno-stack-protector:}" -+#else -+#define SSP_DEFAULT_SPEC "" -+#define CC1_SSP_DEFAULT_SPEC "" -+#endif -+#endif -+ - #ifndef LINK_SSP_SPEC - #ifdef TARGET_LIBC_PROVIDES_SSP - #define LINK_SSP_SPEC "%{fstack-protector:}" -@@ -771,7 +781,7 @@ proper position among the other output f - - static const char *asm_debug = ASM_DEBUG_SPEC; - static const char *cpp_spec = CPP_SPEC; --static const char *cc1_spec = CC1_SPEC; -+static const char *cc1_spec = CC1_SPEC CC1_SSP_DEFAULT_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; -@@ -777,6 +785,8 @@ static const char *cc1_spec = CC1_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; -+static const char *ssp_default_spec = SSP_DEFAULT_SPEC; -+static const char *cc1_ssp_default_spec = CC1_SSP_DEFAULT_SPEC; - static const char *asm_spec = ASM_SPEC; - static const char *asm_final_spec = ASM_FINAL_SPEC; - static const char *link_spec = LINK_SPEC; -@@ -835,7 +844,7 @@ static const char *cpp_unique_options = - 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} %(ssp_default)"; - - /* This contains cpp options which are not passed when the preprocessor - output will be used by another program. */ -@@ -1015,9 +1024,9 @@ static const struct compiler default_compilers[] = - %{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) %(ssp_default)}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, - {"-", - "%{!E:%e-E or -x required when input is from standard input}\ -@@ -1040,7 +1049,7 @@ static const struct compiler default_compilers[] = - %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) %(ssp_default) %{!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}, -@@ -1267,6 +1276,8 @@ static struct spec_list static_specs[] = - INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec), - INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec), - INIT_STATIC_SPEC ("link_ssp", &link_ssp_spec), -+ INIT_STATIC_SPEC ("ssp_default", &ssp_default_spec), -+ INIT_STATIC_SPEC ("cc1_ssp_default", &cc1_ssp_default_spec), - INIT_STATIC_SPEC ("endfile", &endfile_spec), - INIT_STATIC_SPEC ("link", &link_spec), - INIT_STATIC_SPEC ("lib", &lib_spec), ---- a/gcc/objc/lang-specs.h -+++ b/gcc/objc/lang-specs.h -@@ -29,9 +29,9 @@ along with GCC; see the file COPYING3. If not see - %{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) %(ssp_default) %{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) %(ssp_default) %{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}\ -@@ -40,18 +40,18 @@ along with GCC; see the file COPYING3. If not see - %{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) %(ssp_default) %{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) %(ssp_default) %{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) %(ssp_default) %{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) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ---- a/gcc/objcp/lang-specs.h -+++ b/gcc/objcp/lang-specs.h -@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see - %(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) %(ssp_default) %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 @@ along with GCC; see the file COPYING3. If not see - %(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) %(ssp_default) %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) %(ssp_default) %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) %(ssp_default) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ---- a/gcc/params.def -+++ b/gcc/params.def -@@ -662,7 +662,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT, - DEFPARAM (PARAM_SSP_BUFFER_SIZE, - "ssp-buffer-size", - "The lower bound for a buffer to be considered for stack smashing protection", -- 8, 1, 0) -+ 4, 1, 0) - - /* When we thread through a block we have to make copies of the - statements within the block. Clearly for large blocks the code diff --git a/gcc/patches/05_all_gcc48_gcc.c.patch0 b/gcc/patches/05_all_gcc48_gcc.c.patch0 index ddfcafd6e..b08e7bd20 100644 --- a/gcc/patches/05_all_gcc48_gcc.c.patch0 +++ b/gcc/patches/05_all_gcc48_gcc.c.patch0 @@ -13,12 +13,13 @@ #include "filenames.h" /* By default there is no special suffix for target executables. */ -@@ -822,7 +823,9 @@ +@@ -870,7 +870,9 @@ - static const char *asm_debug; + static const char *asm_debug = ASM_DEBUG_SPEC; static const char *cpp_spec = CPP_SPEC; +-static const char *cc1_spec = CC1_SPEC; +#ifndef ENABLE_ESP - static const char *cc1_spec = CC1_SPEC CC1_SSP_DEFAULT_SPEC; ++static const char *cc1_spec = CC1_SPEC CC1_SSP_DEFAULT_SPEC; +#endif static const char *cc1plus_spec = CC1PLUS_SPEC; static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; diff --git a/gcc/patches/10_all_gcc49_default-fortify-source.patch b/gcc/patches/10_all_gcc49_default-fortify-source.patch deleted file mode 100644 index ad2f2b1c2..000000000 --- a/gcc/patches/10_all_gcc49_default-fortify-source.patch +++ /dev/null @@ -1,29 +0,0 @@ -Enable -D_FORTIFY_SOURCE=2 by default. - - ---- a/gcc/c-family/c-cppbuiltin.c -+++ b/gcc/c-family/c-cppbuiltin.c -@@ -951,6 +951,9 @@ c_cpp_builtins (cpp_reader *pfile) - builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); - builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); - -+ /* Fortify Source enabled by default w/optimization. */ -+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)"); -+ - /* Misc. */ - if (flag_gnu89_inline) - cpp_define (pfile, "__GNUC_GNU_INLINE__"); ---- a/gcc/doc/gcc.info -+++ b/gcc/doc/gcc.info -@@ -6255,6 +6255,11 @@ find out the exact set of optimizations that are enabled at each level. - Please note the warning under '-fgcse' about invoking '-O2' on - programs that use computed gotos. - -+ NOTE: In Gentoo, `-D_FORTIFY_SOURCE=2' is set by default, and is -+ activated when `-O' is set to 2 or higher. This enables additional -+ compile-time and run-time checks for several libc functions. To disable, -+ specify either `-U_FORTIFY_SOURCE' or `-D_FORTIFY_SOURCE=0'. -+ - '-O3' - Optimize yet more. '-O3' turns on all optimizations specified by - '-O2' and also turns on the '-finline-functions', diff --git a/gcc/patches/11_all_gcc49_default-warn-format-security.patch b/gcc/patches/11_all_gcc49_default-warn-format-security.patch deleted file mode 100644 index ee6c7c439..000000000 --- a/gcc/patches/11_all_gcc49_default-warn-format-security.patch +++ /dev/null @@ -1,43 +0,0 @@ -Enable -Wformat and -Wformat-security by default. - - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -412,7 +412,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ O - Warn about format strings that are not literals - - Wformat-security --C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) -+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) - Warn about possible security problems with format functions - - Wformat-y2k -@@ -424,7 +424,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ - Warn about zero-length formats - - Wformat= --C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) -+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) - Warn about printf/scanf/strftime/strfmon format string anomalies - - Wignored-qualifiers ---- a/gcc/doc/gcc.info -+++ b/gcc/doc/gcc.info -@@ -3451,6 +3451,8 @@ compiler warns that an unrecognized option is present. - '-Wno-format-contains-nul', '-Wno-format-extra-args', and - '-Wno-format-zero-length'. '-Wformat' is enabled by '-Wall'. - -+ This option is enabled by default in Gentoo. -+ - '-Wno-format-contains-nul' - If '-Wformat' is specified, do not warn about format strings - that contain NUL bytes. -@@ -3496,6 +3498,8 @@ compiler warns that an unrecognized option is present. - future warnings may be added to '-Wformat-security' that are - not included in '-Wformat-nonliteral'.) - -+ This option is enabled by default in Gentoo. -+ - '-Wformat-y2k' - If '-Wformat' is specified, also warn about 'strftime' formats - that may yield only a two-digit year. diff --git a/gcc/patches/12_all_gcc49_default-warn-trampolines.patch b/gcc/patches/12_all_gcc49_default-warn-trampolines.patch deleted file mode 100644 index 9ab4378d4..000000000 --- a/gcc/patches/12_all_gcc49_default-warn-trampolines.patch +++ /dev/null @@ -1,25 +0,0 @@ -Enable -Wtrampolines by default. - - ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -648,7 +648,7 @@ Common Var(warn_system_headers) Warning - Do not suppress warnings from system headers - - Wtrampolines --Common Var(warn_trampolines) Warning -+Common Var(warn_trampolines) Init(1) Warning - Warn whenever a trampoline is generated - - Wtype-limits ---- a/gcc/doc/gcc.info -+++ b/gcc/doc/gcc.info -@@ -4021,6 +4021,8 @@ compiler warns that an unrecognized option is present. - and thus requires the stack to be made executable in order for the - program to work properly. - -+ This warning is enabled by default in Gentoo. -+ - '-Wfloat-equal' - Warn if floating-point values are used in equality comparisons. - diff --git a/gcc/patches/24_all_gcc49_invoke.texi.patch0 b/gcc/patches/24_all_gcc49_invoke.texi.patch0 index 856a4e5d1..cdda379d6 100644 --- a/gcc/patches/24_all_gcc49_invoke.texi.patch0 +++ b/gcc/patches/24_all_gcc49_invoke.texi.patch0 @@ -9,20 +9,20 @@ @opindex fstack-protector-all Like @option{-fstack-protector} except that all functions are protected. -+NOTE: NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector}, -+@option{-nostdlib}, @option{-ffreestanding}, @option{-fstack-protector}, -+@option{-fstack-protector-strong}or @option{-fstack-protector-all}are found. ++NOTE: When --enable-esp, this option is enabled by default ++for C, C++, ObjC, and ObjC++ if neither @option{-fno-stack-protector}, ++@option{-nostdlib}, @option{-ffreestanding}, @option{-fstack-protector}, ++@option{-fstack-protector-strong} or @option{-fstack-protector-all} are found. + @item -fstack-protector-strong @opindex fstack-protector-strong Like @option{-fstack-protector} but includes additional functions to @@ -7960,6 +7965,12 @@ - that were used to generate code (@option{-fpie}, @option{-fPIE}, - or model suboptions) when you specify this option. + used for compilation (@option{-fpie}, @option{-fPIE}, + or model suboptions) when you specify this linker 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} ++NOTE: When --enable-esp, this option is enabled by default ++for C, C++, ObjC, and 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. @@ -34,8 +34,8 @@ @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} ++NOTE: When --enable-esp, this option is enabled by default ++for C, C++, ObjC, and 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. + diff --git a/gcc/patches/33_all_gcc48_config_rs6000.patch b/gcc/patches/33_all_gcc48_config_rs6000.patch new file mode 100644 index 000000000..1d080cf8f --- /dev/null +++ b/gcc/patches/33_all_gcc48_config_rs6000.patch @@ -0,0 +1,34 @@ +2014-08-07 Magnus Granberg + + * gcc/config/rs6000/sysv4.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. + (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. + +--- a/gcc/config/rs6000/sysv4.h 2013-01-10 21:38:27.000000000 +0100 ++++ b/gcc/config/rs6000/sysv4.h 2013-03-26 01:30:33.257003189 +0100 +@@ -627,8 +627,13 @@ extern int fixuplabelno; + + #define LINK_OS_DEFAULT_SPEC "" + ++#ifdef ENABLE_ESP ++#define DRIVER_SELF_SPECS "%{mfpu=none: % +2015-04-23 Magnus Granberg * gcc/config/i386/gnu-user-common.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. * gcc/config/i386/gnu-user.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. @@ -7,9 +7,9 @@ --- a/gcc/config/i386/gnu-user-common.h 2013-01-10 21:38:27.000000000 +0100 +++ b/gcc/config/i386/gnu-user-common.h 2013-02-14 00:51:44.689637605 +0100 @@ -70,3 +70,7 @@ along with GCC; see the file COPYING3. - - /* Static stack checking is supported by means of probes. */ - #define STACK_CHECK_STATIC_BUILTIN 1 + #if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE + #define TARGET_CAN_SPLIT_STACK + #endif + +#ifdef ENABLE_ESP +#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC diff --git a/gcc/patches/35_all_gcc48_config_arm.patch b/gcc/patches/35_all_gcc51_config_arm.patch similarity index 75% rename from gcc/patches/35_all_gcc48_config_arm.patch rename to gcc/patches/35_all_gcc51_config_arm.patch index 5aecc6ba3..815d74af9 100644 --- a/gcc/patches/35_all_gcc48_config_arm.patch +++ b/gcc/patches/35_all_gcc51_config_arm.patch @@ -1,23 +1,25 @@ -2013-06-03 Magnus Granberg +2015-04-26 Magnus Granberg * gcc/config/arm/arm.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. * gcc/config/arm/elf.h (SUBSUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. --- a/gcc/config/arm/arm.h 2013-01-15 17:17:28.000000000 +0100 +++ b/gcc/config/arm/arm.h 2013-02-18 22:45:18.327284928 +0100 -@@ -2326,6 +2326,11 @@ extern const char *host_detect_local_cpu - # define MCPU_MTUNE_NATIVE_SPECS "" +@@ -2326,6 +2326,14 @@ extern const char *host_detect_local_cpu + # define EXTRA_SPEC_FUNCTIONS BIG_LITTLE_CPU_SPEC_FUNCTIONS #endif -#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS -- +#ifdef ENABLE_ESP +# define DRIVER_SELF_SPECS \ + MCPU_MTUNE_NATIVE_SPECS, \ + ESP_DRIVER_SELF_SPEC ++/* https://bugs.gentoo.org/518598 */ ++# define ESP_NO_STACK_CHECK 1 +#else +# define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS +#endif + #define TARGET_SUPPORTS_WIDE_INT 1 #endif /* ! GCC_ARM_H */ --- a/gcc/config/arm/elf.h 2013-01-10 21:38:27.000000000 +0100 +++ b/gcc/config/arm/elf.h 2013-05-19 02:15:49.595855825 +0200 diff --git a/gcc/patches/36_all_gcc51_config_mips.patch b/gcc/patches/36_all_gcc51_config_mips.patch new file mode 100644 index 000000000..564626153 --- /dev/null +++ b/gcc/patches/36_all_gcc51_config_mips.patch @@ -0,0 +1,43 @@ +2013-04-01 Magnus Granberg + + * gcc/config/mips/gnu-user.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. + * gcc/config/mips/mips.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. + +--- a/gcc/config/mips/gnu-user.h 2013-01-10 21:38:27.000000000 +0100 ++++ b/gcc/config/mips/gnu-user.h 2013-03-10 22:37:33.743176388 +0100 +@@ -125,9 +125,17 @@ extern const char *host_detect_local_cpu + "%{!mabi=*: -" MULTILIB_ABI_DEFAULT "}" + + #undef DRIVER_SELF_SPECS ++#ifdef ENABLE_ESP + #define DRIVER_SELF_SPECS \ + MIPS_ISA_LEVEL_SPEC, \ + BASE_DRIVER_SELF_SPECS, \ ++ ESP_DRIVER_SELF_SPEC, \ + LINUX_DRIVER_SELF_SPECS ++#else ++#define DRIVER_SELF_SPECS \ ++ MIPS_ISA_LEVEL_SPEC, \ ++ BASE_DRIVER_SELF_SPECS, \ ++ LINUX_DRIVER_SELF_SPECS ++#endif + + /* Similar to standard Linux, but adding -ffast-math support. */ + #undef GNU_USER_TARGET_MATHFILE_SPEC +--- a/gcc/config/mips/mips.h 2013-01-10 21:38:27.000000000 +0100 ++++ b/gcc/config/mips/mips.h 2013-03-24 16:59:01.474513910 +0100 +@@ -1197,9 +1197,13 @@ struct mips_cpu_info { + SUBTARGET_EXTRA_SPECS + + #ifndef SUBTARGET_EXTRA_SPECS ++#ifdef ENABLE_ESP ++#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS ++#else + #define SUBTARGET_EXTRA_SPECS + #endif +- ++#endif ++ + #define DBX_DEBUGGING_INFO 1 /* generate stabs (OSF/rose) */ + #define DWARF2_DEBUGGING_INFO 1 /* dwarf2 debugging info */ + diff --git a/gcc/patches/37_all_gcc48_config_ia64.patch b/gcc/patches/37_all_gcc48_config_ia64.patch new file mode 100644 index 000000000..ba7192274 --- /dev/null +++ b/gcc/patches/37_all_gcc48_config_ia64.patch @@ -0,0 +1,30 @@ +2013-06-03 Magnus Granberg + + * gcc/config/ia64/linux.h Define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC. + * gcc/config/ia64/ia64.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. + +--- a/gcc/config/ia64/linux.h 2013-01-10 21:38:27.000000000 +0100 ++++ b/gcc/config/ia64/linux.h 2013-03-16 22:50:10.363049291 +0100 +@@ -88,3 +88,7 @@ do { \ + + /* Define this to be nonzero if static stack checking is supported. */ + #define STACK_CHECK_STATIC_BUILTIN 1 ++ ++#ifdef ENABLE_ESP ++#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC ++#endif +--- a/gcc/config/ia64/ia64.h 2013-01-10 21:38:27.000000000 +0100 ++++ b/gcc/config/ia64/ia64.h 2013-03-26 02:03:21.052061828 +0100 +@@ -41,8 +41,12 @@ do { \ + } while (0) + + #ifndef SUBTARGET_EXTRA_SPECS ++#ifdef ENABLE_ESP ++#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS ++#else + #define SUBTARGET_EXTRA_SPECS + #endif ++#endif + + #define EXTRA_SPECS \ + { "asm_extra", ASM_EXTRA_SPEC }, \ diff --git a/gcc/patches/40_all_gcc49_config_esp.patch0 b/gcc/patches/40_all_gcc49_config_esp.patch0 index ec3482eab..16cc2b4d1 100644 --- a/gcc/patches/40_all_gcc49_config_esp.patch0 +++ b/gcc/patches/40_all_gcc49_config_esp.patch0 @@ -5,7 +5,7 @@ --- gcc/config/esp.h 2010-04-09 16:14:00.000000000 +0200 +++ gcc/config/esp.h 2012-06-23 01:00:31.248348491 +0200 -@@ -0,0 +1,127 @@ +@@ -0,0 +1,132 @@ +/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. + * Version 20140512.1 + * Magnus Granberg (Zorry) */ @@ -52,10 +52,15 @@ + /* 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 ) ++ #ifdef ESP_NO_STACK_CHECK ++ #define ESP_OPTIONS_STACK_CHECK_SPEC ++ #else ++ #define ESP_OPTIONS_STACK_CHECK_SPEC "%{fstack-check|fstack-check=*:;: -fstack-check}" ++ #endif + #define ESP_OPTIONS_SSP_SPEC \ + "%{nostdlib|ffreestanding|fno-stack-protector|fstack-protector| \ -+ fstack-protector-all|fstack-protector-strong:;:-fstack-protector-all} \ -+ %{fstack-check|fstack-check=*:;: -fstack-check}" ++ fstack-protector-all|fstack-protector-strong:;:-fstack-protector-all} " \ ++ ESP_OPTIONS_STACK_CHECK_SPEC + #else + #define ESP_OPTIONS_SSP_SPEC "" + #endif diff --git a/gcc/patches/53_all_libitm-no-fortify-source.patch b/gcc/patches/53_all_libitm-no-fortify-source.patch deleted file mode 100644 index 5ab15afc3..000000000 --- a/gcc/patches/53_all_libitm-no-fortify-source.patch +++ /dev/null @@ -1,27 +0,0 @@ -https://bugs.gentoo.org/508852 -https://gcc.gnu.org/PR61164 - -2014-04-27 Magnus Granberg - - #508852 - * libitm/configure.tgt: Disable FORTIFY - ---- a/libitm/configure.tgt -+++ b/libitm/configure.tgt -@@ -43,6 +43,16 @@ if test "$gcc_cv_have_tls" = yes ; then - esac - fi - -+# FIXME: error: inlining failed in call to always_inline -+# ‘int vfprintf(FILE*, const char*, __va_list_tag*)’ -+# : function body can be overwritten at link time -+# Disable Fortify in libitm for now. #508852 -+case "${target}" in -+ *-*-linux*) -+ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE" -+ ;; -+esac -+ - # Map the target cpu to an ARCH sub-directory. At the same time, - # work out any special compilation flags as necessary. - case "${target_cpu}" in diff --git a/gcc/patches/gcc49-aarch64-unwind-opt.patch0 b/gcc/patches/gcc49-aarch64-unwind-opt.patch0 deleted file mode 100644 index 3ad55ab2a..000000000 --- a/gcc/patches/gcc49-aarch64-unwind-opt.patch0 +++ /dev/null @@ -1,338 +0,0 @@ -2014-08-08 Richard Henderson - - * config/aarch64/aarch64.c (aarch64_save_or_restore_fprs): Add - cfi_ops argument, for restore put REG_CFA_RESTORE notes into - *cfi_ops rather than on individual insns. Cleanup. - (aarch64_save_or_restore_callee_save_registers): Likewise. - (aarch64_expand_prologue): Adjust caller. - (aarch64_expand_epilogue): Likewise. Cleanup. Emit queued cfi_ops - on the stack restore insn. - ---- gcc/config/aarch64/aarch64.c.jj 2014-07-08 17:38:17.398231989 +0200 -+++ gcc/config/aarch64/aarch64.c 2014-08-13 10:02:45.599757706 +0200 -@@ -1810,8 +1810,7 @@ aarch64_register_saved_on_entry (int reg - - static void - aarch64_save_or_restore_fprs (int start_offset, int increment, -- bool restore, rtx base_rtx) -- -+ bool restore, rtx base_rtx, rtx *cfi_ops) - { - unsigned regno; - unsigned regno2; -@@ -1819,16 +1818,16 @@ aarch64_save_or_restore_fprs (int start_ - rtx (*gen_mem_ref)(enum machine_mode, rtx) - = (frame_pointer_needed)? gen_frame_mem : gen_rtx_MEM; - -- - for (regno = V0_REGNUM; regno <= V31_REGNUM; regno++) - { - if (aarch64_register_saved_on_entry (regno)) - { -- rtx mem; -+ rtx mem, reg1; - mem = gen_mem_ref (DFmode, - plus_constant (Pmode, - base_rtx, - start_offset)); -+ reg1 = gen_rtx_REG (DFmode, regno); - - for (regno2 = regno + 1; - regno2 <= V31_REGNUM -@@ -1840,56 +1839,51 @@ aarch64_save_or_restore_fprs (int start_ - if (regno2 <= V31_REGNUM && - aarch64_register_saved_on_entry (regno2)) - { -- rtx mem2; -+ rtx mem2, reg2; - /* Next highest register to be saved. */ - mem2 = gen_mem_ref (DFmode, - plus_constant - (Pmode, - base_rtx, - start_offset + increment)); -+ reg2 = gen_rtx_REG (DFmode, regno2); -+ - if (restore == false) - { -- insn = emit_insn -- ( gen_store_pairdf (mem, gen_rtx_REG (DFmode, regno), -- mem2, gen_rtx_REG (DFmode, regno2))); -- -+ insn = emit_insn (gen_store_pairdf (mem, reg1, mem2, reg2)); -+ /* The first part of a frame-related parallel insn -+ is always assumed to be relevant to the frame -+ calculations; subsequent parts, are only -+ frame-related if explicitly marked. */ -+ RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1; -+ RTX_FRAME_RELATED_P (insn) = 1; - } - else - { -- insn = emit_insn -- ( gen_load_pairdf (gen_rtx_REG (DFmode, regno), mem, -- gen_rtx_REG (DFmode, regno2), mem2)); -- -- add_reg_note (insn, REG_CFA_RESTORE, -- gen_rtx_REG (DFmode, regno)); -- add_reg_note (insn, REG_CFA_RESTORE, -- gen_rtx_REG (DFmode, regno2)); -+ emit_insn (gen_load_pairdf (reg1, mem, reg2, mem2)); -+ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops); -+ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg2, *cfi_ops); - } - -- /* The first part of a frame-related parallel insn -- is always assumed to be relevant to the frame -- calculations; subsequent parts, are only -- frame-related if explicitly marked. */ -- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1; - regno = regno2; - start_offset += increment * 2; - } - else - { - if (restore == false) -- insn = emit_move_insn (mem, gen_rtx_REG (DFmode, regno)); -+ { -+ insn = emit_move_insn (mem, reg1); -+ RTX_FRAME_RELATED_P (insn) = 1; -+ } - else - { -- insn = emit_move_insn (gen_rtx_REG (DFmode, regno), mem); -- add_reg_note (insn, REG_CFA_RESTORE, -- gen_rtx_REG (DImode, regno)); -+ emit_move_insn (reg1, mem); -+ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops); - } - start_offset += increment; - } -- RTX_FRAME_RELATED_P (insn) = 1; - } - } -- - } - - -@@ -1897,13 +1891,14 @@ aarch64_save_or_restore_fprs (int start_ - restore's have to happen. */ - static void - aarch64_save_or_restore_callee_save_registers (HOST_WIDE_INT offset, -- bool restore) -+ bool restore, rtx *cfi_ops) - { - rtx insn; - rtx base_rtx = stack_pointer_rtx; - HOST_WIDE_INT start_offset = offset; - HOST_WIDE_INT increment = UNITS_PER_WORD; -- rtx (*gen_mem_ref)(enum machine_mode, rtx) = (frame_pointer_needed)? gen_frame_mem : gen_rtx_MEM; -+ rtx (*gen_mem_ref)(enum machine_mode, rtx) -+ = (frame_pointer_needed)? gen_frame_mem : gen_rtx_MEM; - unsigned limit = (frame_pointer_needed)? R28_REGNUM: R30_REGNUM; - unsigned regno; - unsigned regno2; -@@ -1912,11 +1907,13 @@ aarch64_save_or_restore_callee_save_regi - { - if (aarch64_register_saved_on_entry (regno)) - { -- rtx mem; -+ rtx mem, reg1; -+ - mem = gen_mem_ref (Pmode, - plus_constant (Pmode, - base_rtx, - start_offset)); -+ reg1 = gen_rtx_REG (DImode, regno); - - for (regno2 = regno + 1; - regno2 <= limit -@@ -1928,56 +1925,54 @@ aarch64_save_or_restore_callee_save_regi - if (regno2 <= limit && - aarch64_register_saved_on_entry (regno2)) - { -- rtx mem2; -+ rtx mem2, reg2; - /* Next highest register to be saved. */ - mem2 = gen_mem_ref (Pmode, - plus_constant - (Pmode, - base_rtx, - start_offset + increment)); -+ reg2 = gen_rtx_REG (DImode, regno2); -+ - if (restore == false) - { -- insn = emit_insn -- ( gen_store_pairdi (mem, gen_rtx_REG (DImode, regno), -- mem2, gen_rtx_REG (DImode, regno2))); -- -+ insn = emit_insn (gen_store_pairdi (mem, reg1, mem2, reg2)); -+ /* The first part of a frame-related parallel insn -+ is always assumed to be relevant to the frame -+ calculations; subsequent parts, are only -+ frame-related if explicitly marked. */ -+ RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1; -+ RTX_FRAME_RELATED_P (insn) = 1; - } - else - { -- insn = emit_insn -- ( gen_load_pairdi (gen_rtx_REG (DImode, regno), mem, -- gen_rtx_REG (DImode, regno2), mem2)); -- -- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno)); -- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno2)); -+ emit_insn (gen_load_pairdi (reg1, mem, reg2, mem2)); -+ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops); -+ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg2, *cfi_ops); - } - -- /* The first part of a frame-related parallel insn -- is always assumed to be relevant to the frame -- calculations; subsequent parts, are only -- frame-related if explicitly marked. */ -- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, -- 1)) = 1; - regno = regno2; - start_offset += increment * 2; - } - else - { - if (restore == false) -- insn = emit_move_insn (mem, gen_rtx_REG (DImode, regno)); -+ { -+ insn = emit_move_insn (mem, reg1); -+ RTX_FRAME_RELATED_P (insn) = 1; -+ } - else - { -- insn = emit_move_insn (gen_rtx_REG (DImode, regno), mem); -- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno)); -+ emit_move_insn (reg1, mem); -+ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops); - } - start_offset += increment; - } -- RTX_FRAME_RELATED_P (insn) = 1; - } - } - -- aarch64_save_or_restore_fprs (start_offset, increment, restore, base_rtx); -- -+ aarch64_save_or_restore_fprs (start_offset, increment, restore, -+ base_rtx, cfi_ops); - } - - /* AArch64 stack frames generated by this compiler look like: -@@ -2179,7 +2174,7 @@ aarch64_expand_prologue (void) - } - - aarch64_save_or_restore_callee_save_registers -- (fp_offset + cfun->machine->frame.hardfp_offset, 0); -+ (fp_offset + cfun->machine->frame.hardfp_offset, 0, NULL); - } - - /* when offset >= 512, -@@ -2248,15 +2243,18 @@ aarch64_expand_epilogue (bool for_sibcal - insn = emit_insn (gen_add3_insn (stack_pointer_rtx, - hard_frame_pointer_rtx, - GEN_INT (- fp_offset))); -+ /* CFA should be calculated from the value of SP from now on. */ -+ add_reg_note (insn, REG_CFA_ADJUST_CFA, -+ gen_rtx_SET (VOIDmode, stack_pointer_rtx, -+ plus_constant (Pmode, hard_frame_pointer_rtx, -+ -fp_offset))); - RTX_FRAME_RELATED_P (insn) = 1; -- /* As SP is set to (FP - fp_offset), according to the rules in -- dwarf2cfi.c:dwarf2out_frame_debug_expr, CFA should be calculated -- from the value of SP from now on. */ - cfa_reg = stack_pointer_rtx; - } - -+ rtx cfi_ops = NULL; - aarch64_save_or_restore_callee_save_registers -- (fp_offset + cfun->machine->frame.hardfp_offset, 1); -+ (fp_offset + cfun->machine->frame.hardfp_offset, 1, &cfi_ops); - - /* Restore the frame pointer and lr if the frame pointer is needed. */ - if (offset > 0) -@@ -2264,6 +2262,8 @@ aarch64_expand_epilogue (bool for_sibcal - if (frame_pointer_needed) - { - rtx mem_fp, mem_lr; -+ rtx reg_fp = hard_frame_pointer_rtx; -+ rtx reg_lr = gen_rtx_REG (DImode, LR_REGNUM); - - if (fp_offset) - { -@@ -2276,52 +2276,36 @@ aarch64_expand_epilogue (bool for_sibcal - stack_pointer_rtx, - fp_offset - + UNITS_PER_WORD)); -- insn = emit_insn (gen_load_pairdi (hard_frame_pointer_rtx, -- mem_fp, -- gen_rtx_REG (DImode, -- LR_REGNUM), -- mem_lr)); -+ emit_insn (gen_load_pairdi (reg_fp, mem_fp, reg_lr, mem_lr)); -+ -+ insn = emit_insn (gen_add2_insn (stack_pointer_rtx, -+ GEN_INT (offset))); - } - else - { - insn = emit_insn (gen_loadwb_pairdi_di -- (stack_pointer_rtx, -- stack_pointer_rtx, -- hard_frame_pointer_rtx, -- gen_rtx_REG (DImode, LR_REGNUM), -- GEN_INT (offset), -+ (stack_pointer_rtx, stack_pointer_rtx, -+ reg_fp, reg_lr, GEN_INT (offset), - GEN_INT (GET_MODE_SIZE (DImode) + offset))); -- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 2)) = 1; -- add_reg_note (insn, REG_CFA_ADJUST_CFA, -- (gen_rtx_SET (Pmode, stack_pointer_rtx, -- plus_constant (Pmode, cfa_reg, -- offset)))); -- } -- -- /* The first part of a frame-related parallel insn -- is always assumed to be relevant to the frame -- calculations; subsequent parts, are only -- frame-related if explicitly marked. */ -- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1; -- RTX_FRAME_RELATED_P (insn) = 1; -- add_reg_note (insn, REG_CFA_RESTORE, hard_frame_pointer_rtx); -- add_reg_note (insn, REG_CFA_RESTORE, -- gen_rtx_REG (DImode, LR_REGNUM)); -- -- if (fp_offset) -- { -- insn = emit_insn (gen_add2_insn (stack_pointer_rtx, -- GEN_INT (offset))); -- RTX_FRAME_RELATED_P (insn) = 1; - } -+ cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg_fp, cfi_ops); -+ cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg_lr, cfi_ops); - } - else - { - insn = emit_insn (gen_add2_insn (stack_pointer_rtx, - GEN_INT (offset))); -- RTX_FRAME_RELATED_P (insn) = 1; - } -+ cfi_ops = alloc_reg_note (REG_CFA_ADJUST_CFA, -+ gen_rtx_SET (VOIDmode, stack_pointer_rtx, -+ plus_constant (Pmode, cfa_reg, -+ offset)), -+ cfi_ops); -+ REG_NOTES (insn) = cfi_ops; -+ RTX_FRAME_RELATED_P (insn) = 1; - } -+ else -+ gcc_assert (cfi_ops == NULL); - - /* Stack adjustment for exception handler. */ - if (crtl->calls_eh_return) diff --git a/gcc/patches/gcc49-cloog-dl.patch0 b/gcc/patches/gcc49-cloog-dl.patch0 deleted file mode 100644 index 8a7250926..000000000 --- a/gcc/patches/gcc49-cloog-dl.patch0 +++ /dev/null @@ -1,476 +0,0 @@ ---- gcc/Makefile.in.jj 2012-12-13 17:09:20.000000000 +0100 -+++ gcc/Makefile.in 2012-12-14 11:45:22.585670055 +0100 -@@ -1006,7 +1006,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) - # and the system's installed libraries. - LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \ - $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) --BACKENDLIBS = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ -+BACKENDLIBS = $(if $(CLOOGLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ - $(ZLIB) - # Any system libraries needed just for GNAT. - SYSLIBS = @GNAT_LIBEXC@ -@@ -2011,6 +2011,15 @@ $(out_object_file): $(out_file) - $(common_out_object_file): $(common_out_file) - $(COMPILE) $< - $(POSTCOMPILE) -+ -+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)) - # - # Generate header and source files from the machine description, - # and compile them. ---- gcc/graphite-poly.h.jj 2012-12-13 11:31:27.000000000 +0100 -+++ gcc/graphite-poly.h 2012-12-14 13:41:41.970800726 +0100 -@@ -22,6 +22,371 @@ along with GCC; see the file COPYING3. - #ifndef GCC_GRAPHITE_POLY_H - #define GCC_GRAPHITE_POLY_H - -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#define DYNSYMS \ -+ DYNSYM (clast_pprint); \ -+ DYNSYM (cloog_clast_create_from_input); \ -+ DYNSYM (cloog_clast_free); \ -+ DYNSYM (cloog_domain_from_isl_set); \ -+ DYNSYM (cloog_input_alloc); \ -+ DYNSYM (cloog_isl_state_malloc); \ -+ DYNSYM (cloog_options_free); \ -+ DYNSYM (cloog_options_malloc); \ -+ DYNSYM (cloog_scattering_from_isl_map); \ -+ DYNSYM (cloog_state_free); \ -+ DYNSYM (cloog_union_domain_add_domain); \ -+ DYNSYM (cloog_union_domain_alloc); \ -+ DYNSYM (cloog_union_domain_set_name); \ -+ DYNSYM (isl_aff_add_coefficient_si); \ -+ DYNSYM (isl_aff_add_constant); \ -+ DYNSYM (isl_aff_free); \ -+ DYNSYM (isl_aff_get_coefficient); \ -+ DYNSYM (isl_aff_get_space); \ -+ DYNSYM (isl_aff_mod); \ -+ DYNSYM (isl_aff_set_coefficient_si); \ -+ DYNSYM (isl_aff_set_constant_si); \ -+ DYNSYM (isl_aff_zero_on_domain); \ -+ DYNSYM (isl_band_free); \ -+ DYNSYM (isl_band_get_children); \ -+ DYNSYM (isl_band_get_partial_schedule); \ -+ DYNSYM (isl_band_has_children); \ -+ DYNSYM (isl_band_list_free); \ -+ DYNSYM (isl_band_list_get_band); \ -+ DYNSYM (isl_band_list_get_ctx); \ -+ DYNSYM (isl_band_list_n_band); \ -+ DYNSYM (isl_band_member_is_zero_distance); \ -+ DYNSYM (isl_band_n_member); \ -+ DYNSYM (isl_basic_map_add_constraint); \ -+ DYNSYM (isl_basic_map_project_out); \ -+ DYNSYM (isl_basic_map_universe); \ -+ DYNSYM (isl_constraint_set_coefficient); \ -+ DYNSYM (isl_constraint_set_coefficient_si); \ -+ DYNSYM (isl_constraint_set_constant); \ -+ DYNSYM (isl_constraint_set_constant_si); \ -+ DYNSYM (isl_ctx_alloc); \ -+ DYNSYM (isl_ctx_free); \ -+ DYNSYM (isl_equality_alloc); \ -+ DYNSYM (isl_id_alloc); \ -+ DYNSYM (isl_id_copy); \ -+ DYNSYM (isl_id_free); \ -+ DYNSYM (isl_inequality_alloc); \ -+ DYNSYM (isl_local_space_copy); \ -+ DYNSYM (isl_local_space_free); \ -+ DYNSYM (isl_local_space_from_space); \ -+ DYNSYM (isl_local_space_range); \ -+ DYNSYM (isl_map_add_constraint); \ -+ DYNSYM (isl_map_add_dims); \ -+ DYNSYM (isl_map_align_params); \ -+ DYNSYM (isl_map_apply_range); \ -+ DYNSYM (isl_map_copy); \ -+ DYNSYM (isl_map_dim); \ -+ DYNSYM (isl_map_dump); \ -+ DYNSYM (isl_map_equate); \ -+ DYNSYM (isl_map_fix_si); \ -+ DYNSYM (isl_map_flat_product); \ -+ DYNSYM (isl_map_flat_range_product); \ -+ DYNSYM (isl_map_free); \ -+ DYNSYM (isl_map_from_basic_map); \ -+ DYNSYM (isl_map_from_pw_aff); \ -+ DYNSYM (isl_map_from_union_map); \ -+ DYNSYM (isl_map_get_ctx); \ -+ DYNSYM (isl_map_get_space); \ -+ DYNSYM (isl_map_get_tuple_id); \ -+ DYNSYM (isl_map_insert_dims); \ -+ DYNSYM (isl_map_intersect); \ -+ DYNSYM (isl_map_intersect_domain); \ -+ DYNSYM (isl_map_intersect_range); \ -+ DYNSYM (isl_map_is_empty); \ -+ DYNSYM (isl_map_lex_ge); \ -+ DYNSYM (isl_map_lex_le); \ -+ DYNSYM (isl_map_n_out); \ -+ DYNSYM (isl_map_range); \ -+ DYNSYM (isl_map_set_tuple_id); \ -+ DYNSYM (isl_map_universe); \ -+ DYNSYM (isl_options_set_on_error); \ -+ DYNSYM (isl_options_set_schedule_fuse); \ -+ DYNSYM (isl_options_set_schedule_max_constant_term); \ -+ DYNSYM (isl_options_set_schedule_maximize_band_depth); \ -+ DYNSYM (isl_printer_free); \ -+ DYNSYM (isl_printer_print_aff); \ -+ DYNSYM (isl_printer_print_constraint); \ -+ DYNSYM (isl_printer_print_map); \ -+ DYNSYM (isl_printer_print_set); \ -+ DYNSYM (isl_printer_to_file); \ -+ DYNSYM (isl_pw_aff_add); \ -+ DYNSYM (isl_pw_aff_alloc); \ -+ DYNSYM (isl_pw_aff_copy); \ -+ DYNSYM (isl_pw_aff_eq_set); \ -+ DYNSYM (isl_pw_aff_free); \ -+ DYNSYM (isl_pw_aff_from_aff); \ -+ DYNSYM (isl_pw_aff_ge_set); \ -+ DYNSYM (isl_pw_aff_gt_set); \ -+ DYNSYM (isl_pw_aff_is_cst); \ -+ DYNSYM (isl_pw_aff_le_set); \ -+ DYNSYM (isl_pw_aff_lt_set); \ -+ DYNSYM (isl_pw_aff_mod); \ -+ DYNSYM (isl_pw_aff_mul); \ -+ DYNSYM (isl_pw_aff_ne_set); \ -+ DYNSYM (isl_pw_aff_nonneg_set); \ -+ DYNSYM (isl_pw_aff_set_tuple_id); \ -+ DYNSYM (isl_pw_aff_sub); \ -+ DYNSYM (isl_pw_aff_zero_set); \ -+ DYNSYM (isl_schedule_free); \ -+ DYNSYM (isl_schedule_get_band_forest); \ -+ DYNSYM (isl_set_add_constraint); \ -+ DYNSYM (isl_set_add_dims); \ -+ DYNSYM (isl_set_apply); \ -+ DYNSYM (isl_set_coalesce); \ -+ DYNSYM (isl_set_copy); \ -+ DYNSYM (isl_set_dim); \ -+ DYNSYM (isl_set_fix_si); \ -+ DYNSYM (isl_set_free); \ -+ DYNSYM (isl_set_from_cloog_domain); \ -+ DYNSYM (isl_set_get_space); \ -+ DYNSYM (isl_set_get_tuple_id); \ -+ DYNSYM (isl_set_intersect); \ -+ DYNSYM (isl_set_is_empty); \ -+ DYNSYM (isl_set_max); \ -+ DYNSYM (isl_set_min); \ -+ DYNSYM (isl_set_n_dim); \ -+ DYNSYM (isl_set_nat_universe); \ -+ DYNSYM (isl_set_project_out); \ -+ DYNSYM (isl_set_set_tuple_id); \ -+ DYNSYM (isl_set_universe); \ -+ DYNSYM (isl_space_add_dims); \ -+ DYNSYM (isl_space_alloc); \ -+ DYNSYM (isl_space_copy); \ -+ DYNSYM (isl_space_dim); \ -+ DYNSYM (isl_space_domain); \ -+ DYNSYM (isl_space_find_dim_by_id); \ -+ DYNSYM (isl_space_free); \ -+ DYNSYM (isl_space_from_domain); \ -+ DYNSYM (isl_space_get_tuple_id); \ -+ DYNSYM (isl_space_params_alloc); \ -+ DYNSYM (isl_space_range); \ -+ DYNSYM (isl_space_set_alloc); \ -+ DYNSYM (isl_space_set_dim_id); \ -+ DYNSYM (isl_space_set_tuple_id); \ -+ DYNSYM (isl_union_map_add_map); \ -+ DYNSYM (isl_union_map_align_params); \ -+ DYNSYM (isl_union_map_apply_domain); \ -+ DYNSYM (isl_union_map_apply_range); \ -+ DYNSYM (isl_union_map_compute_flow); \ -+ DYNSYM (isl_union_map_copy); \ -+ DYNSYM (isl_union_map_empty); \ -+ DYNSYM (isl_union_map_flat_range_product); \ -+ DYNSYM (isl_union_map_foreach_map); \ -+ DYNSYM (isl_union_map_free); \ -+ DYNSYM (isl_union_map_from_map); \ -+ DYNSYM (isl_union_map_get_ctx); \ -+ DYNSYM (isl_union_map_get_space); \ -+ DYNSYM (isl_union_map_gist_domain); \ -+ DYNSYM (isl_union_map_gist_range); \ -+ DYNSYM (isl_union_map_intersect_domain); \ -+ DYNSYM (isl_union_map_is_empty); \ -+ DYNSYM (isl_union_map_subtract); \ -+ DYNSYM (isl_union_map_union); \ -+ DYNSYM (isl_union_set_add_set); \ -+ DYNSYM (isl_union_set_compute_schedule); \ -+ DYNSYM (isl_union_set_copy); \ -+ DYNSYM (isl_union_set_empty); \ -+ DYNSYM (isl_union_set_from_set); \ -+ DYNSYM (stmt_ass); \ -+ DYNSYM (stmt_block); \ -+ DYNSYM (stmt_for); \ -+ DYNSYM (stmt_guard); \ -+ DYNSYM (stmt_root); \ -+ DYNSYM (stmt_user); -+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 clast_pprint (*cloog_pointers__.p_clast_pprint) -+#define cloog_clast_create_from_input (*cloog_pointers__.p_cloog_clast_create_from_input) -+#define cloog_clast_free (*cloog_pointers__.p_cloog_clast_free) -+#define cloog_domain_from_isl_set (*cloog_pointers__.p_cloog_domain_from_isl_set) -+#define cloog_input_alloc (*cloog_pointers__.p_cloog_input_alloc) -+#define cloog_isl_state_malloc (*cloog_pointers__.p_cloog_isl_state_malloc) -+#define cloog_options_free (*cloog_pointers__.p_cloog_options_free) -+#define cloog_options_malloc (*cloog_pointers__.p_cloog_options_malloc) -+#define cloog_scattering_from_isl_map (*cloog_pointers__.p_cloog_scattering_from_isl_map) -+#define cloog_state_free (*cloog_pointers__.p_cloog_state_free) -+#define cloog_union_domain_add_domain (*cloog_pointers__.p_cloog_union_domain_add_domain) -+#define cloog_union_domain_alloc (*cloog_pointers__.p_cloog_union_domain_alloc) -+#define cloog_union_domain_set_name (*cloog_pointers__.p_cloog_union_domain_set_name) -+#define isl_aff_add_coefficient_si (*cloog_pointers__.p_isl_aff_add_coefficient_si) -+#define isl_aff_add_constant (*cloog_pointers__.p_isl_aff_add_constant) -+#define isl_aff_free (*cloog_pointers__.p_isl_aff_free) -+#define isl_aff_get_coefficient (*cloog_pointers__.p_isl_aff_get_coefficient) -+#define isl_aff_get_space (*cloog_pointers__.p_isl_aff_get_space) -+#define isl_aff_mod (*cloog_pointers__.p_isl_aff_mod) -+#define isl_aff_set_coefficient_si (*cloog_pointers__.p_isl_aff_set_coefficient_si) -+#define isl_aff_set_constant_si (*cloog_pointers__.p_isl_aff_set_constant_si) -+#define isl_aff_zero_on_domain (*cloog_pointers__.p_isl_aff_zero_on_domain) -+#define isl_band_free (*cloog_pointers__.p_isl_band_free) -+#define isl_band_get_children (*cloog_pointers__.p_isl_band_get_children) -+#define isl_band_get_partial_schedule (*cloog_pointers__.p_isl_band_get_partial_schedule) -+#define isl_band_has_children (*cloog_pointers__.p_isl_band_has_children) -+#define isl_band_list_free (*cloog_pointers__.p_isl_band_list_free) -+#define isl_band_list_get_band (*cloog_pointers__.p_isl_band_list_get_band) -+#define isl_band_list_get_ctx (*cloog_pointers__.p_isl_band_list_get_ctx) -+#define isl_band_list_n_band (*cloog_pointers__.p_isl_band_list_n_band) -+#define isl_band_member_is_zero_distance (*cloog_pointers__.p_isl_band_member_is_zero_distance) -+#define isl_band_n_member (*cloog_pointers__.p_isl_band_n_member) -+#define isl_basic_map_add_constraint (*cloog_pointers__.p_isl_basic_map_add_constraint) -+#define isl_basic_map_project_out (*cloog_pointers__.p_isl_basic_map_project_out) -+#define isl_basic_map_universe (*cloog_pointers__.p_isl_basic_map_universe) -+#define isl_constraint_set_coefficient (*cloog_pointers__.p_isl_constraint_set_coefficient) -+#define isl_constraint_set_coefficient_si (*cloog_pointers__.p_isl_constraint_set_coefficient_si) -+#define isl_constraint_set_constant (*cloog_pointers__.p_isl_constraint_set_constant) -+#define isl_constraint_set_constant_si (*cloog_pointers__.p_isl_constraint_set_constant_si) -+#define isl_ctx_alloc (*cloog_pointers__.p_isl_ctx_alloc) -+#define isl_ctx_free (*cloog_pointers__.p_isl_ctx_free) -+#define isl_equality_alloc (*cloog_pointers__.p_isl_equality_alloc) -+#define isl_id_alloc (*cloog_pointers__.p_isl_id_alloc) -+#define isl_id_copy (*cloog_pointers__.p_isl_id_copy) -+#define isl_id_free (*cloog_pointers__.p_isl_id_free) -+#define isl_inequality_alloc (*cloog_pointers__.p_isl_inequality_alloc) -+#define isl_local_space_copy (*cloog_pointers__.p_isl_local_space_copy) -+#define isl_local_space_free (*cloog_pointers__.p_isl_local_space_free) -+#define isl_local_space_from_space (*cloog_pointers__.p_isl_local_space_from_space) -+#define isl_local_space_range (*cloog_pointers__.p_isl_local_space_range) -+#define isl_map_add_constraint (*cloog_pointers__.p_isl_map_add_constraint) -+#define isl_map_add_dims (*cloog_pointers__.p_isl_map_add_dims) -+#define isl_map_align_params (*cloog_pointers__.p_isl_map_align_params) -+#define isl_map_apply_range (*cloog_pointers__.p_isl_map_apply_range) -+#define isl_map_copy (*cloog_pointers__.p_isl_map_copy) -+#define isl_map_dim (*cloog_pointers__.p_isl_map_dim) -+#define isl_map_dump (*cloog_pointers__.p_isl_map_dump) -+#define isl_map_equate (*cloog_pointers__.p_isl_map_equate) -+#define isl_map_fix_si (*cloog_pointers__.p_isl_map_fix_si) -+#define isl_map_flat_product (*cloog_pointers__.p_isl_map_flat_product) -+#define isl_map_flat_range_product (*cloog_pointers__.p_isl_map_flat_range_product) -+#define isl_map_free (*cloog_pointers__.p_isl_map_free) -+#define isl_map_from_basic_map (*cloog_pointers__.p_isl_map_from_basic_map) -+#define isl_map_from_pw_aff (*cloog_pointers__.p_isl_map_from_pw_aff) -+#define isl_map_from_union_map (*cloog_pointers__.p_isl_map_from_union_map) -+#define isl_map_get_ctx (*cloog_pointers__.p_isl_map_get_ctx) -+#define isl_map_get_space (*cloog_pointers__.p_isl_map_get_space) -+#define isl_map_get_tuple_id (*cloog_pointers__.p_isl_map_get_tuple_id) -+#define isl_map_insert_dims (*cloog_pointers__.p_isl_map_insert_dims) -+#define isl_map_intersect (*cloog_pointers__.p_isl_map_intersect) -+#define isl_map_intersect_domain (*cloog_pointers__.p_isl_map_intersect_domain) -+#define isl_map_intersect_range (*cloog_pointers__.p_isl_map_intersect_range) -+#define isl_map_is_empty (*cloog_pointers__.p_isl_map_is_empty) -+#define isl_map_lex_ge (*cloog_pointers__.p_isl_map_lex_ge) -+#define isl_map_lex_le (*cloog_pointers__.p_isl_map_lex_le) -+#define isl_map_n_out (*cloog_pointers__.p_isl_map_n_out) -+#define isl_map_range (*cloog_pointers__.p_isl_map_range) -+#define isl_map_set_tuple_id (*cloog_pointers__.p_isl_map_set_tuple_id) -+#define isl_map_universe (*cloog_pointers__.p_isl_map_universe) -+#define isl_options_set_on_error (*cloog_pointers__.p_isl_options_set_on_error) -+#define isl_options_set_schedule_fuse (*cloog_pointers__.p_isl_options_set_schedule_fuse) -+#define isl_options_set_schedule_max_constant_term (*cloog_pointers__.p_isl_options_set_schedule_max_constant_term) -+#define isl_options_set_schedule_maximize_band_depth (*cloog_pointers__.p_isl_options_set_schedule_maximize_band_depth) -+#define isl_printer_free (*cloog_pointers__.p_isl_printer_free) -+#define isl_printer_print_aff (*cloog_pointers__.p_isl_printer_print_aff) -+#define isl_printer_print_constraint (*cloog_pointers__.p_isl_printer_print_constraint) -+#define isl_printer_print_map (*cloog_pointers__.p_isl_printer_print_map) -+#define isl_printer_print_set (*cloog_pointers__.p_isl_printer_print_set) -+#define isl_printer_to_file (*cloog_pointers__.p_isl_printer_to_file) -+#define isl_pw_aff_add (*cloog_pointers__.p_isl_pw_aff_add) -+#define isl_pw_aff_alloc (*cloog_pointers__.p_isl_pw_aff_alloc) -+#define isl_pw_aff_copy (*cloog_pointers__.p_isl_pw_aff_copy) -+#define isl_pw_aff_eq_set (*cloog_pointers__.p_isl_pw_aff_eq_set) -+#define isl_pw_aff_free (*cloog_pointers__.p_isl_pw_aff_free) -+#define isl_pw_aff_from_aff (*cloog_pointers__.p_isl_pw_aff_from_aff) -+#define isl_pw_aff_ge_set (*cloog_pointers__.p_isl_pw_aff_ge_set) -+#define isl_pw_aff_gt_set (*cloog_pointers__.p_isl_pw_aff_gt_set) -+#define isl_pw_aff_is_cst (*cloog_pointers__.p_isl_pw_aff_is_cst) -+#define isl_pw_aff_le_set (*cloog_pointers__.p_isl_pw_aff_le_set) -+#define isl_pw_aff_lt_set (*cloog_pointers__.p_isl_pw_aff_lt_set) -+#define isl_pw_aff_mod (*cloog_pointers__.p_isl_pw_aff_mod) -+#define isl_pw_aff_mul (*cloog_pointers__.p_isl_pw_aff_mul) -+#define isl_pw_aff_ne_set (*cloog_pointers__.p_isl_pw_aff_ne_set) -+#define isl_pw_aff_nonneg_set (*cloog_pointers__.p_isl_pw_aff_nonneg_set) -+#define isl_pw_aff_set_tuple_id (*cloog_pointers__.p_isl_pw_aff_set_tuple_id) -+#define isl_pw_aff_sub (*cloog_pointers__.p_isl_pw_aff_sub) -+#define isl_pw_aff_zero_set (*cloog_pointers__.p_isl_pw_aff_zero_set) -+#define isl_schedule_free (*cloog_pointers__.p_isl_schedule_free) -+#define isl_schedule_get_band_forest (*cloog_pointers__.p_isl_schedule_get_band_forest) -+#define isl_set_add_constraint (*cloog_pointers__.p_isl_set_add_constraint) -+#define isl_set_add_dims (*cloog_pointers__.p_isl_set_add_dims) -+#define isl_set_apply (*cloog_pointers__.p_isl_set_apply) -+#define isl_set_coalesce (*cloog_pointers__.p_isl_set_coalesce) -+#define isl_set_copy (*cloog_pointers__.p_isl_set_copy) -+#define isl_set_dim (*cloog_pointers__.p_isl_set_dim) -+#define isl_set_fix_si (*cloog_pointers__.p_isl_set_fix_si) -+#define isl_set_free (*cloog_pointers__.p_isl_set_free) -+#define isl_set_from_cloog_domain (*cloog_pointers__.p_isl_set_from_cloog_domain) -+#define isl_set_get_space (*cloog_pointers__.p_isl_set_get_space) -+#define isl_set_get_tuple_id (*cloog_pointers__.p_isl_set_get_tuple_id) -+#define isl_set_intersect (*cloog_pointers__.p_isl_set_intersect) -+#define isl_set_is_empty (*cloog_pointers__.p_isl_set_is_empty) -+#define isl_set_max (*cloog_pointers__.p_isl_set_max) -+#define isl_set_min (*cloog_pointers__.p_isl_set_min) -+#define isl_set_n_dim (*cloog_pointers__.p_isl_set_n_dim) -+#define isl_set_nat_universe (*cloog_pointers__.p_isl_set_nat_universe) -+#define isl_set_project_out (*cloog_pointers__.p_isl_set_project_out) -+#define isl_set_set_tuple_id (*cloog_pointers__.p_isl_set_set_tuple_id) -+#define isl_set_universe (*cloog_pointers__.p_isl_set_universe) -+#define isl_space_add_dims (*cloog_pointers__.p_isl_space_add_dims) -+#define isl_space_alloc (*cloog_pointers__.p_isl_space_alloc) -+#define isl_space_copy (*cloog_pointers__.p_isl_space_copy) -+#define isl_space_dim (*cloog_pointers__.p_isl_space_dim) -+#define isl_space_domain (*cloog_pointers__.p_isl_space_domain) -+#define isl_space_find_dim_by_id (*cloog_pointers__.p_isl_space_find_dim_by_id) -+#define isl_space_free (*cloog_pointers__.p_isl_space_free) -+#define isl_space_from_domain (*cloog_pointers__.p_isl_space_from_domain) -+#define isl_space_get_tuple_id (*cloog_pointers__.p_isl_space_get_tuple_id) -+#define isl_space_params_alloc (*cloog_pointers__.p_isl_space_params_alloc) -+#define isl_space_range (*cloog_pointers__.p_isl_space_range) -+#define isl_space_set_alloc (*cloog_pointers__.p_isl_space_set_alloc) -+#define isl_space_set_dim_id (*cloog_pointers__.p_isl_space_set_dim_id) -+#define isl_space_set_tuple_id (*cloog_pointers__.p_isl_space_set_tuple_id) -+#define isl_union_map_add_map (*cloog_pointers__.p_isl_union_map_add_map) -+#define isl_union_map_align_params (*cloog_pointers__.p_isl_union_map_align_params) -+#define isl_union_map_apply_domain (*cloog_pointers__.p_isl_union_map_apply_domain) -+#define isl_union_map_apply_range (*cloog_pointers__.p_isl_union_map_apply_range) -+#define isl_union_map_compute_flow (*cloog_pointers__.p_isl_union_map_compute_flow) -+#define isl_union_map_copy (*cloog_pointers__.p_isl_union_map_copy) -+#define isl_union_map_empty (*cloog_pointers__.p_isl_union_map_empty) -+#define isl_union_map_flat_range_product (*cloog_pointers__.p_isl_union_map_flat_range_product) -+#define isl_union_map_foreach_map (*cloog_pointers__.p_isl_union_map_foreach_map) -+#define isl_union_map_free (*cloog_pointers__.p_isl_union_map_free) -+#define isl_union_map_from_map (*cloog_pointers__.p_isl_union_map_from_map) -+#define isl_union_map_get_ctx (*cloog_pointers__.p_isl_union_map_get_ctx) -+#define isl_union_map_get_space (*cloog_pointers__.p_isl_union_map_get_space) -+#define isl_union_map_gist_domain (*cloog_pointers__.p_isl_union_map_gist_domain) -+#define isl_union_map_gist_range (*cloog_pointers__.p_isl_union_map_gist_range) -+#define isl_union_map_intersect_domain (*cloog_pointers__.p_isl_union_map_intersect_domain) -+#define isl_union_map_is_empty (*cloog_pointers__.p_isl_union_map_is_empty) -+#define isl_union_map_subtract (*cloog_pointers__.p_isl_union_map_subtract) -+#define isl_union_map_union (*cloog_pointers__.p_isl_union_map_union) -+#define isl_union_set_add_set (*cloog_pointers__.p_isl_union_set_add_set) -+#define isl_union_set_compute_schedule (*cloog_pointers__.p_isl_union_set_compute_schedule) -+#define isl_union_set_copy (*cloog_pointers__.p_isl_union_set_copy) -+#define isl_union_set_empty (*cloog_pointers__.p_isl_union_set_empty) -+#define isl_union_set_from_set (*cloog_pointers__.p_isl_union_set_from_set) -+#define stmt_ass (*cloog_pointers__.p_stmt_ass) -+#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) -+ - typedef struct poly_dr *poly_dr_p; - - typedef struct poly_bb *poly_bb_p; ---- gcc/graphite.c.jj 2012-12-13 11:31:00.000000000 +0100 -+++ gcc/graphite.c 2012-12-14 13:40:44.155136961 +0100 -@@ -78,6 +78,34 @@ 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-isl.so.4", 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 -@@ -277,6 +305,15 @@ graphite_transform_loops (void) - if (parallelized_function_p (cfun->decl)) - return; - -+ if (number_of_loops (cfun) <= 1) -+ return; -+ -+ if (!init_cloog_pointers ()) -+ { -+ sorry ("Graphite loop optimizations cannot be used"); -+ return; -+ } -+ - ctx = isl_ctx_alloc (); - isl_options_set_on_error (ctx, ISL_ON_ERROR_ABORT); - if (!graphite_initialize (ctx)) ---- gcc/graphite-clast-to-gimple.c.jj 2012-12-13 11:31:27.000000000 +0100 -+++ gcc/graphite-clast-to-gimple.c 2012-12-14 13:27:47.196519858 +0100 -@@ -910,7 +910,7 @@ compute_bounds_for_loop (struct clast_fo - 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; -@@ -918,8 +918,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); diff --git a/gcc/patches/gcc49-cloog-dl2.patch0 b/gcc/patches/gcc49-cloog-dl2.patch0 deleted file mode 100644 index 2f647a307..000000000 --- a/gcc/patches/gcc49-cloog-dl2.patch0 +++ /dev/null @@ -1,74 +0,0 @@ -2011-04-04 Jakub Jelinek - - * toplev.c (toplev_main_argv): New variable. - (toplev_main): Initialize it. - * graphite.c (init_cloog_pointers): Load libcloog-isl.so.4 from gcc's private - directory. - ---- gcc/toplev.c.jj 2008-12-09 23:59:10.000000000 +0100 -+++ gcc/toplev.c 2009-01-27 14:33:52.000000000 +0100 -@@ -107,6 +107,8 @@ static bool no_backend; - /* Length of line when printing switch values. */ - #define MAX_LINE 75 - -+const char **toplev_main_argv; -+ - /* Decoded options, and number of such options. */ - struct cl_decoded_option *save_decoded_options; - unsigned int save_decoded_options_count; -@@ -1909,6 +1911,8 @@ toplev_main (int argc, char **argv) - - expandargv (&argc, &argv); - -+ toplev_main_argv = CONST_CAST2 (const char **, char **, argv); -+ - /* Initialization of GCC's environment, and diagnostics. */ - general_init (argv[0]); - ---- gcc/graphite.c.jj 2010-12-01 10:24:32.000000000 -0500 -+++ gcc/graphite.c 2010-12-01 11:46:07.832118193 -0500 -@@ -72,11 +72,39 @@ __typeof (cloog_pointers__) cloog_pointe - static bool - init_cloog_pointers (void) - { -- void *h; -- -- if (cloog_pointers__.inited) -- return cloog_pointers__.h != NULL; -- h = dlopen ("libcloog-isl.so.4", RTLD_LAZY); -+ void *h = NULL; -+ extern const char **toplev_main_argv; -+ char *buf, *p; -+ size_t len; -+ -+ if (cloog_pointers__.inited) -+ return cloog_pointers__.h != NULL; -+ len = progname - toplev_main_argv[0]; -+ buf = XALLOCAVAR (char, len + sizeof "libcloog-isl.so.4"); -+ memcpy (buf, toplev_main_argv[0], len); -+ strcpy (buf + len, "libcloog-isl.so.4"); -+ len += sizeof "libcloog-isl.so.4"; -+ p = strstr (buf, "/libexec/"); -+ if (p != NULL) -+ { -+ while (1) -+ { -+ char *q = strstr (p + 8, "/libexec/"); -+ if (q == NULL) -+ break; -+ p = q; -+ } -+ memmove (p + 4, p + 8, len - (p + 8 - buf)); -+ h = dlopen (buf, RTLD_LAZY); -+ if (h == NULL) -+ { -+ len = progname - toplev_main_argv[0]; -+ memcpy (buf, toplev_main_argv[0], len); -+ strcpy (buf + len, "libcloog-isl.so.4"); -+ } -+ } -+ if (h == NULL) -+ h = dlopen (buf, RTLD_LAZY); - cloog_pointers__.h = h; - if (h == NULL) - return false; diff --git a/gcc/patches/gcc49-color-auto.patch0 b/gcc/patches/gcc49-color-auto.patch0 deleted file mode 100644 index a8cf938b4..000000000 --- a/gcc/patches/gcc49-color-auto.patch0 +++ /dev/null @@ -1,46 +0,0 @@ -2013-09-20 Jakub Jelinek - - * common.opt (-fdiagnostics-color=): Default to auto. - * toplev.c (process_options): Always default to - -fdiagnostics-color=auto if no -f{,no-}diagnostics-color*. - * doc/invoke.texi (-fdiagnostics-color*): Adjust documentation - of the default. - ---- gcc/common.opt.jj 2013-09-18 12:06:53.000000000 +0200 -+++ gcc/common.opt 2013-09-20 10:00:00.935823900 +0200 -@@ -1037,7 +1037,7 @@ Common Alias(fdiagnostics-color=,always, - ; - - fdiagnostics-color= --Common Joined RejectNegative Var(flag_diagnostics_show_color) Enum(diagnostic_color_rule) Init(DIAGNOSTICS_COLOR_NO) -+Common Joined RejectNegative Var(flag_diagnostics_show_color) Enum(diagnostic_color_rule) Init(DIAGNOSTICS_COLOR_AUTO) - -fdiagnostics-color=[never|always|auto] Colorize diagnostics - - ; Required for these enum values. ---- gcc/toplev.c.jj 2013-09-09 11:32:39.000000000 +0200 -+++ gcc/toplev.c 2013-09-20 10:10:08.198721005 +0200 -@@ -1229,10 +1229,8 @@ process_options (void) - - maximum_field_alignment = initial_max_fld_align * BITS_PER_UNIT; - -- /* Default to -fdiagnostics-color=auto if GCC_COLORS is in the environment, -- otherwise default to -fdiagnostics-color=never. */ -- if (!global_options_set.x_flag_diagnostics_show_color -- && getenv ("GCC_COLORS")) -+ /* Default to -fdiagnostics-color=auto. */ -+ if (!global_options_set.x_flag_diagnostics_show_color) - pp_show_color (global_dc->printer) - = colorize_init (DIAGNOSTICS_COLOR_AUTO); - ---- gcc/doc/invoke.texi.jj 2013-09-18 12:06:50.000000000 +0200 -+++ gcc/doc/invoke.texi 2013-09-20 10:09:29.079904455 +0200 -@@ -3046,8 +3046,7 @@ a message which is too long to fit on a - @cindex highlight, color, colour - @vindex GCC_COLORS @r{environment variable} - Use color in diagnostics. @var{WHEN} is @samp{never}, @samp{always}, --or @samp{auto}. The default is @samp{never} if @env{GCC_COLORS} environment --variable isn't present in the environment, and @samp{auto} otherwise. -+or @samp{auto}. The default is @samp{auto}. - @samp{auto} means to use color only when the standard error is a terminal. - The forms @option{-fdiagnostics-color} and @option{-fno-diagnostics-color} are - aliases for @option{-fdiagnostics-color=always} and diff --git a/gcc/patches/gcc49-pr38757.patch0 b/gcc/patches/gcc49-pr38757.patch0 deleted file mode 100644 index 42065844b..000000000 --- a/gcc/patches/gcc49-pr38757.patch0 +++ /dev/null @@ -1,106 +0,0 @@ -2009-03-18 Jakub Jelinek - - 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. - * 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. -c/ - * c-lang.c (c_source_language): New function. - (LANG_HOOKS_SOURCE_LANGUAGE): Define. - ---- 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_BLOCK_MAY_FALLTHRU hook_bool_const_tree_true - #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 -@@ -303,7 +304,8 @@ extern void lhd_end_section (void); - LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS, \ - LANG_HOOKS_BLOCK_MAY_FALLTHRU, \ - 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/c-lang.c.jj 2011-01-03 12:53:05.376056936 +0100 -+++ gcc/c/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 -@@ -16109,9 +16109,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 -@@ -18915,6 +18924,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; - } - /* Use a degraded Fortran setting in strict DWARF2 so is_fortran works. */ - else if (strcmp (language_string, "GNU Fortran") == 0)