Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gcc10.16441 for
openSUSE:Leap:15.2:Update checked in at 2021-06-07 20:06:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2:Update/gcc10.16441 (Old)
and /work/SRC/openSUSE:Leap:15.2:Update/.gcc10.16441.new.32437 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcc10.16441"
Mon Jun 7 20:06:02 2021 rev:1 rq:897527 version:10.2.1+git583
Changes:
--------
New Changes file:
--- /dev/null 2021-05-27 11:03:55.685848939 +0200
+++
/work/SRC/openSUSE:Leap:15.2:Update/.gcc10.16441.new.32437/cross-aarch64-gcc10.changes
2021-06-07 20:06:02.518378384 +0200
@@ -0,0 +1,249 @@
+-------------------------------------------------------------------
+Tue Aug 25 07:15:46 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to gcc-10 branch head (c0746a1beb1ba073c7981eb09f), git583.
+ * Fixes ABI breakage for as-base CDTORs of final classes. [gcc#95428]
+
+-------------------------------------------------------------------
+Mon Aug 24 06:32:38 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to gcc-10 branch head (d523b5201cce1796717a8ca669), git580.
+ * Includes gcc10-streamer-backports1.patch and
+ gcc10-streamer-backports2.patch.
+ * Includes fixes for LTO ICE [bsc#1175168] and aarc64 128bit
+ CAS miscompilation [bsc#1174753].
+
+-------------------------------------------------------------------
+Wed Aug 5 12:08:32 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to gcc-10 branch head (dda1e9d08434def88ed86557d0), git501.
+ * Includes fix for AARCH64 kernel build failure. [bsc#1174817]
+ * Includes aarch64 SLS mitigation changes. [bsc#1172798, CVE-2020-13844]
+- Add gcc10-streamer-backports1.patch and gcc10-streamer-backports2.patch.
+- Enable x86 CET runtime for SLES15 and Leap15 also.
+- Do not enable the now deprecated HSA offloading capability.
+
+-------------------------------------------------------------------
+Tue Jul 28 11:02:20 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to gcc-10 branch head (c0438ced53bcf57e4ebb1c38c), git465.
+ * Includes GCC 10.2 release. [bsc#1173972] [jsc#ECO-2373]
+ * Picks up fixes for C++20 coroutines support. [jsc#SLE-12297]
+ * Picks up fix for a recent chromium build fail.
+- Build x86 CET enabled runtime for Factory.
+- Disable GCN offloading for SLE12 and SLE15 GA.
+
+-------------------------------------------------------------------
+Tue Jul 7 06:48:08 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to gcc-10 branch head (12e1a54b06777db74ce375496), git355.
+ * Includes fix for non-reproducible builds with LTO [bsc#1172846].
+
+-------------------------------------------------------------------
+Fri Jul 3 09:47:51 UTC 2020 - Guillaume GARDET <[email protected]>
+
+- Enable nvptx support for aarch64
+
+-------------------------------------------------------------------
+Thu Jun 25 09:08:00 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to gcc-10 branch head (c91e43e9363bd119a695d6450), git290.
+ * Includes fix for PR95719, fixing LibreOffice.
+
+-------------------------------------------------------------------
+Thu Jun 11 16:26:53 UTC 2020 - Matwey Kornilov <[email protected]>
+
+- Enable c++ for arm-none-eabi
+
+-------------------------------------------------------------------
+Fri May 15 12:00:41 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to gcc-10 branch head (b0461f44076c26ced5526e4fd6), git68.
+- Add gcc10-foffload-default.patch to make offloading ignore
+ offload targets that have not been installed both at compile
+ and runtime (for the libgomp plugin part).
+
+-------------------------------------------------------------------
+Thu May 7 13:43:25 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to gcc-10 branch head (dd38686d9c810cecbaa80bb82e), git40.
+ * Includes GCC 10.1 release.
+
+-------------------------------------------------------------------
+Sat May 2 09:37:31 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to gcc-10 branch head (2aaa1dc3c87372fd55c1c33aa7a), git5.
+ * Includes first release candidate for GCC 10.1.
+ * Includes gcc10-pr94734.patch
+
+-------------------------------------------------------------------
+Fri Apr 24 11:43:55 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (3685c5adf5c0b30268cb8f95c89e4), git176017.
+- Add gcc10-pr94734.patch
+
+-------------------------------------------------------------------
+Fri Apr 17 12:33:31 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (b835645c7a51b7e99092abe61d677), git175845.
+- Drop to 4 jobs as constraint for s390x.
+
+-------------------------------------------------------------------
+Thu Apr 16 13:08:04 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (effcb4181e143bc390286a489ff84), git175831.
+- Package arm_cde.h and arm_mve_types.h for arm.
+- Alter _constraints to also constrain jobs.
+- Add libzstd-devel BuildRequires to cross compiler specs.
+- Switch to release checking builds.
+
+-------------------------------------------------------------------
+Wed Apr 15 09:00:46 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (2dc9294c3c7c81a6d5e1d4dedf58f), git175805.
+
+-------------------------------------------------------------------
+Wed Apr 8 07:59:48 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (13e41d8b9d3d7598c72c38acc86a3), git175688.
+
+-------------------------------------------------------------------
+Mon Apr 6 07:51:47 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (c72a1b6f8b26de37d1a922a8af143), git175641.
+
+-------------------------------------------------------------------
+Fri Mar 27 19:43:44 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (038769535a8cbdd3dd3e100bde314), git175499.
+
+-------------------------------------------------------------------
+Tue Mar 24 07:23:45 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (75c24a08d697d6442fe6c26142f05), git175422.
+
+-------------------------------------------------------------------
+Fri Mar 20 10:13:54 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (7d4549b2cd209eb621453ce13be7f), git175366.
+
+-------------------------------------------------------------------
+Thu Mar 19 10:22:27 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (c7e9019681857b329bbe4c1e7ec8d), git175348.
+- Package arm_mve.h for arm.
+
+-------------------------------------------------------------------
+Wed Mar 18 08:39:57 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (4e3d3e40726e1b68bf52fa205c68495124ea60b8).
+- libgphobos and libgdruntime SONAME versions were reset to 1.
+
+-------------------------------------------------------------------
+Fri Mar 13 14:01:40 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (3604480a6fe493c51d6ebd53d9b1abeebbbb828f).
+
+-------------------------------------------------------------------
+Mon Mar 9 14:21:19 UTC 2020 - Richard Biener <[email protected]>
+
+- Update embedded newlib to newlib-3.3.0.tar.xz, drop old
+ newlib-3.1.0.tar.xz
+- Enable support for amdgcn-amdhsa OpenMP/OpenACC offloading.
+
+-------------------------------------------------------------------
+Fri Mar 6 09:23:13 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (655e5c29ae4080666154b3e10ac81116a1b7a638).
+- Re-add gcc9-reproducible-builds.patch and
+ gcc9-reproducible-builds-buildid-for-checksum.patch.
+
+-------------------------------------------------------------------
+Mon Mar 2 10:16:06 UTC 2020 - Richard Biener <[email protected]>
+
+- Update to master head (778a77357cad11e8dd4c810544330af0fbe843b1).
+ * Includes fix for binutils version parsing [gcc#93965]
+
+-------------------------------------------------------------------
+Tue Feb 25 13:43:17 UTC 2020 - Richard Biener <[email protected]>
+
+- Add libstdc++6-pp provides and conflicts to avoid file conflicts
+ with same minor version of libstdc++6-pp from gcc9.
+
+-------------------------------------------------------------------
+Fri Feb 21 09:58:21 UTC 2020 - Richard Biener <[email protected]>
+
+- Disable zstd use for SLES15 and older.
+
+-------------------------------------------------------------------
+Tue Feb 18 15:37:52 UTC 2020 - Martin Li??ka <[email protected]>
+
+- Bump to rfa1160f6e50500aa38162fefb43bfb10c25e0363.
+
+-------------------------------------------------------------------
+Tue Feb 18 13:54:32 UTC 2020 - Martin Li??ka <[email protected]>
+
+- Bump to r33351ff9faa21c4c1af377d661a52ac0ce366db3.
+
+-------------------------------------------------------------------
+Wed Feb 12 08:02:18 UTC 2020 - Richard Biener <[email protected]>
+
+- Adjust installed headers for arm and aarch64, enable link-mutex
+ for riscv64.
+
+-------------------------------------------------------------------
+Mon Feb 10 13:52:26 UTC 2020 - Andreas Schwab <[email protected]>
+
+- Don't remove go tool buildid, needed for bootstrapping go
++++ 52 more lines (skipped)
++++ between /dev/null
++++ and
/work/SRC/openSUSE:Leap:15.2:Update/.gcc10.16441.new.32437/cross-aarch64-gcc10.changes
New Changes file:
cross-amdgcn-gcc10.changes: same change
New Changes file:
cross-arm-gcc10.changes: same change
New Changes file:
cross-arm-none-gcc10-bootstrap.changes: same change
New Changes file:
cross-arm-none-gcc10.changes: same change
New Changes file:
cross-avr-gcc10-bootstrap.changes: same change
New Changes file:
cross-avr-gcc10.changes: same change
New Changes file:
cross-epiphany-gcc10-bootstrap.changes: same change
New Changes file:
cross-epiphany-gcc10.changes: same change
New Changes file:
cross-hppa-gcc10.changes: same change
New Changes file:
cross-i386-gcc10.changes: same change
New Changes file:
cross-m68k-gcc10.changes: same change
New Changes file:
cross-mips-gcc10.changes: same change
New Changes file:
cross-nvptx-gcc10.changes: same change
New Changes file:
cross-ppc64-gcc10.changes: same change
New Changes file:
cross-ppc64le-gcc10.changes: same change
New Changes file:
cross-riscv64-elf-gcc10-bootstrap.changes: same change
New Changes file:
cross-riscv64-elf-gcc10.changes: same change
New Changes file:
cross-riscv64-gcc10.changes: same change
New Changes file:
cross-rx-gcc10-bootstrap.changes: same change
New Changes file:
cross-rx-gcc10.changes: same change
New Changes file:
cross-s390x-gcc10.changes: same change
New Changes file:
cross-sparc-gcc10.changes: same change
New Changes file:
cross-sparc64-gcc10.changes: same change
New Changes file:
cross-x86_64-gcc10.changes: same change
New Changes file:
gcc10-testresults.changes: same change
New Changes file:
gcc10.changes: same change
New:
----
README.First-for.SuSE.packagers
_constraints
change_spec
check-build.sh
cross-aarch64-gcc10.changes
cross-aarch64-gcc10.spec
cross-amdgcn-gcc10.changes
cross-amdgcn-gcc10.spec
cross-arm-gcc10.changes
cross-arm-gcc10.spec
cross-arm-none-gcc10-bootstrap.changes
cross-arm-none-gcc10-bootstrap.spec
cross-arm-none-gcc10.changes
cross-arm-none-gcc10.spec
cross-avr-gcc10-bootstrap.changes
cross-avr-gcc10-bootstrap.spec
cross-avr-gcc10.changes
cross-avr-gcc10.spec
cross-epiphany-gcc10-bootstrap.changes
cross-epiphany-gcc10-bootstrap.spec
cross-epiphany-gcc10.changes
cross-epiphany-gcc10.spec
cross-hppa-gcc10.changes
cross-hppa-gcc10.spec
cross-i386-gcc10.changes
cross-i386-gcc10.spec
cross-m68k-gcc10.changes
cross-m68k-gcc10.spec
cross-mips-gcc10.changes
cross-mips-gcc10.spec
cross-nvptx-gcc10.changes
cross-nvptx-gcc10.spec
cross-ppc64-gcc10.changes
cross-ppc64-gcc10.spec
cross-ppc64le-gcc10.changes
cross-ppc64le-gcc10.spec
cross-riscv64-elf-gcc10-bootstrap.changes
cross-riscv64-elf-gcc10-bootstrap.spec
cross-riscv64-elf-gcc10.changes
cross-riscv64-elf-gcc10.spec
cross-riscv64-gcc10.changes
cross-riscv64-gcc10.spec
cross-rx-gcc10-bootstrap.changes
cross-rx-gcc10-bootstrap.spec
cross-rx-gcc10.changes
cross-rx-gcc10.spec
cross-s390x-gcc10.changes
cross-s390x-gcc10.spec
cross-sparc-gcc10.changes
cross-sparc-gcc10.spec
cross-sparc64-gcc10.changes
cross-sparc64-gcc10.spec
cross-x86_64-gcc10.changes
cross-x86_64-gcc10.spec
cross.spec.in
gcc-10.2.1+git583.tar.xz
gcc-add-defaultsspec.diff
gcc.spec.in
gcc10-foffload-default.patch
gcc10-rpmlintrc
gcc10-testresults-rpmlintrc
gcc10-testresults.changes
gcc10-testresults.spec
gcc10.changes
gcc10.spec
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
gcc7-avoid-fixinc-error.diff
gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
gcc9-reproducible-builds-buildid-for-checksum.patch
gcc9-reproducible-builds.patch
newlib-3.3.0.tar.xz
pre_checkin.sh
tls-no-direct.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cross-aarch64-gcc10.spec ++++++
++++ 904 lines (skipped)
cross-amdgcn-gcc10.spec: same change
cross-arm-gcc10.spec: same change
cross-arm-none-gcc10-bootstrap.spec: same change
cross-arm-none-gcc10.spec: same change
cross-avr-gcc10-bootstrap.spec: same change
cross-avr-gcc10.spec: same change
cross-epiphany-gcc10-bootstrap.spec: same change
cross-epiphany-gcc10.spec: same change
cross-hppa-gcc10.spec: same change
cross-i386-gcc10.spec: same change
cross-m68k-gcc10.spec: same change
cross-mips-gcc10.spec: same change
cross-nvptx-gcc10.spec: same change
cross-ppc64-gcc10.spec: same change
cross-ppc64le-gcc10.spec: same change
cross-riscv64-elf-gcc10-bootstrap.spec: same change
cross-riscv64-elf-gcc10.spec: same change
cross-riscv64-gcc10.spec: same change
cross-rx-gcc10-bootstrap.spec: same change
cross-rx-gcc10.spec: same change
cross-s390x-gcc10.spec: same change
cross-sparc-gcc10.spec: same change
cross-sparc64-gcc10.spec: same change
cross-x86_64-gcc10.spec: same change
gcc10-testresults.spec: same change
gcc10.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">26</size>
</disk>
<physicalmemory>
<size unit="G">4</size>
</physicalmemory>
<processors>4</processors>
<jobs>4</jobs>
</hardware>
<overwrite>
<conditions>
<arch>x86_64</arch>
<arch>ppc64le</arch>
<arch>aarch64</arch>
</conditions>
<hardware>
<memory>
<size unit="G">8</size>
</memory>
<processors>8</processors>
<jobs>8</jobs>
</hardware>
</overwrite>
</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,/SRC-COMMON-BEGIN/p' cross.spec.in
sed -n -e '/SRC-COMMON-BEGIN/,/SRC-COMMON-END/p' $outfile
sed -n -e '/SRC-COMMON-END/,/BUILD-COMMON-BEGIN/p' cross.spec.in
sed -n -e '/BUILD-COMMON-BEGIN/,/BUILD-COMMON-END/p' $outfile
sed -n -e '/BUILD-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 1
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_cross cross-riscv64-gcc$base_ver riscv64 riscv64-suse-linux %define
gcc_icecream 1
add_newlib_cross cross-arm-none-gcc$base_ver arm-none arm-none-eabi
add_newlib_cross cross-epiphany-gcc$base_ver epiphany epiphany-elf
#add_newlib_cross cross-nds32le-gcc$base_ver nds32le nds32le-elf
add_newlib_cross cross-riscv64-elf-gcc$base_ver riscv64 riscv64-elf
#add_newlib_cross cross-rl78-gcc$base_ver rl78 rl78-elf
add_newlib_cross cross-rx-gcc$base_ver rx rx-elf
fi
# the nvptx and amdgcn crosses are used for offloading
add_cross cross-nvptx-gcc$base_ver nvptx nvptx-none %define gcc_accel 1
add_cross cross-amdgcn-gcc$base_ver amdgcn amdgcn-amdhsa %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
# In the staging/ring projects, we don't want to build the cross-* packages,
but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%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_nvptx 0
%define build_gcn 0
%define build_d 0
%define enable_plugins 0
%define use_lto_bootstrap 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}" == "arm-none"
%define binutils_target arm
%endif
%if "%{cross_arch}" == "riscv64-elf"
%define binutils_target riscv64
%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}
# SRC-COMMON-BEGIN
# SRC-COMMON-END
%if "%{cross_arch}" != "nvptx"
%if "%{cross_arch}" != "amdgcn"
BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
BuildRequires: gcc-c++
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
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
BuildRequires: isl-devel
%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 aarch64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
BuildRequires: llvm
BuildRequires: lld
Requires: llvm
Requires: lld
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
ExclusiveArch: x86_64
%else
ExclusiveArch: do-not-build
%endif
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%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
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
%if 0%{?gcc_icecream:1}
Note this is only useful for building freestanding things like the
kernel since it fails to include target libraries and headers.
%endif
%if 0%{?gcc_libc_bootstrap:1}
This is a package that is necessary for bootstrapping another package
only, it is not intended for any other use.
%endif
# BUILD-COMMON-BEGIN
# BUILD-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
%if 0%{?amdgcn_newlib:1}
%package -n cross-amdgcn-newlib@base_ver@-devel
Summary: Newlib for the amdgcn offload target
Group: Development/Languages/C and C++
Provides: cross-amdgcn-newlib-devel = %{version}-%{release}
Conflicts: cross-amdgcn-newlib-devel
%description -n cross-amdgcn-newlib@base_ver@-devel
Newlib development files for the amdgcn offload target compiler.
%endif
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
%if "%{TARGET_ARCH}" == "amdgcn"
# libtool needs to be able to call ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
# 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
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# 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
# for amdgcn install the symlinks to the llvm tools
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar
$RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as
$RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld
$RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
ln -s %{_prefix}/amdgcn-amdhsa/bin/nm
$RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm
ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib
$RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib
%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 lto-dump 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}-lto-dump %{gcc_target_arch}-lto-dump
%{_bindir}/%{gcc_target_arch}-lto-dump%{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}-lto-dump%{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}-lto-dump
%{_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}-lto-dump
%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
%if 0%{?amdgcn_newlib:1}
%files -n cross-amdgcn-newlib@base_ver@-devel
%defattr(-,root,root)
%{_prefix}/%{gcc_target_arch}
%{_prefix}/bin/amdgcn-amdhsa-ar
%{_prefix}/bin/amdgcn-amdhsa-as
%{_prefix}/bin/amdgcn-amdhsa-ld
%{_prefix}/bin/amdgcn-amdhsa-nm
%{_prefix}/bin/amdgcn-amdhsa-ranlib
%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 ++++++
++++ 2583 lines (skipped)
++++++ gcc10-foffload-default.patch ++++++
2019-01-17 Jakub Jelinek <[email protected]>
* gcc.c (offload_targets_default): New variable.
(process_command): Set it if -foffload is defaulted.
(driver::maybe_putenv_OFFLOAD_TARGETS): Add OFFLOAD_TARGET_DEFAULT=1
into environment if -foffload has been defaulted.
* lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define.
(compile_offload_image): If OFFLOAD_TARGET_DEFAULT
is in the environment, don't fail if corresponding mkoffload
can't be found.
(compile_images_for_offload_targets): Likewise. Free and clear
offload_names if no valid offload is found.
libgomp/
* target.c (gomp_load_plugin_for_device): If a plugin can't be
dlopened, assume it has no devices silently.
--- gcc/gcc.c.jj 2017-01-17 10:28:40.000000000 +0100
+++ gcc/gcc.c 2017-01-20 16:26:29.649962902 +0100
@@ -290,6 +290,10 @@ static const char *spec_host_machine = D
static char *offload_targets = NULL;
+/* Set to true if -foffload has not been used and offload_targets
+ is set to the configured in default. */
+static bool offload_targets_default;
+
/* Nonzero if cross-compiling.
When -b is used, the value comes from the `specs' file. */
@@ -4457,7 +4461,10 @@ process_command (unsigned int decoded_op
/* If the user didn't specify any, default to all configured offload
targets. */
if (ENABLE_OFFLOADING && offload_targets == NULL)
- handle_foffload_option (OFFLOAD_TARGETS);
+ {
+ handle_foffload_option (OFFLOAD_TARGETS);
+ offload_targets_default = true;
+ }
if (output_file
&& strcmp (output_file, "-") != 0
@@ -7693,6 +7700,8 @@ driver::maybe_putenv_OFFLOAD_TARGETS ()
obstack_grow (&collect_obstack, offload_targets,
strlen (offload_targets) + 1);
xputenv (XOBFINISH (&collect_obstack, char *));
+ if (offload_targets_default)
+ xputenv ("OFFLOAD_TARGET_DEFAULT=1");
}
free (offload_targets);
--- gcc/lto-wrapper.c.jj 2017-01-01 12:45:34.000000000 +0100
+++ gcc/lto-wrapper.c 2017-01-20 16:34:18.294016997 +0100
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3.
/* Environment variable, used for passing the names of offload targets from GCC
driver to lto-wrapper. */
#define OFFLOAD_TARGET_NAMES_ENV "OFFLOAD_TARGET_NAMES"
+#define OFFLOAD_TARGET_DEFAULT_ENV "OFFLOAD_TARGET_DEFAULT"
enum lto_mode_d {
LTO_MODE_NONE, /* Not doing LTO. */
@@ -822,6 +823,12 @@ compile_offload_image (const char *targe
break;
}
+ if (!compiler && getenv (OFFLOAD_TARGET_DEFAULT_ENV))
+ {
+ free_array_of_ptrs ((void **) paths, n_paths);
+ return NULL;
+ }
+
if (!compiler)
fatal_error (input_location,
"could not find %s in %s (consider using %<-B%>)",
@@ -885,6 +892,7 @@ compile_images_for_offload_targets (unsi
unsigned num_targets = parse_env_var (target_names, &names, NULL);
int next_name_entry = 0;
+ bool hsa_seen = false;
const char *compiler_path = getenv ("COMPILER_PATH");
if (!compiler_path)
goto out;
@@ -897,18 +905,26 @@ compile_images_for_offload_targets (unsi
/* HSA does not use LTO-like streaming and a different compiler, skip
it. */
if (strcmp (names[i], "hsa") == 0)
- continue;
+ {
+ hsa_seen = true;
+ continue;
+ }
offload_names[next_name_entry]
= compile_offload_image (names[i], compiler_path, in_argc, in_argv,
compiler_opts, compiler_opt_count,
linker_opts, linker_opt_count);
if (!offload_names[next_name_entry])
- fatal_error (input_location,
- "problem with building target image for %s", names[i]);
+ continue;
next_name_entry++;
}
+ if (next_name_entry == 0 && !hsa_seen)
+ {
+ free (offload_names);
+ offload_names = NULL;
+ }
+
out:
free_array_of_ptrs ((void **) names, num_targets);
}
--- libgomp/target.c.jj 2017-01-01 12:45:52.000000000 +0100
+++ libgomp/target.c 2017-01-20 20:12:13.756710875 +0100
@@ -2356,7 +2356,7 @@ gomp_load_plugin_for_device (struct gomp
void *plugin_handle = dlopen (plugin_name, RTLD_LAZY);
if (!plugin_handle)
- goto dl_fail;
+ return 0;
/* Check if all required functions are available in the plugin and store
their handlers. None of the symbols can legitimately be NULL,
++++++ gcc10-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")
++++++ gcc10-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 ("gcc.*-testresults.*file-contains-buildroot")
# The package should _not_ be noarch, testresults differ from architecture
# to architecture
addFilter ("gcc.*-testresults.*no-binary")
++++++ 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
@@ -301,7 +301,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES)
$(MULTILIB_CFLAGS) -g0 \
$(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) $(USE_TM_CLONE_REGISTRY)
+ $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY) -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 ++++++
++++ 708 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-10.mo; \
+ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-10.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-10", LOCALEDIR);
+ (void) textdomain ("gcc-10");
/* 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 = -10
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;
}
++++++ 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
++++++ gcc9-reproducible-builds-buildid-for-checksum.patch ++++++
Use the binaries build-id as checksum for PCH purposes.
diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c
index a2292f46a7d..94d633d139a 100644
--- a/gcc/c-family/c-pch.c
+++ b/gcc/c-family/c-pch.c
@@ -65,6 +65,66 @@ static FILE *pch_outfile;
static const char *get_ident (void);
+#if _GNU_SOURCE
+#include <link.h>
+
+#define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1))
+
+static int
+get_build_id_1 (struct dl_phdr_info *info, size_t, void *data)
+{
+ for (unsigned i = 0; i < info->dlpi_phnum; ++i)
+ {
+ if (info->dlpi_phdr[i].p_type != PT_NOTE)
+ continue;
+ ElfW(Nhdr) *nhdr
+ = (ElfW(Nhdr) *)(info->dlpi_addr + info->dlpi_phdr[i].p_vaddr);
+ ptrdiff_t size = info->dlpi_phdr[i].p_filesz;
+ ptrdiff_t align = info->dlpi_phdr[i].p_align;
+ if (align != 8)
+ align = 4;
+ while (size >= (ptrdiff_t)sizeof (ElfW(Nhdr)))
+ {
+ if (nhdr->n_type == NT_GNU_BUILD_ID
+ && nhdr->n_namesz == 4
+ && strncmp ((char *)nhdr
+ + sizeof (ElfW(Nhdr)),
+ "GNU", 4) == 0
+ && nhdr->n_descsz >= 16)
+ {
+ memcpy (data,
+ (char *)nhdr
+ + ALIGN (sizeof (ElfW(Nhdr))
+ + nhdr->n_namesz, align), 16);
+ return 1;
+ }
+ size_t offset = (ALIGN (sizeof (ElfW(Nhdr))
+ + nhdr->n_namesz, align)
+ + ALIGN(nhdr->n_descsz, align));
+ nhdr = (ElfW(Nhdr) *)((char *)nhdr + offset);
+ size -= offset;
+ }
+ }
+
+ return 0;
+}
+
+static const unsigned char *
+get_build_id ()
+{
+ static unsigned char build_id[16];
+ if (!dl_iterate_phdr (get_build_id_1, build_id))
+ return NULL;
+ return build_id;
+}
+#else
+static const unsigned char *
+get_build_id ()
+{
+ return NULL;
+}
+#endif
+
/* Compute an appropriate 8-byte magic number for the PCH file, so that
utilities like file(1) can identify it, and so that GCC can quickly
ignore non-PCH files and PCH files that are of a completely different
@@ -120,8 +180,11 @@ pch_init (void)
v.pch_init = &pch_init;
target_validity = targetm.get_pch_validity (&v.target_data_length);
+ const unsigned char *chksum = get_build_id ();
+ if (!chksum)
+ chksum = executable_checksum;
if (fwrite (partial_pch, IDENT_LENGTH, 1, f) != 1
- || fwrite (executable_checksum, 16, 1, f) != 1
+ || fwrite (chksum, 16, 1, f) != 1
|| fwrite (&v, sizeof (v), 1, f) != 1
|| fwrite (target_validity, v.target_data_length, 1, f) != 1)
fatal_error (input_location, "cannot write to %s: %m", pch_file);
@@ -237,7 +300,10 @@ c_common_valid_pch (cpp_reader *pfile, const char *name,
int fd)
}
return 2;
}
- if (memcmp (ident + IDENT_LENGTH, executable_checksum, 16) != 0)
+ const unsigned char *chksum = get_build_id ();
+ if (!chksum)
+ chksum = executable_checksum;
+ if (memcmp (ident + IDENT_LENGTH, chksum, 16) != 0)
{
if (cpp_get_options (pfile)->warn_invalid_pch)
cpp_error (pfile, CPP_DL_WARNING,
diff --git a/gcc/genchecksum.c b/gcc/genchecksum.c
index 09fbb63fa93..ec8b3281d53 100644
--- a/gcc/genchecksum.c
+++ b/gcc/genchecksum.c
@@ -113,8 +113,13 @@ main (int argc, char ** argv)
puts ("#include \"config.h\"");
puts ("#include \"system.h\"");
fputs ("EXPORTED_CONST unsigned char executable_checksum[16] = { ", stdout);
+#if _GNU_SOURCE
+ for (i = 0; i < 16; i++)
+ printf ("0x%02x%s", 0, i == 15 ? " };\n" : ", ");
+#else
for (i = 0; i < 16; i++)
printf ("0x%02x%s", result[i], i == 15 ? " };\n" : ", ");
+#endif
return 0;
}
++++++ gcc9-reproducible-builds.patch ++++++
Avoid leaking current data on generated file for Ada.
Index: gcc/ada/gcc-interface/Makefile.in
===================================================================
--- gcc/ada/gcc-interface/Makefile.in (revision 268977)
+++ gcc/ada/gcc-interface/Makefile.in (working copy)
@@ -2407,6 +2407,7 @@ $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib
$(OSCONS_CPP) ; \
$(OSCONS_EXTRACT) ; \
../bldtools/oscons/xoscons s-oscons)
+ touch -r $(fsrcpfx)ada/gsocket.h $@
gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
$(RTSDIR)/s-oscons.ads
test -f $(RTSDIR)/s-oscons.ads || exit 1
++++++ 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