Hello community, here is the log from the commit of package gcc8 for openSUSE:Factory checked in at 2018-03-05 13:38:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcc8 (Old) and /work/SRC/openSUSE:Factory/.gcc8.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcc8" Mon Mar 5 13:38:14 2018 rev:1 rq:581733 version:8.0.1+r257983 Changes: -------- New Changes file: --- /dev/null 2018-03-01 08:56:54.644963210 +0100 +++ /work/SRC/openSUSE:Factory/.gcc8.new/cross-aarch64-gcc8.changes 2018-03-05 13:38:35.750340477 +0100 @@ -0,0 +1,97 @@ +------------------------------------------------------------------- +Thu Mar 1 13:09:05 UTC 2018 - [email protected] + +- Fix nvptx offload target compiler install so GCC can pick up + required files. Split out the newlib part into cross-nvptx-newlib8-devel + and avoid conflicts with GCC 7 variant via Provides/Conflicts + of cross-nvptx-newlib-devel. + +------------------------------------------------------------------- +Mon Feb 26 09:12:03 UTC 2018 - [email protected] + +- Update to SVN trunk head (r257983). +- Add conflicts to non-bootstrap variant for cross packages to silence + repo-checker. +- Amend gcc48-remove-mpfr-2.4.0-requirement.patch to fix build on SLE11. + +------------------------------------------------------------------- +Fri Feb 9 07:57:38 UTC 2018 - [email protected] + +- Update to SVN trunk head (r257516). +- Use %{?_smp_mflags} everywhere. +- Update _constraints to bump physicalmemory and general simplification. + +------------------------------------------------------------------- +Wed Jan 31 13:23:28 UTC 2018 - [email protected] + +- Update to SVN trunk head (r257232). +- Merge cross compiler packaging changes from GCC 7 again. + +------------------------------------------------------------------- +Mon Jan 22 12:25:54 UTC 2018 - [email protected] + +- Move misplaced %endif + +------------------------------------------------------------------- +Mon Jan 15 09:39:28 UTC 2018 - [email protected] + +- Update to SVN trunk head (r256686). +- Merge cross compiler changes from GCC 7. +- Bump libgo SO version again. + +------------------------------------------------------------------- +Fri Jan 5 00:52:33 UTC 2018 - [email protected] + +- Prepare for disabling C++ for cross-compilers + +------------------------------------------------------------------- +Tue Jan 2 14:54:35 UTC 2018 - [email protected] + +- Remove not used todo.patch. + +------------------------------------------------------------------- +Tue Jan 2 08:35:19 UTC 2018 - [email protected] + +- Update to SVN trunk head (r256068). +- Fix lsan_preinit packaging on ppc. +- More x86_64 intrinsic headers. + +------------------------------------------------------------------- +Mon Dec 18 08:41:31 UTC 2017 - [email protected] + +- Update to SVN trunk head (r255776). +- Merge cross changes from gcc7 package, adding gcc7-avoid-fixinc-error.diff. +- Remove Cilk+ packaging stuff since the feature has been removed. +- Add gcc8-testresults-rpmlintrc to fix build. + +------------------------------------------------------------------- +Tue Nov 21 14:08:27 UTC 2017 - [email protected] + +- Disable Intel CET for building target libraries. + +------------------------------------------------------------------- +Thu Nov 16 09:36:06 UTC 2017 - [email protected] + +- New package, inherits from gcc7 + * gcc-dir-version.patch, drop patchlevel from install directory names + * gcc-add-defaultsspec.diff, add the ability to provide a specs file + that is read by default + * tls-no-direct.diff, avoid direct %fs references on x86 to not slow down + Xen + * gcc43-no-unwind-tables.diff, do not produce unwind tables for CRT files + * gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr for ppc, + just a testcase + * gcc44-textdomain.patch, make translation files version specific and + adjust textdomain to find them + * gcc44-rename-info-files.patch, fix cross-references in info files when + renaming them to be version specific + * gcc48-libstdc++-api-reference.patch, fix link in the installed libstdc++ + html documentation + * gcc48-remove-mpfr-2.4.0-requirement.patch, make GCC work with earlier + mpfr versions on old products + * gcc5-no-return-gcc43-workaround.patch, make build work with host gcc 4.3 + * gcc7-remove-Wexpansion-to-defined-from-Wextra.patch, removes new warning + from -Wextra +- Drops + * gcc7-stack-probe.diff in favor of upstream implementation + * gcc7-pr81481.diff which is now upstream New Changes file: cross-arm-gcc8.changes: same change New Changes file: cross-avr-gcc8-bootstrap.changes: same change New Changes file: cross-avr-gcc8.changes: same change New Changes file: cross-epiphany-gcc8-bootstrap.changes: same change New Changes file: cross-epiphany-gcc8.changes: same change New Changes file: cross-hppa-gcc8.changes: same change New Changes file: cross-i386-gcc8.changes: same change New Changes file: cross-m68k-gcc8.changes: same change New Changes file: cross-mips-gcc8.changes: same change New Changes file: cross-nvptx-gcc8.changes: same change New Changes file: cross-ppc64-gcc8.changes: same change New Changes file: cross-ppc64le-gcc8.changes: same change New Changes file: cross-rx-gcc8-bootstrap.changes: same change New Changes file: cross-rx-gcc8.changes: same change New Changes file: cross-s390x-gcc8.changes: same change New Changes file: cross-sparc-gcc8.changes: same change New Changes file: cross-sparc64-gcc8.changes: same change New Changes file: cross-x86_64-gcc8.changes: same change New Changes file: gcc8-testresults.changes: same change New Changes file: gcc8.changes: same change New: ---- README.First-for.SuSE.packagers _constraints change_spec check-build.sh cross-aarch64-gcc8.changes cross-aarch64-gcc8.spec cross-arm-gcc8.changes cross-arm-gcc8.spec cross-avr-gcc8-bootstrap.changes cross-avr-gcc8-bootstrap.spec cross-avr-gcc8.changes cross-avr-gcc8.spec cross-epiphany-gcc8-bootstrap.changes cross-epiphany-gcc8-bootstrap.spec cross-epiphany-gcc8.changes cross-epiphany-gcc8.spec cross-hppa-gcc8.changes cross-hppa-gcc8.spec cross-i386-gcc8.changes cross-i386-gcc8.spec cross-m68k-gcc8.changes cross-m68k-gcc8.spec cross-mips-gcc8.changes cross-mips-gcc8.spec cross-nvptx-gcc8.changes cross-nvptx-gcc8.spec cross-ppc64-gcc8.changes cross-ppc64-gcc8.spec cross-ppc64le-gcc8.changes cross-ppc64le-gcc8.spec cross-rx-gcc8-bootstrap.changes cross-rx-gcc8-bootstrap.spec cross-rx-gcc8.changes cross-rx-gcc8.spec cross-s390x-gcc8.changes cross-s390x-gcc8.spec cross-sparc-gcc8.changes cross-sparc-gcc8.spec cross-sparc64-gcc8.changes cross-sparc64-gcc8.spec cross-x86_64-gcc8.changes cross-x86_64-gcc8.spec cross.spec.in gcc-8.0.1+r257983.tar.xz gcc-add-defaultsspec.diff gcc.spec.in gcc41-ppc32-retaddr.patch gcc43-no-unwind-tables.diff gcc44-rename-info-files.patch gcc44-textdomain.patch gcc48-libstdc++-api-reference.patch gcc48-remove-mpfr-2.4.0-requirement.patch gcc5-no-return-gcc43-workaround.patch gcc7-avoid-fixinc-error.diff gcc7-remove-Wexpansion-to-defined-from-Wextra.patch gcc8-rpmlintrc gcc8-testresults-rpmlintrc gcc8-testresults.changes gcc8-testresults.spec gcc8.changes gcc8.spec nvptx-newlib.tar.xz pre_checkin.sh tls-no-direct.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-aarch64-gcc8.spec ++++++ ++++ 787 lines (skipped) cross-arm-gcc8.spec: same change cross-avr-gcc8-bootstrap.spec: same change cross-avr-gcc8.spec: same change cross-epiphany-gcc8-bootstrap.spec: same change cross-epiphany-gcc8.spec: same change cross-hppa-gcc8.spec: same change cross-i386-gcc8.spec: same change cross-m68k-gcc8.spec: same change cross-mips-gcc8.spec: same change cross-nvptx-gcc8.spec: same change cross-ppc64-gcc8.spec: same change cross-ppc64le-gcc8.spec: same change cross-rx-gcc8-bootstrap.spec: same change cross-rx-gcc8.spec: same change cross-s390x-gcc8.spec: same change cross-sparc-gcc8.spec: same change cross-sparc64-gcc8.spec: same change cross-x86_64-gcc8.spec: same change gcc8-testresults.spec: same change gcc8.spec: same change ++++++ README.First-for.SuSE.packagers ++++++ IMPORTANT: Please change gcc.spec.in and then run ./pre_checkin.sh! Do not change gcc.spec directly! Since GCC comes with a testsuite that runs for quite a long time and that test suite also contains some known failures, we should run the testsuite of GCC whenever the compiler is changed to ensure a high quality compiler. The package is now split into multiple parts, gcc$VER, gcc$VER-testresults and libffi$VER (plus various spec files for cross and icecream cross compilers). The testsuite is run from gcc$VER-testresults, a dummy package with the testresults, gcc$VER-testresults, is generated from it which contains testing logfiles and summary. Before checking in a new compiler, please do the following steps as QA measure to check that the new compiler does not introduce any new failures: - Run mbuild for all archs for at least the gcc$VER and the gcc$VER-testresults subpackages - When mbuild is finished, call /suse/rguenther/bin/compare-testresults.sh mbuild-directory (for the gcc$VER-testresults build). The output of that script should not show any failures. If it does, please fix them or discuss this with the gcc package maintainers. - Do not remove this file. Thanks, Your GCC packagers. ++++++ _constraints ++++++ <constraints> <hardware> <disk> <size unit="G">16</size> </disk> <physicalmemory> <size unit="G">4</size> </physicalmemory> <processors>4</processors> </hardware> </constraints> ++++++ change_spec ++++++ #!/bin/bash do_crosses=1 do_optional_compiler_languages=0 rm -f gcc*-testresults.spec gcc*-testresults.changes gcc*.spec cross*.spec cross*.changes # Default is to generate the normal gcc package # unless a parameter is given. In case that it is '-*', # that parameter will be used as suffix for the package name # and as suffix for the install path (/opt/gccSUFFIX) # In case that it is '[0-9]*', that parameter will be used # as a suffix for a versioned package name. if [ $# -lt 1 ]; then echo No package suffix given outfile=gcc.spec else case $1 in [0-9]*) base_ver=$1 outfile=gcc$1.spec ;; *) echo Invalid package suffix exit 1 ;; esac fi : > $outfile if test "$do_optional_compiler_languages" = "1"; then echo '%define build_optional_compiler_languages 1' >> $outfile fi sed -e 's%@base_ver@%'$base_ver'%g' \ gcc.spec.in \ | sed -n -e '{ /^# PACKAGE-BEGIN/h /^# PACKAGE-BEGIN/,/^# PACKAGE-END/H /^# PACKAGE-BEGIN/,/^# PACKAGE-END/!p /^# PACKAGE-END/{g s/@variant@//g p g s/@variant@/-32bit/g p g s/@variant@/-64bit/g p } }' >> $outfile echo '%define building_testsuite 1' > gcc$base_ver-testresults.spec echo '%define run_tests 1' >> gcc$base_ver-testresults.spec sed -e '/^# GCC-TESTSUITE-DELETE-BEGIN/,/^# GCC-TESTSUITE-DELETE-END/d;s/-n gcc@base_ver@-testresults$//g;s/^Name:[[:space:]]*gcc@base_ver@/Name: gcc@base_ver@-testresults/g' \ gcc.spec.in \ | sed -e 's%@base_ver@%'$base_ver'%g' \ >> gcc$base_ver-testresults.spec test -f gcc$base_ver.changes \ && ( ln -f gcc$base_ver.changes gcc$base_ver-testresults.changes; ) add_cross() { local pkgname="$1"; shift local rpmtarget="$1"; shift local triplet="$1"; shift echo "%define pkgname $pkgname" > $pkgname.spec echo "%define cross_arch $rpmtarget" >> $pkgname.spec echo "%define gcc_target_arch $triplet" >> $pkgname.spec echo "$@" >> $pkgname.spec { sed -n -e '1,/COMMON-BEGIN/p' cross.spec.in sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile sed -n -e '/COMMON-END/,$p' cross.spec.in; } | sed -e "s#@base_ver@#$base_ver#" \ -e "s/^\(ExclusiveArch.*\) $rpmtarget[^ \r]*/\1 /" \ >> $pkgname.spec test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes $pkgname.changes } add_newlib_cross() { add_cross $1-bootstrap $2 $3 "%define gcc_target_newlib 1 %define gcc_libc_bootstrap 1" add_cross $1 $2 $3 "%define gcc_target_newlib 1" } # We now support "proper" cross-compilers to suse targets via a # cross-glibc package, enable that via for example # # add_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux # # For now keep the old way of doing things if test "$do_crosses" = 1 ; then add_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux %define gcc_icecream 1 add_cross cross-arm-gcc$base_ver arm arm-suse-linux-gnueabi %define gcc_icecream 0 add_cross cross-avr-gcc$base_ver-bootstrap avr avr "%define gcc_libc_bootstrap 1" add_cross cross-avr-gcc$base_ver avr avr add_cross cross-i386-gcc$base_ver i386 i586-suse-linux %define gcc_icecream 1 add_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux %define gcc_icecream 1 add_cross cross-s390x-gcc$base_ver s390x s390x-suse-linux %define gcc_icecream 1 add_cross cross-sparc-gcc$base_ver sparcv9 sparc-suse-linux %define gcc_icecream 1 add_cross cross-sparc64-gcc$base_ver sparc64 sparc64-suse-linux %define gcc_icecream 1 add_cross cross-ppc64-gcc$base_ver ppc64 powerpc64-suse-linux %define gcc_icecream 1 add_cross cross-ppc64le-gcc$base_ver ppc64le powerpc64le-suse-linux %define gcc_icecream 1 add_cross cross-m68k-gcc$base_ver m68k m68k-suse-linux %define gcc_icecream 1 add_cross cross-mips-gcc$base_ver mips mips-suse-linux %define gcc_icecream 1 add_cross cross-hppa-gcc$base_ver hppa hppa-suse-linux %define gcc_icecream 1 add_newlib_cross cross-epiphany-gcc$base_ver epiphany epiphany-elf add_newlib_cross cross-rx-gcc$base_ver rx rx-elf #add_newlib_cross cross-rl78-gcc$base_ver rl78 rl78-elf #add_newlib_cross cross-nds32le-gcc$base_ver nds32le nds32le-elf fi # the nvptx cross is used for offloading add_cross cross-nvptx-gcc$base_ver nvptx nvptx-none %define gcc_accel 1 for f in *.spec; do sed -i -e '/^# .*-\(BEGIN\|END\)$/d' $f done osc service localrun format_spec_file exit 0 ++++++ check-build.sh ++++++ #!/bin/bash # Copyright (c) 2003,2005 SUSE Linux Products GmbH, Germany. All rights reserved. # # Authors: Thorsten Kukuk <[email protected]> # # this script use the following variable(s): # # - $BUILD_BASENAME # case $BUILD_BASENAME in *ppc*) # Our biarch 32-bit compiler needs to be build on a 64-bit machine, # otherwise some configure checks fail. # Note that we cannot use uname here since powerpc32 was invoked # already. grep 'series64\|ppc64' /proc/version > /dev/null if [ $? -ne 0 ] ; then echo "build does not work on `hostname` for gcc" exit 1 fi ;; *x86_64*) #if [ `ulimit -v` -le 740000 ] ; then # echo "build does not work on ("`hostname`" for gcc)" # exit 1 #fi if [ `getconf _NPROCESSORS_CONF` -lt 2 ] ; then echo "build does not work on `hostname` for gcc" exit 1 fi ;; *) ;; esac exit 0 ++++++ cross.spec.in ++++++ # # spec file for package gcc (Version 4.0.1) # # Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # # nospeccleaner %define build_cp 0%{!?gcc_accel:1} %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define build_hsa 0 %define build_nvptx 0 %define enable_plugins 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %if %{cross_arch} == "sparcv9" %define binutils_target sparc %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" %define binutils_os %{canonical_target} %else %if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx" %define binutils_os %{canonical_target}-elf %else %if "%{binutils_target}" == "arm" %define binutils_os %{canonical_target}-suse-linux-gnueabi %else %if 0%{?gcc_accel:1} %define binutils_os %{gcc_target_arch} %else %define binutils_os %{canonical_target}-suse-linux %endif %endif %endif %endif %if 0%{?gcc_icecream:1} %define sysroot %{_prefix}/%{gcc_target_arch} %else # offloading builds newlib in-tree and can install in # the GCC private path without extra sysroot %if 0%{!?gcc_accel:1} # use same sysroot as in binutils.spec %define sysroot %{_prefix}/%{binutils_os}/sys-root %endif %endif %if %{suse_version} >= 1220 %define selfconflict() %1 %else %define selfconflict() otherproviders(%1) %endif Name: %{pkgname} %if %{cross_arch} != "nvptx" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif BuildRequires: gcc-c++ BuildRequires: bison BuildRequires: flex BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} %if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1} BuildRequires: cross-%cross_arch-newlib-devel %endif %if 0%{!?gcc_libc_bootstrap:1} && %{cross_arch} == "avr" BuildRequires: avr-libc %endif %if 0%{?gcc_target_glibc:1} BuildRequires: cross-%cross_arch-glibc-devel %endif %if %{cross_arch} == "nvptx" BuildRequires: nvptx-tools Requires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 %endif %define _binary_payload w.ufdio # Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has # file conflicts with it and is no longer packaged %if "%pkgname" == "cross-ppc64-gcc49" Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354 %endif %if 0%{?gcc_target_newlib:1} # Generally only one cross for the same target triplet can be installed # at the same time as we are populating a non-version-specific sysroot Provides: %{gcc_target_arch}-gcc Conflicts: %selfconflict %{gcc_target_arch}-gcc %endif %if 0%{?gcc_libc_bootstrap:1} # The -bootstrap packages file-conflict with the non-bootstrap variants. # Even if we don't actually (want to) distribute the bootstrap variants # the following avoids repo-checker spamming us endlessly. Conflicts: cross-%{cross_arch}-gcc@base_ver@ %endif #!BuildIgnore: gcc-PIE BuildRequires: update-alternatives Requires(post): update-alternatives Requires(preun): update-alternatives # COMMON-BEGIN # COMMON-END %if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1} make %{?_smp_mflags} %else make %{?_smp_mflags} all-host %endif %if 0%{?gcc_icecream:%gcc_icecream} %package -n cross-%cross_arch-gcc@base_ver@-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc@base_ver@-icecream-backend This package contains the icecream environment for the GNU C Compiler %endif %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib@base_ver@-devel Summary: newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel %description -n cross-nvptx-newlib@base_ver@-devel Newlib development files for the nvptx offload target compiler. %endif %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # install and fixup target parts # debugedit is not prepared for this and crashes %if 0%{?gcc_icecream:1} # so expect the sysroot to be populated from natively built binaries %else %if 0%{!?gcc_libc_bootstrap:1} export NO_BRP_STRIP_DEBUG=true export NO_DEBUGINFO_STRIP_DEBUG=true %define __debug_install_post %{nil} : >../debugfiles.list : >../debugsourcefiles.list : >../debugsources.list # We want shared libraries to reside in the sysroot but the .so symlinks # on the host. Once we have a cross target that has shared libs we need # to manually fix up things here like we do for non-cross compilers mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot} make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts # again. Note not all cross targets support libstdc++, so create the # directory to make things easier. mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif %endif %endif %if 0%{?binutils_os:1} for prog in as ld; do ln -s /usr/%{binutils_os}/bin/$prog $RPM_BUILD_ROOT%{targetlibsubdir}/ done %endif # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # for accelerators remove all frontends but lto1 and also install-tools %if 0%{?gcc_accel:1} rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1 rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus rm -rf $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/install-tools rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools # also move things from target directories into the accel path since # that is the place where we later search for (only) ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{binutils_os}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar --no-recursion --mtime @${SOURCE_DATE_EPOCH:-$(date +%s)} --format=gnu -cv `find *|LC_ALL=C sort` |\ gzip -n9 > ../%{name}_%{_arch}.tar.gz cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %endif # we provide update-alternatives for selecting a compiler version for # crosses %if 0%{!?gcc_accel:1} mkdir -p %{buildroot}%{_sysconfdir}/alternatives for ex in gcc cpp \ %if %{build_cp} c++ g++ \ %endif gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool; do ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \ %{buildroot}%{_bindir}/%{gcc_target_arch}-$ex done %post %{_sbindir}/update-alternatives \ --install %{_bindir}/%{gcc_target_arch}-gcc %{gcc_target_arch}-gcc %{_bindir}/%{gcc_target_arch}-gcc%{binsuffix} @base_ver@ \ --slave %{_bindir}/%{gcc_target_arch}-cpp %{gcc_target_arch}-cpp %{_bindir}/%{gcc_target_arch}-cpp%{binsuffix} \ %if %{build_cp} --slave %{_bindir}/%{gcc_target_arch}-c++ %{gcc_target_arch}-c++ %{_bindir}/%{gcc_target_arch}-c++%{binsuffix} \ --slave %{_bindir}/%{gcc_target_arch}-g++ %{gcc_target_arch}-g++ %{_bindir}/%{gcc_target_arch}-g++%{binsuffix} \ %endif --slave %{_bindir}/%{gcc_target_arch}-gcc-ar %{gcc_target_arch}-gcc-ar %{_bindir}/%{gcc_target_arch}-gcc-ar%{binsuffix} \ --slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \ --slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \ --slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \ --slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \ --slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} %postun if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then %{_sbindir}/update-alternatives --remove %{gcc_target_arch}-gcc %{_bindir}/%{gcc_target_arch}-gcc%{binsuffix} fi %endif %files %defattr(-,root,root) %if 0%{?gcc_accel:1} %{_prefix}/bin/%{GCCDIST}-accel-%{gcc_target_arch}-* %dir %{libsubdir} %dir %{libsubdir}/accel %{libsubdir}/accel/%{gcc_target_arch} %else %{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-gcc %{_prefix}/bin/%{gcc_target_arch}-cpp %{_prefix}/bin/%{gcc_target_arch}-gcc-ar %{_prefix}/bin/%{gcc_target_arch}-gcc-nm %{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib %{_prefix}/bin/%{gcc_target_arch}-gcov %{_prefix}/bin/%{gcc_target_arch}-gcov-dump %{_prefix}/bin/%{gcc_target_arch}-gcov-tool %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool %if %{build_cp} %{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} %{_prefix}/bin/%{gcc_target_arch}-c++ %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ %if 0%{!?gcc_libc_bootstrap:1} %if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif %endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %endif %if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1} && 0%{?sysroot:1} %{sysroot} %endif %if 0%{?gcc_icecream:%gcc_icecream} %files -n cross-%cross_arch-gcc@base_ver@-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %endif %if 0%{?nvptx_newlib:1} %files -n cross-nvptx-newlib@base_ver@-devel %defattr(-,root,root) %{_prefix}/%{gcc_target_arch} %endif %changelog -n cross-%{pkgname}-gcc@base_ver@ ++++++ gcc-add-defaultsspec.diff ++++++ Index: gcc/gcc.c =================================================================== --- gcc/gcc.c.orig 2013-11-26 15:41:59.000000000 +0100 +++ gcc/gcc.c 2013-11-26 16:40:35.780548125 +0100 @@ -258,6 +258,7 @@ static const char *replace_outfile_spec_ static const char *remove_outfile_spec_function (int, const char **); static const char *version_compare_spec_function (int, const char **); static const char *include_spec_function (int, const char **); +static const char *include_noerr_spec_function (int, const char **); static const char *find_file_spec_function (int, const char **); static const char *find_plugindir_spec_function (int, const char **); static const char *print_asm_header_spec_function (int, const char **); @@ -1357,6 +1358,7 @@ static const struct spec_function static { "remove-outfile", remove_outfile_spec_function }, { "version-compare", version_compare_spec_function }, { "include", include_spec_function }, + { "include_noerr", include_noerr_spec_function }, { "find-file", find_file_spec_function }, { "find-plugindir", find_plugindir_spec_function }, { "print-asm-header", print_asm_header_spec_function }, @@ -6480,6 +6482,8 @@ main (int argc, char **argv) if (access (specs_file, R_OK) == 0) read_specs (specs_file, true, false); + do_self_spec ("%:include_noerr(defaults.spec)%(default_spec)"); + /* Process any configure-time defaults specified for the command line options, via OPTION_DEFAULT_SPECS. */ for (i = 0; i < ARRAY_SIZE (option_default_specs); i++) @@ -8401,6 +8405,21 @@ get_random_number (void) return ret ^ getpid (); } +static const char * +include_noerr_spec_function (int argc, const char **argv) +{ + char *file; + + if (argc != 1) + abort (); + + file = find_a_file (&startfile_prefixes, argv[0], R_OK, 0); + if (file) + read_specs (file, FALSE, TRUE); + + return NULL; +} + /* %:compare-debug-dump-opt spec function. Save the last argument, expected to be the last -fdump-final-insns option, or generate a temporary. */ ++++++ gcc.spec.in ++++++ ++++ 2419 lines (skipped) ++++++ gcc41-ppc32-retaddr.patch ++++++ 2005-11-28 Jakub Jelinek <[email protected]> * config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0, read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx instead of doing an extran indirection from frame_pointer_rtx. * gcc.dg/20051128-1.c: New test. #Index: gcc/config/rs6000/rs6000.c #=================================================================== #--- gcc/config/rs6000/rs6000.c.orig 2013-11-26 15:42:33.000000000 +0100 #+++ gcc/config/rs6000/rs6000.c 2013-11-26 16:44:14.566089231 +0100 #@@ -20878,18 +20878,22 @@ rs6000_return_addr (int count, rtx frame if (count != 0 || ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN) && flag_pic)) { + rtx x; cfun->machine->ra_needs_full_frame = 1; - return - gen_rtx_MEM - (Pmode, - memory_address - (Pmode, - plus_constant (Pmode, - copy_to_reg - (gen_rtx_MEM (Pmode, - memory_address (Pmode, frame))), - RETURN_ADDRESS_OFFSET))); + if (count == 0) + { + gcc_assert (frame == frame_pointer_rtx); + x = arg_pointer_rtx; + } + else + { + x = memory_address (Pmode, frame); + x = copy_to_reg (gen_rtx_MEM (Pmode, x)); + } + + x = plus_constant (Pmode, x, RETURN_ADDRESS_OFFSET); + return gen_rtx_MEM (Pmode, memory_address (Pmode, x)); } cfun->machine->ra_need_lr = 1; Index: gcc/testsuite/gcc.dg/20051128-1.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ gcc/testsuite/gcc.dg/20051128-1.c 2013-11-26 16:44:14.566089231 +0100 @@ -0,0 +1,41 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -fpic" } */ + +extern void exit (int); +extern void abort (void); + +int b; + +struct A +{ + void *pad[147]; + void *ra, *h; + long o; +}; + +void +__attribute__((noinline)) +foo (struct A *a, void *x) +{ + __builtin_memset (a, 0, sizeof (a)); + if (!b) + exit (0); +} + +void +__attribute__((noinline)) +bar (void) +{ + struct A a; + + __builtin_unwind_init (); + foo (&a, __builtin_return_address (0)); +} + +int +main (void) +{ + bar (); + abort (); + return 0; +} ++++++ gcc43-no-unwind-tables.diff ++++++ Index: libgcc/Makefile.in =================================================================== --- libgcc/Makefile.in.orig 2015-12-14 11:33:03.225790694 +0100 +++ libgcc/Makefile.in 2015-12-17 15:09:45.415136693 +0100 @@ -288,7 +288,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(IN $(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \ -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \ - $(INHIBIT_LIBC_CFLAGS) + $(INHIBIT_LIBC_CFLAGS) -fno-unwind-tables -fno-asynchronous-unwind-tables # Extra flags to use when compiling crt{begin,end}.o. CRTSTUFF_T_CFLAGS = ++++++ gcc44-rename-info-files.patch ++++++ ++++ 656 lines (skipped) ++++++ gcc44-textdomain.patch ++++++ #! /bin/sh -e # DP: Set gettext's domain and textdomain to the versioned package name. dir= if [ $# -eq 3 -a "$2" = '-d' ]; then pdir="-d $3" dir="$3/" elif [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0 ;; -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 ;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 esac exit 0 Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in.orig 2013-11-26 16:46:03.000000000 +0100 +++ gcc/Makefile.in 2013-11-26 16:46:43.271816000 +0100 @@ -3795,8 +3795,8 @@ install-po: dir=$(localedir)/$$lang/LC_MESSAGES; \ echo $(mkinstalldirs) $(DESTDIR)$$dir; \ $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \ - echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ - $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ + echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-8.mo; \ + $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-8.mo; \ done # Rule for regenerating the message template (gcc.pot). Index: gcc/intl.c =================================================================== --- gcc/intl.c.orig 2013-11-26 15:42:31.000000000 +0100 +++ gcc/intl.c 2013-11-26 16:46:43.271816000 +0100 @@ -55,8 +55,8 @@ gcc_init_libintl (void) setlocale (LC_ALL, ""); #endif - (void) bindtextdomain ("gcc", LOCALEDIR); - (void) textdomain ("gcc"); + (void) bindtextdomain ("gcc-8", LOCALEDIR); + (void) textdomain ("gcc-8"); /* Opening quotation mark. */ open_quote = _("`"); Index: libcpp/Makefile.in =================================================================== --- libcpp/Makefile.in.orig 2013-11-26 16:26:56.000000000 +0100 +++ libcpp/Makefile.in 2013-11-26 16:47:15.764193260 +0100 @@ -49,6 +49,7 @@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ PACKAGE = @PACKAGE@ +PACKAGE_SUFFIX = -8 RANLIB = @RANLIB@ SHELL = @SHELL@ USED_CATALOGS = @USED_CATALOGS@ @@ -74,8 +75,10 @@ INCLUDES = -I$(srcdir) -I. -I$(srcdir)/. -I$(srcdir)/include ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG) +ALL_CFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\" ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \ $(CPPFLAGS) $(PICFLAG) +ALL_CXXFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\" # The name of the compiler to use. COMPILER = $(CXX) @@ -164,8 +167,8 @@ install-strip install: all installdirs else continue; \ fi; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ - $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ + echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \ + $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \ done mostlyclean: Index: libcpp/system.h =================================================================== --- libcpp/system.h.orig 2013-01-15 10:49:52.000000000 +0100 +++ libcpp/system.h 2013-11-26 16:46:43.271816000 +0100 @@ -280,7 +280,7 @@ extern int errno; #endif #ifndef _ -# define _(msgid) dgettext (PACKAGE, msgid) +# define _(msgid) dgettext (PACKAGE PACKAGE_SUFFIX, msgid) #endif #ifndef N_ Index: libcpp/init.c =================================================================== --- libcpp/init.c.orig 2013-11-26 15:42:40.000000000 +0100 +++ libcpp/init.c 2013-11-26 16:46:43.271816000 +0100 @@ -152,7 +152,7 @@ init_library (void) init_trigraph_map (); #ifdef ENABLE_NLS - (void) bindtextdomain (PACKAGE, LOCALEDIR); + (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR); #endif } } ++++++ gcc48-libstdc++-api-reference.patch ++++++ Index: libstdc++-v3/doc/html/index.html =================================================================== --- libstdc++-v3/doc/html/index.html (revision 210144) +++ libstdc++-v3/doc/html/index.html (working copy) @@ -18,7 +18,7 @@ </p></li><li class="listitem"><p> <a class="link" href="faq.html" title="Frequently Asked Questions">Frequently Asked Questions</a> </p></li><li class="listitem"><p> - <a class="link" href="api.html" title="The GNU C++ Library API Reference">API and Source Documentation</a> + <a class="link" href="api/index.html" title="The GNU C++ Library API Reference">API and Source Documentation</a> </p></li></ul></div><p> </p></div></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="book"><a href="manual/index.html">The GNU C++ Library Manual</a></span></dt><dd><dl><dt><span class="part"><a href="manual/intro.html">I. Introduction ++++++ gcc48-remove-mpfr-2.4.0-requirement.patch ++++++ Index: configure.ac =================================================================== --- configure.ac (revision 216911) +++ configure.ac (working copy) @@ -1454,7 +1454,7 @@ if test -d ${srcdir}/gcc && test "x$have AC_MSG_CHECKING([for the correct version of mpfr.h]) AC_TRY_COMPILE([#include <gmp.h> #include <mpfr.h>],[ - #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0) + #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1) choke me #endif ], [AC_TRY_COMPILE([#include <gmp.h> Index: configure =================================================================== --- configure (revision 216911) +++ configure (working copy) @@ -5524,7 +5524,7 @@ int main () { - #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0) + #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1) choke me #endif Index: gcc/fortran/simplify.c =================================================================== --- gcc/fortran/simplify.c (revision 216911) +++ gcc/fortran/simplify.c (working copy) @@ -4278,10 +4278,7 @@ gfc_simplify_mod (gfc_expr *a, gfc_expr return &gfc_bad_expr; } - gfc_set_model_kind (kind); - mpfr_fmod (result->value.real, a->value.real, p->value.real, - GFC_RND_MODE); - break; + return NULL; default: gfc_internal_error ("gfc_simplify_mod(): Bad arguments"); @@ -4327,19 +4324,7 @@ gfc_simplify_modulo (gfc_expr *a, gfc_ex return &gfc_bad_expr; } - gfc_set_model_kind (kind); - mpfr_fmod (result->value.real, a->value.real, p->value.real, - GFC_RND_MODE); - if (mpfr_cmp_ui (result->value.real, 0) != 0) - { - if (mpfr_signbit (a->value.real) != mpfr_signbit (p->value.real)) - mpfr_add (result->value.real, result->value.real, p->value.real, - GFC_RND_MODE); - } - else - mpfr_copysign (result->value.real, result->value.real, - p->value.real, GFC_RND_MODE); - break; + return NULL; default: gfc_internal_error ("gfc_simplify_modulo(): Bad arguments"); Index: gcc/ubsan.c =================================================================== --- gcc/ubsan.c.orig 2015-06-01 14:52:11.717105684 +0200 +++ gcc/ubsan.c 2015-06-01 14:52:26.945253071 +0200 @@ -1564,40 +1564,6 @@ min = build_real (expr_type, minval2); } } - else if (REAL_MODE_FORMAT (mode)->b == 10) - { - /* For _Decimal128 up to 34 decimal digits, - sign, - dot, e, exponent. */ - char buf[64]; - mpfr_t m; - int p = REAL_MODE_FORMAT (mode)->p; - REAL_VALUE_TYPE maxval, minval; - - /* Use mpfr_snprintf rounding to compute the smallest - representable decimal number greater or equal than - 1 << (prec - !uns_p). */ - mpfr_init2 (m, prec + 2); - mpfr_set_ui_2exp (m, 1, prec - !uns_p, GMP_RNDN); - mpfr_snprintf (buf, sizeof buf, "%.*RUe", p - 1, m); - decimal_real_from_string (&maxval, buf); - max = build_real (expr_type, maxval); - - /* For unsigned, assume -1.0 is always representable. */ - if (uns_p) - min = build_minus_one_cst (expr_type); - else - { - /* Use mpfr_snprintf rounding to compute the largest - representable decimal number less or equal than - (-1 << (prec - 1)) - 1. */ - mpfr_set_si_2exp (m, -1, prec - 1, GMP_RNDN); - mpfr_sub_ui (m, m, 1, GMP_RNDN); - mpfr_snprintf (buf, sizeof buf, "%.*RDe", p - 1, m); - decimal_real_from_string (&minval, buf); - min = build_real (expr_type, minval); - } - mpfr_clear (m); - } else return NULL_TREE; Index: gcc/gimple-ssa-sprintf.c =================================================================== --- gcc/gimple-ssa-sprintf.c (revision 257728) +++ gcc/gimple-ssa-sprintf.c (working copy) @@ -1637,18 +1637,7 @@ get_mpfr_format_length (mpfr_ptr x, cons p = 1024; } - len = mpfr_snprintf (NULL, 0, fmtstr, (int)p, x); - - /* Handle the unlikely (impossible?) error by returning more than - the maximum dictated by the function's return type. */ - if (len < 0) - return target_dir_max () + 1; - - /* Adjust the return value by the difference. */ - if (p < prec) - len += prec - p; - - return len; + return target_dir_max () + 1; } /* Return the number of bytes to format using the format specifier Index: gcc/fortran/simplify.c =================================================================== --- gcc/fortran/simplify.c (revision 257983) +++ gcc/fortran/simplify.c (working copy) @@ -1745,51 +1745,6 @@ simplify_trig_call (gfc_expr *icall) } } -/* Convert a floating-point number from radians to degrees. */ - -static void -degrees_f (mpfr_t x, mp_rnd_t rnd_mode) -{ - mpfr_t tmp; - mpfr_init (tmp); - - /* Set x = x % 2pi to avoid offsets with large angles. */ - mpfr_const_pi (tmp, rnd_mode); - mpfr_mul_ui (tmp, tmp, 2, rnd_mode); - mpfr_fmod (tmp, x, tmp, rnd_mode); - - /* Set x = x * 180. */ - mpfr_mul_ui (x, x, 180, rnd_mode); - - /* Set x = x / pi. */ - mpfr_const_pi (tmp, rnd_mode); - mpfr_div (x, x, tmp, rnd_mode); - - mpfr_clear (tmp); -} - -/* Convert a floating-point number from degrees to radians. */ - -static void -radians_f (mpfr_t x, mp_rnd_t rnd_mode) -{ - mpfr_t tmp; - mpfr_init (tmp); - - /* Set x = x % 360 to avoid offsets with large angles. */ - mpfr_set_ui (tmp, 360, rnd_mode); - mpfr_fmod (tmp, x, tmp, rnd_mode); - - /* Set x = x * pi. */ - mpfr_const_pi (tmp, rnd_mode); - mpfr_mul (x, x, tmp, rnd_mode); - - /* Set x = x / 180. */ - mpfr_div_ui (x, x, 180, rnd_mode); - - mpfr_clear (tmp); -} - /* Convert argument to radians before calling a trig function. */ @@ -1803,12 +1758,7 @@ gfc_simplify_trigd (gfc_expr *icall) if (arg->ts.type != BT_REAL) gfc_internal_error ("in gfc_simplify_trigd(): Bad type"); - if (arg->expr_type == EXPR_CONSTANT) - /* Convert constant to radians before passing off to simplifier. */ - radians_f (arg->value.real, GFC_RND_MODE); - - /* Let the usual simplifier take over - we just simplified the arg. */ - return simplify_trig_call (icall); + return NULL; } /* Convert result of an inverse trig function to degrees. */ @@ -1816,21 +1766,9 @@ gfc_simplify_trigd (gfc_expr *icall) gfc_expr * gfc_simplify_atrigd (gfc_expr *icall) { - gfc_expr *result; - if (icall->value.function.actual->expr->ts.type != BT_REAL) gfc_internal_error ("in gfc_simplify_atrigd(): Bad type"); - /* See if another simplifier has work to do first. */ - result = simplify_trig_call (icall); - - if (result && result->expr_type == EXPR_CONSTANT) - { - /* Convert constant to degrees after passing off to actual simplifier. */ - degrees_f (result->value.real, GFC_RND_MODE); - return result; - } - /* Let gfc_resolve_atrigd take care of the non-constant case. */ return NULL; } @@ -1840,21 +1778,9 @@ gfc_simplify_atrigd (gfc_expr *icall) gfc_expr * gfc_simplify_atan2d (gfc_expr *y, gfc_expr *x) { - gfc_expr *result; - if (x->ts.type != BT_REAL || y->ts.type != BT_REAL) gfc_internal_error ("in gfc_simplify_atan2d(): Bad type"); - if (x->expr_type == EXPR_CONSTANT && y->expr_type == EXPR_CONSTANT) - { - result = gfc_simplify_atan2 (y, x); - if (result != NULL) - { - degrees_f (result->value.real, GFC_RND_MODE); - return result; - } - } - /* Let gfc_resolve_atan2d take care of the non-constant case. */ return NULL; } ++++++ gcc5-no-return-gcc43-workaround.patch ++++++ Workaround [ 3445s] I: Program returns random data in a function [ 3445s] E: gcc5 no-return-in-nonvoid-function ../../gcc/cp/constexpr.c:3676 during stage1 when compiling with a GCC 4.3 host compiler --- gcc/cp/constexpr.c.orig 2015-06-02 09:33:15.085636193 +0200 +++ gcc/cp/constexpr.c 2015-06-02 09:34:04.637080196 +0200 @@ -3668,11 +3668,10 @@ { r = get_target_expr (r); TREE_CONSTANT (r) = true; - return r; } } - else - return r; + + return r; } /* Returns true if T is a valid subexpression of a constant expression, ++++++ gcc7-avoid-fixinc-error.diff ++++++ Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 255776) +++ gcc/Makefile.in (working copy) @@ -3066,13 +3066,6 @@ stmp-fixinc: gsyslimits.h macro_list fix sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \ multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \ fix_dir=include-fixed$${multi_dir}; \ - if ! $(inhibit_libc) && test ! -d ${BUILD_SYSTEM_HEADER_DIR}; then \ - echo The directory that should contain system headers does not exist: >&2 ; \ - echo " ${BUILD_SYSTEM_HEADER_DIR}" >&2 ; \ - tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \ - if test "x${BUILD_SYSTEM_HEADER_DIR}" = "x$${tooldir_sysinc}"; \ - then sleep 1; else exit 1; fi; \ - fi; \ $(mkinstalldirs) $${fix_dir}; \ chmod a+rx $${fix_dir} || true; \ (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \ ++++++ gcc7-remove-Wexpansion-to-defined-from-Wextra.patch ++++++ Index: gcc/c-family/c.opt =================================================================== --- gcc/c-family/c.opt (revision 246224) +++ gcc/c-family/c.opt (working copy) @@ -596,7 +596,7 @@ C ObjC C++ ObjC++ Var(warn_double_promot Warn about implicit conversions from \"float\" to \"double\". Wexpansion-to-defined -C ObjC C++ ObjC++ CPP(warn_expansion_to_defined) CppReason(CPP_W_EXPANSION_TO_DEFINED) Var(cpp_warn_expansion_to_defined) Init(0) Warning EnabledBy(Wextra || Wpedantic) +C ObjC C++ ObjC++ CPP(warn_expansion_to_defined) CppReason(CPP_W_EXPANSION_TO_DEFINED) Var(cpp_warn_expansion_to_defined) Init(0) Warning EnabledBy(Wpedantic) Warn if \"defined\" is used outside #if. Wimplicit-function-declaration ++++++ gcc8-rpmlintrc ++++++ # This line is mandatory to access the configuration functions from Config import * # gcc/gcc-c++ are devel packages even if not called -devel... addFilter ("gcc.*devel-file-in-non-devel-package") addFilter ("gcc.*devel-dependency glibc-devel") addFilter ("gcc.*devel-dependency libstdc") # libstdc++6-devel is the devel package of libstdc++6, no better name exists # and we do package static libs and the .so links (but in a gcc versioned # directory) addFilter ("libstdc.*shlib-policy-missing-lib") # We have names lib libgcc_s1-gcc7 for non-default GCCs addFilter ("shlib-policy-name-error") addFilter ("shlib-legacy-policy-name-error") # Packages provide libgcc_s1 = $version and conflict with other providers # of libgcc_s1 addFilter ("conflicts-with-provides") ++++++ gcc8-testresults-rpmlintrc ++++++ # This line is mandatory to access the configuration functions from Config import * # Currently gotools.log contains $RPM_BUILD_ROOT and there's nothing # to be done about that and neither do we care addFilter ("gcc8-testresults.*file-contains-buildroot") # The package should _not_ be noarch, testresults differ from architecture # to architecture addFilter ("gcc8-testresults.*no-binary") ++++++ pre_checkin.sh ++++++ #!/bin/bash # This script is called automatically during autobuild checkin. case $0 in \./*) here=$PWD ;; */*) here=${0%/*} ;; *) here=$PWD ;; esac case ${here##*/} in gcc*.*) # Handle maintainance projects with .$REPO suffix suffix=${here##*/} suffix=${suffix%%\.*} set ${suffix#gcc} ;; gcc-*) suffix=${here##*/} set ${suffix#*-}- ;; gcc[0-9]*) suffix=${here##*/} set ${suffix#gcc} ;; esac . ${here}/change_spec ++++++ tls-no-direct.diff ++++++ For i?86 negative offsets to %fs segment accesses cause a hypervisor trap for Xen. Avoid this by making accesses indirect. ??? Note that similar to the behavior on SLE11 this only affects the compiler built on %ix86, not that on x86_64, even with -m32. Index: gcc/config/i386/linux.h =================================================================== --- gcc/config/i386/linux.h.orig 2015-12-17 15:07:37.785650062 +0100 +++ gcc/config/i386/linux.h 2015-12-17 15:08:06.393983290 +0100 @@ -24,3 +24,9 @@ along with GCC; see the file COPYING3. #undef MUSL_DYNAMIC_LINKER #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" + +/* This slows down Xen, so take a very small general performance hit + for not accessing the %fs segment with negative offsets by making + GCC not emit direct accesses to %fs at all. */ +#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT +#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT 0
