Hello community,
here is the log from the commit of package gcc48 for openSUSE:Factory checked
in at 2015-07-21 13:23:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gcc48 (Old)
and /work/SRC/openSUSE:Factory/.gcc48.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcc48"
Changes:
--------
---
/work/SRC/openSUSE:Factory/gcc48/cross-aarch64-gcc48-icecream-backend.changes
2015-03-05 15:31:50.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.gcc48.new/cross-aarch64-gcc48-icecream-backend.changes
2015-07-21 13:23:14.000000000 +0200
@@ -1,0 +2,49 @@
+Tue Jun 23 09:56:03 UTC 2015 - [email protected]
+
+- Update to GCC 4.8.5 release.
+ * Fixes bogus integer overflow in constant expression. [bnc#934689]
+ * Fixes ICE with atomics on aarch64. [bnc#930176]
+- Add patch gcc48-pr66306.patch for reload issue on S390.
+- Add patch to keep functions leaf when they are instrumented for
+ profiling on s390[x]. [bnc#899871]
+- Add patch gcc48-bnc922534.patch to avoid accessing invalid memory
+ when passing aggregates by value. [bnc#922534]
+- Add patch gcc48-s390x-keep-leaf-when-profiled.diff for
+ kgraft. [bnc #899871]
+
+-------------------------------------------------------------------
+Mon Jun 1 12:10:02 UTC 2015 - [email protected]
+
+- Fix build against SLE11 SP4. [fate#317926]
+ * Build without GRAPHITE support where isl and cloog-isl are not
+ available.
+ * Where mpfr 2.4.0 is not available disable the few features
+ requiring it to allow building with mpfr 2.3.2,
+ gcc48-remove-mpfr-2.4.0-requirement.patch.
+ * Disable Ada build for ppc64.
+
+-------------------------------------------------------------------
+Thu Apr 23 09:40:34 UTC 2015 - [email protected]
+
+- Build s390[x] with --with-tune=z9-109 --with-arch=z900 on SLE11
+ again. [bnc#927993]
+
+-------------------------------------------------------------------
+Mon Apr 20 11:39:59 UTC 2015 - [email protected]
+
+- Remove obsolete libsanitizer-tsan-res-state.patch
+
+-------------------------------------------------------------------
+Fri Mar 27 09:32:00 UTC 2015 - [email protected]
+
+- Update to gcc-4_8-branch head (r221715).
+ * Includes GCC 4.8.4 release.
+ * Includes fix for -imacros bug. [bnc#917169]
+ * Includes fix for incorrect -Warray-bounds warnings. [bnc#919274]
+ * Includes updated -mhotpatch for s390x. [bnc#924525]
+ * Includes fix for ppc64le issue with doubleword vector extract.
+ [bnc#924687]
+- Add gcc48-bnc889990.patch to backport rework of the memory allocator
+ for C++ exceptions used in OOM situations. [bnc#889990]
+
+-------------------------------------------------------------------
cross-armv6hl-gcc48-icecream-backend.changes: same change
cross-armv7hl-gcc48-icecream-backend.changes: same change
cross-hppa-gcc48-icecream-backend.changes: same change
cross-i386-gcc48-icecream-backend.changes: same change
cross-ia64-gcc48-icecream-backend.changes: same change
cross-ppc-gcc48-icecream-backend.changes: same change
cross-ppc64-gcc48-icecream-backend.changes: same change
cross-ppc64le-gcc48-icecream-backend.changes: same change
cross-s390-gcc48-icecream-backend.changes: same change
cross-s390x-gcc48-icecream-backend.changes: same change
cross-x86_64-gcc48-icecream-backend.changes: same change
gcc48-testresults.changes: same change
gcc48.changes: same change
libffi48.changes: same change
libgcj48.changes: same change
Old:
----
gcc-4.8.3-r218481.tar.bz2
libsanitizer-tsan-res-state.patch
New:
----
gcc-4.8.5.tar.bz2
gcc48-bnc889990.patch
gcc48-bnc922534.patch
gcc48-pr66306.patch
gcc48-remove-mpfr-2.4.0-requirement.patch
gcc48-s390x-keep-leaf-when-profiled.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cross-aarch64-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.duJXpC/_old 2015-07-21 13:23:23.000000000 +0200
+++ /var/tmp/diff_new_pack.duJXpC/_new 2015-07-21 13:23:23.000000000 +0200
@@ -91,7 +91,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.3+r218481
+Version: 4.8.5
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -125,8 +125,12 @@
Patch37: function-profiling-aarch64.patch
Patch38: gcc48-lto-plugin-short-readwrite.diff
Patch39: gcc48-libstdc++-api-reference.patch
+Patch40: aarch64-vmlaq-lane-s32.diff
Patch41: gcc48-bnc884738.patch
-Patch42: libsanitizer-tsan-res-state.patch
+Patch43: gcc48-bnc889990.patch
+Patch45: gcc48-remove-mpfr-2.4.0-requirement.patch
+Patch46: gcc48-pr66306.patch
+Patch47: gcc48-bnc922534.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -134,8 +138,9 @@
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
+# Patches from IBM
Patch70: gcc48-ibm-power8-bnc871635.diff
-Patch71: aarch64-vmlaq-lane-s32.diff
+Patch71: gcc48-s390x-keep-leaf-when-profiled.diff
#testpatch end
@@ -205,15 +210,21 @@
%patch37 -p1
%patch38
%patch39
+%patch40
%patch41
-%patch42 -p1
+%patch43 -p1
+%if %{suse_version} < 1310
+%patch45
+%endif
+%patch46 -p1
+%patch47
%patch51
%patch55
%patch57
%patch60
%patch61
%patch70
-%patch71
+%patch71 -p1
#test patching end
@@ -446,8 +457,13 @@
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
+%if %{suse_version} == 1315
+ --with-cpu=power8 \
+ --with-tune=power8 \
+%else
--with-cpu=power7 \
--with-tune=power7 \
+%endif
%else
--with-cpu-64=power4 \
%endif
@@ -474,12 +490,20 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
cross-armv6hl-gcc48-icecream-backend.spec: same change
cross-armv7hl-gcc48-icecream-backend.spec: same change
cross-hppa-gcc48-icecream-backend.spec: same change
cross-i386-gcc48-icecream-backend.spec: same change
cross-ia64-gcc48-icecream-backend.spec: same change
cross-ppc-gcc48-icecream-backend.spec: same change
cross-ppc64-gcc48-icecream-backend.spec: same change
cross-ppc64le-gcc48-icecream-backend.spec: same change
cross-s390-gcc48-icecream-backend.spec: same change
cross-s390x-gcc48-icecream-backend.spec: same change
cross-x86_64-gcc48-icecream-backend.spec: same change
++++++ gcc48-testresults.spec ++++++
--- /var/tmp/diff_new_pack.duJXpC/_old 2015-07-21 13:23:24.000000000 +0200
+++ /var/tmp/diff_new_pack.duJXpC/_new 2015-07-21 13:23:24.000000000 +0200
@@ -38,10 +38,15 @@
# Ada currently fails to build on a few platforms, enable it only
# on those that work
# Note that AdaCore only supports %ix86, x86_64 and ia64
-%ifarch %ix86 x86_64 ppc ppc64 s390 ia64
+%if %{suse_version} >= 1310
+%define ada_arch %ix86 x86_64 ppc ppc64 s390 ia64
+%else
+%define ada_arch %ix86 x86_64 ppc s390 ia64
+%endif
+
+%ifarch %ada_arch
%define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
%else
-# alpha s390x hppa arm
%define build_ada 0
%endif
@@ -49,7 +54,7 @@
%define tsan_arch x86_64
%define asan_arch x86_64 %ix86 ppc ppc64 %sparc
%define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
-%define atomic_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc m68k
+%define atomic_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc m68k
ia64
# We don't want to build java
%ifarch mips
@@ -75,9 +80,8 @@
%define build_cp 1
%endif
-# For optional compilers only build C, C++ and Fortran
+# For optional compilers only build C, C++, Fortran and Ada
%if 0%{?build_optional_compiler_languages:1}
-%define build_ada 0
%define build_java 0
%define build_libjava 0
%define build_objc 0
@@ -161,13 +165,15 @@
BuildRequires: mpfr-devel
BuildRequires: perl
BuildRequires: zlib-devel
+%if %{suse_version} >= 1230
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
+%endif
%if %{build_ada}
%if %{suse_version} > 1230
-%define hostsuffix -4.8
+%define hostsuffix %{binsuffix}
BuildRequires: gcc48-ada
%else
%define hostsuffix %{nil}
@@ -226,7 +232,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.3+r218481
+Version: 4.8.5
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -286,8 +292,12 @@
Patch37: function-profiling-aarch64.patch
Patch38: gcc48-lto-plugin-short-readwrite.diff
Patch39: gcc48-libstdc++-api-reference.patch
+Patch40: aarch64-vmlaq-lane-s32.diff
Patch41: gcc48-bnc884738.patch
-Patch42: libsanitizer-tsan-res-state.patch
+Patch43: gcc48-bnc889990.patch
+Patch45: gcc48-remove-mpfr-2.4.0-requirement.patch
+Patch46: gcc48-pr66306.patch
+Patch47: gcc48-bnc922534.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -295,8 +305,9 @@
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
+# Patches from IBM
Patch70: gcc48-ibm-power8-bnc871635.diff
-Patch71: aarch64-vmlaq-lane-s32.diff
+Patch71: gcc48-s390x-keep-leaf-when-profiled.diff
#testpatch end
@@ -416,15 +427,21 @@
%patch37 -p1
%patch38
%patch39
+%patch40
%patch41
-%patch42 -p1
+%patch43 -p1
+%if %{suse_version} < 1310
+%patch45
+%endif
+%patch46 -p1
+%patch47
%patch51
%patch55
%patch57
%patch60
%patch61
%patch70
-%patch71
+%patch71 -p1
#test patching end
@@ -657,8 +674,13 @@
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
+%if %{suse_version} == 1315
+ --with-cpu=power8 \
+ --with-tune=power8 \
+%else
--with-cpu=power7 \
--with-tune=power7 \
+%endif
%else
--with-cpu-64=power4 \
%endif
@@ -685,12 +707,20 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
++++++ gcc48.spec ++++++
--- /var/tmp/diff_new_pack.duJXpC/_old 2015-07-21 13:23:24.000000000 +0200
+++ /var/tmp/diff_new_pack.duJXpC/_new 2015-07-21 13:23:24.000000000 +0200
@@ -20,10 +20,15 @@
# Ada currently fails to build on a few platforms, enable it only
# on those that work
# Note that AdaCore only supports %ix86, x86_64 and ia64
-%ifarch %ix86 x86_64 ppc ppc64 s390 ia64
+%if %{suse_version} >= 1310
+%define ada_arch %ix86 x86_64 ppc ppc64 s390 ia64
+%else
+%define ada_arch %ix86 x86_64 ppc s390 ia64
+%endif
+
+%ifarch %ada_arch
%define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
%else
-# alpha s390x hppa arm
%define build_ada 0
%endif
@@ -31,7 +36,7 @@
%define tsan_arch x86_64
%define asan_arch x86_64 %ix86 ppc ppc64 %sparc
%define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
-%define atomic_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc m68k
+%define atomic_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc m68k
ia64
# We don't want to build java
%ifarch mips
@@ -57,9 +62,8 @@
%define build_cp 1
%endif
-# For optional compilers only build C, C++ and Fortran
+# For optional compilers only build C, C++, Fortran and Ada
%if 0%{?build_optional_compiler_languages:1}
-%define build_ada 0
%define build_java 0
%define build_libjava 0
%define build_objc 0
@@ -143,13 +147,15 @@
BuildRequires: mpfr-devel
BuildRequires: perl
BuildRequires: zlib-devel
+%if %{suse_version} >= 1230
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
+%endif
%if %{build_ada}
%if %{suse_version} > 1230
-%define hostsuffix -4.8
+%define hostsuffix %{binsuffix}
BuildRequires: gcc48-ada
%else
%define hostsuffix %{nil}
@@ -208,7 +214,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.3+r218481
+Version: 4.8.5
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -268,8 +274,12 @@
Patch37: function-profiling-aarch64.patch
Patch38: gcc48-lto-plugin-short-readwrite.diff
Patch39: gcc48-libstdc++-api-reference.patch
+Patch40: aarch64-vmlaq-lane-s32.diff
Patch41: gcc48-bnc884738.patch
-Patch42: libsanitizer-tsan-res-state.patch
+Patch43: gcc48-bnc889990.patch
+Patch45: gcc48-remove-mpfr-2.4.0-requirement.patch
+Patch46: gcc48-pr66306.patch
+Patch47: gcc48-bnc922534.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -277,8 +287,9 @@
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
+# Patches from IBM
Patch70: gcc48-ibm-power8-bnc871635.diff
-Patch71: aarch64-vmlaq-lane-s32.diff
+Patch71: gcc48-s390x-keep-leaf-when-profiled.diff
#testpatch end
@@ -1493,15 +1504,21 @@
%patch37 -p1
%patch38
%patch39
+%patch40
%patch41
-%patch42 -p1
+%patch43 -p1
+%if %{suse_version} < 1310
+%patch45
+%endif
+%patch46 -p1
+%patch47
%patch51
%patch55
%patch57
%patch60
%patch61
%patch70
-%patch71
+%patch71 -p1
#test patching end
@@ -1734,8 +1751,13 @@
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
+%if %{suse_version} == 1315
+ --with-cpu=power8 \
+ --with-tune=power8 \
+%else
--with-cpu=power7 \
--with-tune=power7 \
+%endif
%else
--with-cpu-64=power4 \
%endif
@@ -1762,12 +1784,20 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
@@ -2095,6 +2125,8 @@
rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux/a.out.h
rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/mathdef.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys/ucontext.h
# no plugins
rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
++++++ libffi48.spec ++++++
--- /var/tmp/diff_new_pack.duJXpC/_old 2015-07-21 13:23:24.000000000 +0200
+++ /var/tmp/diff_new_pack.duJXpC/_new 2015-07-21 13:23:24.000000000 +0200
@@ -37,10 +37,15 @@
# Ada currently fails to build on a few platforms, enable it only
# on those that work
# Note that AdaCore only supports %ix86, x86_64 and ia64
-%ifarch %ix86 x86_64 ppc ppc64 s390 ia64
+%if %{suse_version} >= 1310
+%define ada_arch %ix86 x86_64 ppc ppc64 s390 ia64
+%else
+%define ada_arch %ix86 x86_64 ppc s390 ia64
+%endif
+
+%ifarch %ada_arch
%define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
%else
-# alpha s390x hppa arm
%define build_ada 0
%endif
@@ -48,7 +53,7 @@
%define tsan_arch x86_64
%define asan_arch x86_64 %ix86 ppc ppc64 %sparc
%define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
-%define atomic_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc m68k
+%define atomic_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc m68k
ia64
# We don't want to build java
%ifarch mips
@@ -74,9 +79,8 @@
%define build_cp 1
%endif
-# For optional compilers only build C, C++ and Fortran
+# For optional compilers only build C, C++, Fortran and Ada
%if 0%{?build_optional_compiler_languages:1}
-%define build_ada 0
%define build_java 0
%define build_libjava 0
%define build_objc 0
@@ -160,13 +164,15 @@
BuildRequires: mpfr-devel
BuildRequires: perl
BuildRequires: zlib-devel
+%if %{suse_version} >= 1230
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
+%endif
%if %{build_ada}
%if %{suse_version} > 1230
-%define hostsuffix -4.8
+%define hostsuffix %{binsuffix}
BuildRequires: gcc48-ada
%else
%define hostsuffix %{nil}
@@ -225,7 +231,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.3+r218481
+Version: 4.8.5
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -285,8 +291,12 @@
Patch37: function-profiling-aarch64.patch
Patch38: gcc48-lto-plugin-short-readwrite.diff
Patch39: gcc48-libstdc++-api-reference.patch
+Patch40: aarch64-vmlaq-lane-s32.diff
Patch41: gcc48-bnc884738.patch
-Patch42: libsanitizer-tsan-res-state.patch
+Patch43: gcc48-bnc889990.patch
+Patch45: gcc48-remove-mpfr-2.4.0-requirement.patch
+Patch46: gcc48-pr66306.patch
+Patch47: gcc48-bnc922534.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -294,8 +304,9 @@
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
+# Patches from IBM
Patch70: gcc48-ibm-power8-bnc871635.diff
-Patch71: aarch64-vmlaq-lane-s32.diff
+Patch71: gcc48-s390x-keep-leaf-when-profiled.diff
#testpatch end
@@ -504,15 +515,21 @@
%patch37 -p1
%patch38
%patch39
+%patch40
%patch41
-%patch42 -p1
+%patch43 -p1
+%if %{suse_version} < 1310
+%patch45
+%endif
+%patch46 -p1
+%patch47
%patch51
%patch55
%patch57
%patch60
%patch61
%patch70
-%patch71
+%patch71 -p1
#test patching end
@@ -745,8 +762,13 @@
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
+%if %{suse_version} == 1315
+ --with-cpu=power8 \
+ --with-tune=power8 \
+%else
--with-cpu=power7 \
--with-tune=power7 \
+%endif
%else
--with-cpu-64=power4 \
%endif
@@ -773,12 +795,20 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
@@ -934,6 +964,8 @@
rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux/a.out.h
rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/mathdef.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys/ucontext.h
# no plugins
rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
libgcj48.spec: same change
++++++ gcc-4.8.3-r218481.tar.bz2 -> gcc-4.8.5.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/gcc48/gcc-4.8.3-r218481.tar.bz2
/work/SRC/openSUSE:Factory/.gcc48.new/gcc-4.8.5.tar.bz2 differ: char 11, line 1
++++++ gcc.spec.in ++++++
--- /var/tmp/diff_new_pack.duJXpC/_old 2015-07-21 13:23:24.000000000 +0200
+++ /var/tmp/diff_new_pack.duJXpC/_new 2015-07-21 13:23:24.000000000 +0200
@@ -22,10 +22,15 @@
# Ada currently fails to build on a few platforms, enable it only
# on those that work
# Note that AdaCore only supports %ix86, x86_64 and ia64
-%ifarch %ix86 x86_64 ppc ppc64 s390 ia64
+%if %{suse_version} >= 1310
+%define ada_arch %ix86 x86_64 ppc ppc64 s390 ia64
+%else
+%define ada_arch %ix86 x86_64 ppc s390 ia64
+%endif
+
+%ifarch %ada_arch
%define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
%else
-# alpha s390x hppa arm
%define build_ada 0
%endif
@@ -33,7 +38,7 @@
%define tsan_arch x86_64
%define asan_arch x86_64 %ix86 ppc ppc64 %sparc
%define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
-%define atomic_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc m68k
+%define atomic_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc m68k
ia64
# We don't want to build java
%ifarch mips
@@ -59,9 +64,8 @@
%define build_cp 1
%endif
-# For optional compilers only build C, C++ and Fortran
+# For optional compilers only build C, C++, Fortran and Ada
%if 0%{?build_optional_compiler_languages:1}
-%define build_ada 0
%define build_java 0
%define build_libjava 0
%define build_objc 0
@@ -147,14 +151,16 @@
BuildRequires: mpfr-devel
BuildRequires: perl
BuildRequires: zlib-devel
+%if %{suse_version} >= 1230
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
+%endif
%if %{build_ada}
%if %{suse_version} > 1230
-%define hostsuffix -4.8
-BuildRequires: gcc48-ada
+%define hostsuffix %{binsuffix}
+BuildRequires: gcc@base_ver@-ada
%else
%define hostsuffix %{nil}
BuildRequires: gcc-ada
@@ -213,7 +219,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: http://gcc.gnu.org/
-Version: 4.8.3+r218481
+Version: 4.8.5
Release: 1
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -275,8 +281,12 @@
Patch37: function-profiling-aarch64.patch
Patch38: gcc48-lto-plugin-short-readwrite.diff
Patch39: gcc48-libstdc++-api-reference.patch
+Patch40: aarch64-vmlaq-lane-s32.diff
Patch41: gcc48-bnc884738.patch
-Patch42: libsanitizer-tsan-res-state.patch
+Patch43: gcc48-bnc889990.patch
+Patch45: gcc48-remove-mpfr-2.4.0-requirement.patch
+Patch46: gcc48-pr66306.patch
+Patch47: gcc48-bnc922534.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -284,8 +294,9 @@
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
+# Patches from IBM
Patch70: gcc48-ibm-power8-bnc871635.diff
-Patch71: aarch64-vmlaq-lane-s32.diff
+Patch71: gcc48-s390x-keep-leaf-when-profiled.diff
#testpatch end
@@ -1006,15 +1017,21 @@
%patch37 -p1
%patch38
%patch39
+%patch40
%patch41
-%patch42 -p1
+%patch43 -p1
+%if %{suse_version} < 1310
+%patch45
+%endif
+%patch46 -p1
+%patch47
%patch51
%patch55
%patch57
%patch60
%patch61
%patch70
-%patch71
+%patch71 -p1
#test patching end
@@ -1247,8 +1264,13 @@
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
+%if %{suse_version} == 1315
+ --with-cpu=power8 \
+ --with-tune=power8 \
+%else
--with-cpu=power7 \
--with-tune=power7 \
+%endif
%else
--with-cpu-64=power4 \
%endif
@@ -1275,12 +1297,20 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
+%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
+%else
+ --with-tune=z9-109 --with-arch=z900 \
+%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
@@ -1622,6 +1652,8 @@
rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux/a.out.h
rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/mathdef.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys/ucontext.h
# no plugins
rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
++++++ gcc48-bnc889990.patch ++++++
r220201 | rguenth | 2015-01-28 10:53:39 +0100 (Wed, 28 Jan 2015) | 9 lines
2015-01-28 Richard Biener <[email protected]>
PR libstdc++/64798
* libsupc++/eh_alloc.cc (struct allocated_entry): Align
data member.
(pool::allocate): Adjust allocation size and alignment to
that change.
(pool::free): Adjust pointer offsetting.
r219988 | rguenth | 2015-01-22 10:21:48 +0100 (Thu, 22 Jan 2015) | 20 lines
2015-01-22 Richard Biener <[email protected]>
PR libstdc++/64535
* libsupc++/eh_alloc.cc: Include new.
(bitmask_type): Remove.
(one_buffer): Likewise.
(emergency_buffer): Likewise.
(emergency_used): Likewise.
(dependents_buffer): Likewise.
(dependents_used): Likewise.
(class pool): New custom fixed-size arena, variable size object
allocator.
(emergency_pool): New global.
(__cxxabiv1::__cxa_allocate_exception): Use new emergency_pool.
(__cxxabiv1::__cxa_free_exception): Likewise.
(__cxxabiv1::__cxa_allocate_dependent_exception): Likewise.
(__cxxabiv1::__cxa_free_dependent_exception): Likewise.
* g++.old-deja/g++.eh/badalloc1.C: Adjust.
*** gcc-4_8-branch/libstdc++-v3/libsupc++/eh_alloc.cc Mon Feb 3 10:38:52 2014
--- trunk/libstdc++-v3/libsupc++/eh_alloc.cc Wed Jan 28 12:37:44 2015
***************
*** 1,5 ****
// -*- C++ -*- Allocate exception objects.
! // Copyright (C) 2001-2013 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
--- 1,5 ----
// -*- C++ -*- Allocate exception objects.
! // Copyright (C) 2001-2015 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
***************
*** 34,39 ****
--- 34,40 ----
#include <exception>
#include "unwind-cxx.h"
#include <ext/concurrence.h>
+ #include <new>
#if _GLIBCXX_HOSTED
using std::free;
***************
*** 72,133 ****
# define EMERGENCY_OBJ_COUNT 4
#endif
- #if INT_MAX == 32767 || EMERGENCY_OBJ_COUNT <= 32
- typedef unsigned int bitmask_type;
- #else
- #if defined (_GLIBCXX_LLP64)
- typedef unsigned long long bitmask_type;
- #else
- typedef unsigned long bitmask_type;
- #endif
- #endif
! typedef char one_buffer[EMERGENCY_OBJ_SIZE] __attribute__((aligned));
! static one_buffer emergency_buffer[EMERGENCY_OBJ_COUNT];
! static bitmask_type emergency_used;
! static __cxa_dependent_exception dependents_buffer[EMERGENCY_OBJ_COUNT];
! static bitmask_type dependents_used;
! namespace
! {
! // A single mutex controlling emergency allocations.
! __gnu_cxx::__mutex emergency_mutex;
! }
! extern "C" void *
! __cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) _GLIBCXX_NOTHROW
! {
! void *ret;
! thrown_size += sizeof (__cxa_refcounted_exception);
! ret = malloc (thrown_size);
! if (! ret)
{
__gnu_cxx::__scoped_lock sentry(emergency_mutex);
! bitmask_type used = emergency_used;
! unsigned int which = 0;
!
! if (thrown_size > EMERGENCY_OBJ_SIZE)
! goto failed;
! while (used & 1)
{
! used >>= 1;
! if (++which >= EMERGENCY_OBJ_COUNT)
! goto failed;
}
! emergency_used |= (bitmask_type)1 << which;
! ret = &emergency_buffer[which][0];
! failed:;
! if (!ret)
! std::terminate ();
! }
memset (ret, 0, sizeof (__cxa_refcounted_exception));
--- 73,262 ----
# define EMERGENCY_OBJ_COUNT 4
#endif
+ namespace
+ {
+ // A fixed-size heap, variable size object allocator
+ class pool
+ {
+ public:
+ pool();
! void *allocate (std::size_t);
! void free (void *);
! bool in_pool (void *);
! private:
! struct free_entry {
! std::size_t size;
! free_entry *next;
! };
! struct allocated_entry {
! std::size_t size;
! char data[] __attribute__((aligned));
! };
!
! // A single mutex controlling emergency allocations.
! __gnu_cxx::__mutex emergency_mutex;
!
! // The free-list
! free_entry *first_free_entry;
! // The arena itself - we need to keep track of these only
! // to implement in_pool.
! char *arena;
! std::size_t arena_size;
! };
! pool::pool()
! {
! // Allocate the arena - we could add a GLIBCXX_EH_ARENA_SIZE environment
! // to make this tunable.
! arena_size = (EMERGENCY_OBJ_SIZE * EMERGENCY_OBJ_COUNT
! + EMERGENCY_OBJ_COUNT * sizeof (__cxa_dependent_exception));
! arena = (char *)malloc (arena_size);
! if (!arena)
! {
! // If the allocation failed go without an emergency pool.
! arena_size = 0;
! first_free_entry = NULL;
! return;
! }
! // Populate the free-list with a single entry covering the whole arena
! first_free_entry = reinterpret_cast <free_entry *> (arena);
! new (first_free_entry) free_entry;
! first_free_entry->size = arena_size;
! first_free_entry->next = NULL;
! }
! void *pool::allocate (std::size_t size)
{
__gnu_cxx::__scoped_lock sentry(emergency_mutex);
+ // We need an additional size_t member plus the padding to
+ // ensure proper alignment of data.
+ size += offsetof (allocated_entry, data);
+ // And we need to at least hand out objects of the size of
+ // a freelist entry.
+ if (size < sizeof (free_entry))
+ size = sizeof (free_entry);
+ // And we need to align objects we hand out to the maximum
+ // alignment required on the target (this really aligns the
+ // tail which will become a new freelist entry).
+ size = ((size + __alignof__ (allocated_entry::data) - 1)
+ & ~(__alignof__ (allocated_entry::data) - 1));
+ // Search for an entry of proper size on the freelist.
+ free_entry **e;
+ for (e = &first_free_entry;
+ *e && (*e)->size < size;
+ e = &(*e)->next)
+ ;
+ if (!*e)
+ return NULL;
+ allocated_entry *x;
+ if ((*e)->size - size >= sizeof (free_entry))
+ {
+ // Slit block if it is too large.
+ free_entry *f = reinterpret_cast <free_entry *>
+ (reinterpret_cast <char *> (*e) + size);
+ std::size_t sz = (*e)->size;
+ free_entry *next = (*e)->next;
+ new (f) free_entry;
+ f->next = next;
+ f->size = sz - size;
+ x = reinterpret_cast <allocated_entry *> (*e);
+ new (x) allocated_entry;
+ x->size = size;
+ *e = f;
+ }
+ else
+ {
+ // Exact size match or too small overhead for a free entry.
+ std::size_t sz = (*e)->size;
+ free_entry *next = (*e)->next;
+ x = reinterpret_cast <allocated_entry *> (*e);
+ new (x) allocated_entry;
+ x->size = sz;
+ *e = next;
+ }
+ return &x->data;
+ }
! void pool::free (void *data)
! {
! __gnu_cxx::__scoped_lock sentry(emergency_mutex);
! allocated_entry *e = reinterpret_cast <allocated_entry *>
! (reinterpret_cast <char *> (data) - offsetof (allocated_entry, data));
! std::size_t sz = e->size;
! if (!first_free_entry)
! {
! // If the free list is empty just put the entry there.
! free_entry *f = reinterpret_cast <free_entry *> (e);
! new (f) free_entry;
! f->size = sz;
! f->next = NULL;
! first_free_entry = f;
! }
! else if (reinterpret_cast <char *> (e) + sz
! == reinterpret_cast <char *> (first_free_entry))
! {
! // Check if we can merge with the first free entry being right
! // after us.
! free_entry *f = reinterpret_cast <free_entry *> (e);
! new (f) free_entry;
! f->size = sz + first_free_entry->size;
! f->next = first_free_entry->next;
! first_free_entry = f;
! }
! else
{
! // Else search for a free item we can merge with at its end.
! free_entry **fe;
! for (fe = &first_free_entry;
! (*fe)->next
! && (reinterpret_cast <char *> ((*fe)->next)
! > reinterpret_cast <char *> (e) + sz);
! fe = &(*fe)->next)
! ;
! if (reinterpret_cast <char *> (*fe) + (*fe)->size
! == reinterpret_cast <char *> (e))
! /* Merge with the freelist entry. */
! (*fe)->size += sz;
! else
! {
! // Else put it after it which keeps the freelist sorted.
! free_entry *f = reinterpret_cast <free_entry *> (e);
! new (f) free_entry;
! f->size = sz;
! f->next = (*fe)->next;
! (*fe)->next = f;
! }
}
+ }
! bool pool::in_pool (void *ptr)
! {
! char *p = reinterpret_cast <char *> (ptr);
! return (p > arena
! && p < arena + arena_size);
! }
! pool emergency_pool;
! }
! extern "C" void *
! __cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) _GLIBCXX_NOTHROW
! {
! void *ret;
!
! thrown_size += sizeof (__cxa_refcounted_exception);
! ret = malloc (thrown_size);
!
! if (!ret)
! ret = emergency_pool.allocate (thrown_size);
!
! if (!ret)
! std::terminate ();
memset (ret, 0, sizeof (__cxa_refcounted_exception));
***************
*** 138,156 ****
extern "C" void
__cxxabiv1::__cxa_free_exception(void *vptr) _GLIBCXX_NOTHROW
{
! char *base = (char *) emergency_buffer;
! char *ptr = (char *) vptr;
! if (ptr >= base
! && ptr < base + sizeof (emergency_buffer))
! {
! const unsigned int which
! = (unsigned) (ptr - base) / EMERGENCY_OBJ_SIZE;
!
! __gnu_cxx::__scoped_lock sentry(emergency_mutex);
! emergency_used &= ~((bitmask_type)1 << which);
! }
else
! free (ptr - sizeof (__cxa_refcounted_exception));
}
--- 267,277 ----
extern "C" void
__cxxabiv1::__cxa_free_exception(void *vptr) _GLIBCXX_NOTHROW
{
! char *ptr = (char *) vptr - sizeof (__cxa_refcounted_exception);
! if (emergency_pool.in_pool (ptr))
! emergency_pool.free (ptr);
else
! free (ptr);
}
***************
*** 163,189 ****
(malloc (sizeof (__cxa_dependent_exception)));
if (!ret)
! {
! __gnu_cxx::__scoped_lock sentry(emergency_mutex);
!
! bitmask_type used = dependents_used;
! unsigned int which = 0;
!
! while (used & 1)
! {
! used >>= 1;
! if (++which >= EMERGENCY_OBJ_COUNT)
! goto failed;
! }
! dependents_used |= (bitmask_type)1 << which;
! ret = &dependents_buffer[which];
!
! failed:;
!
! if (!ret)
! std::terminate ();
! }
memset (ret, 0, sizeof (__cxa_dependent_exception));
--- 284,294 ----
(malloc (sizeof (__cxa_dependent_exception)));
if (!ret)
! ret = static_cast <__cxa_dependent_exception*>
! (emergency_pool.allocate (sizeof (__cxa_dependent_exception)));
! if (!ret)
! std::terminate ();
memset (ret, 0, sizeof (__cxa_dependent_exception));
***************
*** 195,211 ****
__cxxabiv1::__cxa_free_dependent_exception
(__cxa_dependent_exception *vptr) _GLIBCXX_NOTHROW
{
! char *base = (char *) dependents_buffer;
! char *ptr = (char *) vptr;
! if (ptr >= base
! && ptr < base + sizeof (dependents_buffer))
! {
! const unsigned int which
! = (unsigned) (ptr - base) / sizeof (__cxa_dependent_exception);
!
! __gnu_cxx::__scoped_lock sentry(emergency_mutex);
! dependents_used &= ~((bitmask_type)1 << which);
! }
else
free (vptr);
}
--- 300,307 ----
__cxxabiv1::__cxa_free_dependent_exception
(__cxa_dependent_exception *vptr) _GLIBCXX_NOTHROW
{
! if (emergency_pool.in_pool (vptr))
! emergency_pool.free (vptr);
else
free (vptr);
}
*** gcc-4_8-branch/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C Mon Mar
18 09:44:40 2013
--- trunk/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C Thu Jan 22 10:58:02 2015
***************
*** 3,9 ****
// itself call malloc(), and will fail if there is no more
// memory available.
// { dg-do run { xfail { { xstormy16-*-* *-*-darwin[3-7]* } || vxworks_rtp }
} }
! // Copyright (C) 2000, 2002, 2003, 2010, 2012 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 6 June 2000 <[email protected]>
// Check we can throw a bad_alloc exception when malloc dies.
--- 3,9 ----
// itself call malloc(), and will fail if there is no more
// memory available.
// { dg-do run { xfail { { xstormy16-*-* *-*-darwin[3-7]* } || vxworks_rtp }
} }
! // Copyright (C) 2000, 2002, 2003, 2010, 2012, 2014 Free Software Foundation,
Inc.
// Contributed by Nathan Sidwell 6 June 2000 <[email protected]>
// Check we can throw a bad_alloc exception when malloc dies.
***************
*** 12,29 ****
extern "C" void abort();
extern "C" void *memcpy(void *, const void *, size_t);
// Assume that STACK_SIZE defined implies a system that does not have a
// large data space either, and additionally that we're not linking against
// a shared libstdc++ (which requires quite a bit more initialization space).
#ifdef STACK_SIZE
! const int arena_size = 256;
#else
#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__)
// FreeBSD, Solaris and HP-UX require even more space at initialization time.
// FreeBSD 5 now requires over 131072 bytes.
! const int arena_size = 262144;
#else
! const int arena_size = 32768;
#endif
#endif
--- 12,35 ----
extern "C" void abort();
extern "C" void *memcpy(void *, const void *, size_t);
+ // libstdc++ requires a large initialization time allocation for the
+ // emergency EH allocation pool. Add that to the arena size.
+
// Assume that STACK_SIZE defined implies a system that does not have a
// large data space either, and additionally that we're not linking against
// a shared libstdc++ (which requires quite a bit more initialization space).
#ifdef STACK_SIZE
! const int arena_size = 256 + 8 * 128;
#else
#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__)
// FreeBSD, Solaris and HP-UX require even more space at initialization time.
// FreeBSD 5 now requires over 131072 bytes.
! const int arena_size = 262144 + 72 * 1024;
#else
! // Because pointers make up the bulk of our exception-initialization
! // allocations, we scale by the pointer size from the original
! // 32-bit-systems-based estimate.
! const int arena_size = 32768 * ((sizeof (void *) + 3)/4) + 72 * 1024;
#endif
#endif
++++++ gcc48-bnc922534.patch ++++++
2015-04-30 Alan Modra <[email protected]>
PR target/65408
PR target/58744
PR middle-end/36043
* calls.c (load_register_parameters): Don't load past end of
mem unless suitably aligned.
* gcc.dg/pr65408.c: New.
Index: gcc/testsuite/gcc.dg/pr65408.c
===================================================================
--- gcc/testsuite/gcc.dg/pr65408.c (revision 0)
+++ gcc/testsuite/gcc.dg/pr65408.c (revision 222616)
@@ -0,0 +1,112 @@
+/* PR middle-end/36043 target/58744 target/65408 */
+/* { dg-do run { target mmap } } */
+/* { dg-options "-O2" } */
+
+#include <sys/mman.h>
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+#ifndef MAP_ANON
+#define MAP_ANON 0
+#endif
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
+typedef struct
+{
+ unsigned char r;
+ unsigned char g;
+ unsigned char b;
+} __attribute__((packed)) pr58744;
+
+typedef struct
+{
+ unsigned short r;
+ unsigned short g;
+ unsigned short b;
+} pr36043;
+
+typedef struct
+{
+ int r;
+ int g;
+ int b;
+} pr65408;
+
+__attribute__ ((noinline, noclone))
+void
+f1a (pr58744 x)
+{
+ if (x.r != 1 || x.g != 2 || x.b != 3)
+ __builtin_abort();
+}
+
+__attribute__ ((noinline, noclone))
+void
+f1 (pr58744 *x)
+{
+ f1a (*x);
+}
+
+__attribute__ ((noinline, noclone))
+void
+f2a (pr36043 x)
+{
+ if (x.r != 1 || x.g != 2 || x.b != 3)
+ __builtin_abort();
+}
+
+__attribute__ ((noinline, noclone))
+void
+f2 (pr36043 *x)
+{
+ f2a (*x);
+}
+
+__attribute__ ((noinline, noclone))
+void
+f3a (pr65408 x)
+{
+ if (x.r != 1 || x.g != 2 || x.b != 3)
+ __builtin_abort();
+}
+
+__attribute__ ((noinline, noclone))
+void
+f3 (pr65408 *x)
+{
+ f3a (*x);
+}
+
+int
+main ()
+{
+ char *p = mmap ((void *) 0, 131072, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if (p == MAP_FAILED)
+ return 0;
+ char *endp = p + 65536;
+ if (munmap (endp, 65536) < 0)
+ return 0;
+
+ pr58744 *s1 = (pr58744 *) endp - 1;
+ s1->r = 1;
+ s1->g = 2;
+ s1->b = 3;
+ f1 (s1);
+
+ pr36043 *s2 = (pr36043 *) endp - 1;
+ s2->r = 1;
+ s2->g = 2;
+ s2->b = 3;
+ f2 (s2);
+
+ pr65408 *s3 = (pr65408 *) endp - 1;
+ s3->r = 1;
+ s3->g = 2;
+ s3->b = 3;
+ f3 (s3);
+
+ return 0;
+}
Index: gcc/calls.c
===================================================================
--- gcc/calls.c (revision 224832)
+++ gcc/calls.c (working copy)
@@ -1952,6 +1952,26 @@ load_register_parameters (struct arg_dat
(XEXP (args[i].value, 0), size)))
*sibcall_failure = 1;
+ if (size % UNITS_PER_WORD == 0
+ || MEM_ALIGN (mem) % BITS_PER_WORD == 0)
+ move_block_to_reg (REGNO (reg), mem, nregs, args[i].mode);
+ else
+ {
+ if (nregs > 1)
+ move_block_to_reg (REGNO (reg), mem, nregs - 1,
+ args[i].mode);
+ rtx dest = gen_rtx_REG (word_mode, REGNO (reg) + nregs - 1);
+ unsigned int bitoff = (nregs - 1) * BITS_PER_WORD;
+ unsigned int bitsize = size * BITS_PER_UNIT - bitoff;
+ rtx x = extract_bit_field (mem, bitsize, bitoff, 1, false,
+ dest, word_mode, word_mode);
+ if (BYTES_BIG_ENDIAN)
+ x = expand_shift (LSHIFT_EXPR, word_mode, x,
+ BITS_PER_WORD - bitsize, dest, 1);
+ if (x != dest)
+ emit_move_insn (dest, x);
+ }
+
/* Handle a BLKmode that needs shifting. */
if (nregs == 1 && size < UNITS_PER_WORD
#ifdef BLOCK_REG_PADDING
@@ -1959,22 +1979,18 @@ load_register_parameters (struct arg_dat
#else
&& BYTES_BIG_ENDIAN
#endif
- )
+ )
{
- rtx tem = operand_subword_force (mem, 0, args[i].mode);
- rtx ri = gen_rtx_REG (word_mode, REGNO (reg));
- rtx x = gen_reg_rtx (word_mode);
+ rtx dest = gen_rtx_REG (word_mode, REGNO (reg));
int shift = (UNITS_PER_WORD - size) * BITS_PER_UNIT;
- enum tree_code dir = BYTES_BIG_ENDIAN ? RSHIFT_EXPR
- : LSHIFT_EXPR;
+ enum tree_code dir = (BYTES_BIG_ENDIAN
+ ? RSHIFT_EXPR : LSHIFT_EXPR);
+ rtx x;
- emit_move_insn (x, tem);
- x = expand_shift (dir, word_mode, x, shift, ri, 1);
- if (x != ri)
- emit_move_insn (ri, x);
+ x = expand_shift (dir, word_mode, dest, shift, dest, 1);
+ if (x != dest)
+ emit_move_insn (dest, x);
}
- else
- move_block_to_reg (REGNO (reg), mem, nregs, args[i].mode);
}
/* When a parameter is a block, and perhaps in other cases, it is
++++++ gcc48-pr66306.patch ++++++
this fixes a reload problem with match_dup's on commutative operands.
Bootstrapped and regtested on x86-64, ppc64, and s390x.
Ok?
Bye,
-Andreas-
2015-06-11 Andreas Krebbel <[email protected]>
PR rtl-optimization/66306
* reload.c (find_reloads): Swap the match_dup info for
commutative operands.
2015-06-11 Andreas Krebbel <[email protected]>
PR rtl-optimization/66306
* gcc.target/s390/pr66306.c: New test.
diff --git a/gcc/reload.c b/gcc/reload.c
index 2546c1b..48ad99c 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -3924,6 +3924,12 @@ find_reloads (rtx insn, int replace, int ind_levels, int
live_known,
= *recog_data.operand_loc[commutative + 1];
*recog_data.operand_loc[commutative + 1] = tem;
+ for (i = 0; i < recog_data.n_dups; i++)
+ if (recog_data.dup_num[i] == commutative
+ || recog_data.dup_num[i] == commutative + 1)
+ *recog_data.dup_loc[i]
+ = recog_data.operand[(int) recog_data.dup_num[i]];
+
for (i = 0; i < n_reloads; i++)
{
if (rld[i].opnum == commutative)
diff --git a/gcc/testsuite/gcc.target/s390/pr66306.c
b/gcc/testsuite/gcc.target/s390/pr66306.c
new file mode 100644
index 0000000..73903cb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/pr66306.c
@@ -0,0 +1,26 @@
+/* This caused an ICE on s390x due to a reload bug handling
+ commutative constraints. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+struct line_map
+{
+ unsigned start_location;
+ unsigned ordinary;
+};
+unsigned
+linemap_resolve_location (struct line_map **loc_map);
+
+unsigned
+linemap_position_for_loc_and_offset (unsigned h, unsigned loc)
+{
+ struct line_map *map = 0;
+ linemap_resolve_location (&map);
+
+ if (map->ordinary <= loc + map->start_location + map->ordinary)
+ __builtin_abort ();
+
+ if (h >= loc + map->start_location)
+ __builtin_abort ();
+}
++++++ 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");
++++++ gcc48-s390x-keep-leaf-when-profiled.diff ++++++
For bnc #899871
commit 25e584cc74c33915a4539de63548408b4d6dc775
Author: Andreas Krebbel <[email protected]>
Date: Tue Sep 23 14:13:16 2014 +0000
Keep leaf when profiled.
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 4fcefd7..fb8ff54 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -10031,6 +10031,14 @@ s390_expand_builtin (tree exp, rtx target, rtx
subtarget ATTRIBUTE_UNUSED,
return const0_rtx;
}
+/* We call mcount before the function prologue. So a profiled leaf
+ function should stay a leaf function. */
+
+static bool
+s390_keep_leaf_when_profiled ()
+{
+ return true;
+}
/* Output assembly code for the trampoline template to
stdio stream FILE.
@@ -11754,6 +11762,9 @@ s390_loop_unroll_adjust (unsigned nunroll, struct loop
*loop)
#undef TARGET_LIBCALL_VALUE
#define TARGET_LIBCALL_VALUE s390_libcall_value
+#undef TARGET_KEEP_LEAF_WHEN_PROFILED
+#define TARGET_KEEP_LEAF_WHEN_PROFILED s390_keep_leaf_when_profiled
+
#undef TARGET_FIXED_CONDITION_CODE_REGS
#define TARGET_FIXED_CONDITION_CODE_REGS s390_fixed_condition_code_regs
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 53b2a7a..3a81989 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -4943,6 +4943,10 @@ Define this macro if the code for function profiling
should come before
the function prologue. Normally, the profiling code comes after.
@end defmac
+@deftypefn {Target Hook} bool TARGET_KEEP_LEAF_WHEN_PROFILED (void)
+This target hook returns true if the target wants the leaf flag for the
current function to stay true even if it calls mcount. This might make sense
for targets using the leaf flag only to determine whether a stack frame needs
to be generated or not and for which the call to mcount is generated before the
function prologue.
+@end deftypefn
+
@node Tail Calls
@subsection Permitting tail calls
@cindex tail calls
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index f2e7ab8..998fd32 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -4872,6 +4872,8 @@ Define this macro if the code for function profiling
should come before
the function prologue. Normally, the profiling code comes after.
@end defmac
+@hook TARGET_KEEP_LEAF_WHEN_PROFILED
+
@node Tail Calls
@subsection Permitting tail calls
@cindex tail calls
diff --git a/gcc/final.c b/gcc/final.c
index d25b8e0..f43e866 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -4155,7 +4155,9 @@ leaf_function_p (void)
{
rtx insn;
- if (crtl->profile || profile_arc_flag)
+ /* Some back-ends (e.g. s390) want leaf functions to stay leaf
+ functions even if they call mcount. */
+ if (crtl->profile && !targetm.keep_leaf_when_profiled ())
return 0;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
diff --git a/gcc/target.def b/gcc/target.def
index 831cad8..dece9b3 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -1559,6 +1559,18 @@ The default version of this hook use the target macro\n\
bool, (void),
default_profile_before_prologue)
+/* Return true if a leaf function should stay leaf even with profiling
+ enabled. */
+DEFHOOK
+(keep_leaf_when_profiled,
+ "This target hook returns true if the target wants the leaf flag for\
+ the current function to stay true even if it calls mcount. This might\
+ make sense for targets using the leaf flag only to determine whether a\
+ stack frame needs to be generated or not and for which the call to\
+ mcount is generated before the function prologue.",
+ bool, (void),
+ default_keep_leaf_when_profiled)
+
/* Modify and return the identifier of a DECL's external name,
originally identified by ID, as required by the target,
(eg, append @nn to windows32 stdcall function names).
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 6c12a4a..11043b8 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1420,6 +1420,15 @@ default_get_reg_raw_mode(int regno)
return reg_raw_mode[regno];
}
+/* Return true if a leaf function should stay leaf even with profiling
+ enabled. */
+
+bool
+default_keep_leaf_when_profiled ()
+{
+ return false;
+}
+
/* Return true if the state of option OPTION should be stored in PCH files
and checked by default_pch_valid_p. Store the option's current state
in STATE if so. */
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index d23b352..c1df96a 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -187,6 +187,7 @@ extern int default_jump_align_max_skip (rtx);
extern section * default_function_section(tree decl, enum node_frequency freq,
bool startup, bool exit);
extern enum machine_mode default_get_reg_raw_mode(int);
+extern bool default_keep_leaf_when_profiled ();
extern void *default_get_pch_validity (size_t *);
extern const char *default_pch_valid_p (const void *, size_t);