Hello community,
here is the log from the commit of package gcc48 for openSUSE:Factory checked in at 2013-11-20 10:25:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2013-10-04 07:21:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gcc48.new/cross-aarch64-gcc48-icecream-backend.changes 2013-11-20 10:25:29.000000000 +0100
@@ -1,0 +2,48 @@
+Sun Nov 17 13:40:11 UTC 2013 - schwab@suse.de
+
+- pr58369.patch: Add backport of PR58369
+
+-------------------------------------------------------------------
+Wed Nov 13 13:06:30 UTC 2013 - rguenther@suse.com
+
+- Disable new cross-compilers and use the icecream fallback again
+ for now.
+
+-------------------------------------------------------------------
+Mon Nov 4 13:39:45 UTC 2013 - rguenther@suse.com
+
+- Change s390 and s390x to use -march=z196 -mtune=zEC12 by default.
+ [fate#315297]
+
+-------------------------------------------------------------------
+Mon Oct 28 15:38:02 UTC 2013 - schwab@suse.de
+
+- m68k-notice-update-cc.patch: handle register conflict with PRE_DEC
+
+-------------------------------------------------------------------
+Wed Oct 23 12:09:09 UTC 2013 - rguenther@suse.com
+
+- Restructure cross compiler spec files. Build cross compilers
+ and icecream backends from a single spec, when targeting
+ *-suse-linux-gnu then use an available target glibc for building.
+
+-------------------------------------------------------------------
+Wed Oct 16 09:48:57 UTC 2013 - rguenther@suse.com
+
+- Update to GCC 4.8.2 release. [fate#315333, fate#315288]
+- Change package version scheme to use the SVN revision number
+ instead of a date.
+
+-------------------------------------------------------------------
+Wed Oct 16 07:52:54 UTC 2013 - rguenther@suse.com
+
+- Change ppc and ppc64 compilers to default to code generation for
+ power7 CPUs. [fate#315448]
+
+-------------------------------------------------------------------
+Wed Oct 9 08:51:04 UTC 2013 - schwab@suse.de
+
+- Add support for m68k: set libgcc_s to 2, enable libatomic and disable
+ multilibs
+
+-------------------------------------------------------------------
cross-armv6hl-gcc48-icecream-backend.changes: same change
New Changes file:
--- /dev/null 2013-10-11 12:16:15.204037506 +0200
+++ /work/SRC/openSUSE:Factory/.gcc48.new/cross-armv7hl-gcc-icecream-backend.changes 2013-11-20 10:25:29.000000000 +0100
@@ -0,0 +1,291 @@
+-------------------------------------------------------------------
+Sun Nov 17 13:40:11 UTC 2013 - schwab@suse.de
+
+- pr58369.patch: Add backport of PR58369
+
+-------------------------------------------------------------------
+Wed Nov 13 13:06:30 UTC 2013 - rguenther@suse.com
+
+- Disable new cross-compilers and use the icecream fallback again
+ for now.
+
+-------------------------------------------------------------------
+Mon Nov 4 13:39:45 UTC 2013 - rguenther@suse.com
+
+- Change s390 and s390x to use -march=z196 -mtune=zEC12 by default.
+ [fate#315297]
+
+-------------------------------------------------------------------
+Mon Oct 28 15:38:02 UTC 2013 - schwab@suse.de
+
+- m68k-notice-update-cc.patch: handle register conflict with PRE_DEC
+
+-------------------------------------------------------------------
+Wed Oct 23 12:09:09 UTC 2013 - rguenther@suse.com
+
+- Restructure cross compiler spec files. Build cross compilers
+ and icecream backends from a single spec, when targeting
+ *-suse-linux-gnu then use an available target glibc for building.
+
+-------------------------------------------------------------------
+Wed Oct 16 09:48:57 UTC 2013 - rguenther@suse.com
+
+- Update to GCC 4.8.2 release. [fate#315333, fate#315288]
+- Change package version scheme to use the SVN revision number
+ instead of a date.
+
+-------------------------------------------------------------------
+Wed Oct 16 07:52:54 UTC 2013 - rguenther@suse.com
+
+- Change ppc and ppc64 compilers to default to code generation for
+ power7 CPUs. [fate#315448]
+
+-------------------------------------------------------------------
+Wed Oct 9 08:51:04 UTC 2013 - schwab@suse.de
+
+- Add support for m68k: set libgcc_s to 2, enable libatomic and disable
+ multilibs
+
+-------------------------------------------------------------------
+Wed Oct 2 10:01:56 UTC 2013 - idonmez@suse.com
+
+- Transactional memory on s390{x} is now supported with gcc 4.8,
+ hence put s390{x} in itm_arch and fix filelist for those arches.
+
+-------------------------------------------------------------------
+Wed Oct 2 07:50:37 UTC 2013 - rguenther@suse.com
+
+- Avoid /bin/sh pre-requirement in shared library packages by
+ using %post[un] -p. [bnc#843331]
+
+-------------------------------------------------------------------
+Thu Sep 12 08:47:57 UTC 2013 - adrian@suse.de
+
+- openSUSE:Factroy:ARM switched to armv6 in favor of armv5
+ * enable cross armv6hl compiler
+ * disable cross armv5tel compiler
+
+-------------------------------------------------------------------
+Mon Sep 9 11:56:02 UTC 2013 - rguenther@suse.com
+
+- Update to gcc-4_8-branch head (r202388).
+- Backports regression fixes for all architectures.
+ * includes changes in aarch64-pthread-option.patch
+
+-------------------------------------------------------------------
+Wed Sep 4 07:41:45 UTC 2013 - rguenther@suse.com
+
+- Fix requires of gcc-32bit/gcc-64bit to include itm/atomic/asan/tsan
+ libraries. [bnc#838229]
+
+-------------------------------------------------------------------
+Tue Aug 6 12:38:57 UTC 2013 - matz@suse.com
+
+- Update to current 4.8 branch (r201525)
+- Backports of bugfixes for i686, aarch64 and s390.
+- Addition of support of transactional memory for s390.
+
+-------------------------------------------------------------------
+Thu Jul 11 14:48:22 UTC 2013 - matz@suse.com
+
+- Update to current 4.8 branch (r200903)
+ lot of back ports of bug fixes.
+
+-------------------------------------------------------------------
+Thu Jul 11 09:43:56 UTC 2013 - schwab@suse.de
+
+- Add aarch64-pthread-option.patch;
+ Define _REENTRANT with -pthread on aarch64.
+
+-------------------------------------------------------------------
+Mon Jul 8 07:28:27 UTC 2013 - jengelh@inai.de
+
+- Deal with lib{asan,atomic,itm} that are generated on sparcv9/64
+ too.
+
+-------------------------------------------------------------------
+Sat Jul 6 13:11:59 UTC 2013 - coolo@suse.com
+
+- build against gcc48-ada
+
+-------------------------------------------------------------------
+Wed Jul 3 16:48:08 UTC 2013 - dmueller@suse.com
+
+- fix typo in last change
+
+-------------------------------------------------------------------
+Sat Jun 29 10:19:51 UTC 2013 - dmueller@suse.com
+
+- add armv6hl support (Tune for arm1176jzfs)
+- Update armv7hl tuning target to Cortex A15
+- Remove temporary armv7l target
+
+-------------------------------------------------------------------
+Tue Jun 4 10:39:09 UTC 2013 - rguenther@suse.com
+
+- Update to GCC 4.8.1 release.
+ * Lots of bugfixes.
+- Remove broken aarch64 cross-compiler target.
+
+-------------------------------------------------------------------
+Thu May 23 14:31:30 UTC 2013 - rguenther@suse.com
+
+- Only enable build of icecream backends for x86_64, ppc64, ia64 and s390x.
+- Do not build a ppc64->ppc icecream backend as that does not work.
+
+-------------------------------------------------------------------
+Tue May 21 08:24:48 UTC 2013 - rguenther@suse.com
+
+- Update to GCC 4.8.1 release candidate 1 (r199136).
+
+-------------------------------------------------------------------
+Mon Apr 29 14:28:49 UTC 2013 - rguenther@suse.com
+
+- Update to gcc-4_8-branch head (r198420).
+ * Initial round of bugfixes
+- Enable release checking only.
+
+-------------------------------------------------------------------
+Wed Apr 17 14:25:47 UTC 2013 - schwab@suse.de
+
+- libgcj_bc-install.patch: Fix installation of libgcj_bc
+- Remove markers from generated spec files to avoid leaking them into
+ scripts
+
+-------------------------------------------------------------------
+Tue Apr 16 08:24:19 UTC 2013 - schwab@suse.de
+
+- libjava-aarch64-support.diff: Enable java for aarch64
+
+-------------------------------------------------------------------
+Thu Apr 4 14:10:21 UTC 2013 - rguenther@suse.com
+
+- Split libstdc++6-locale package from gcc48-locale and add proper
+ conflicts.
+
+-------------------------------------------------------------------
+Fri Mar 29 19:01:34 UTC 2013 - schwab@suse.de
+
+- Fix libffi48-devel filelist
+
+-------------------------------------------------------------------
+Thu Mar 28 09:30:45 UTC 2013 - rguenther@suse.com
+
+- Adjust self-conflicts to use otherproviders() on openSUSE 12.1
+ and earlier. [bnc#812079]
+
+-------------------------------------------------------------------
+Fri Mar 22 12:43:14 UTC 2013 - rguenther@suse.com
+
+- Update to GCC 4.8.0 release.
+
+-------------------------------------------------------------------
+Wed Mar 20 11:37:21 UTC 2013 - rguenther@suse.com
+
+- Drop suse-record-gcc-opts.diff.
+
+-------------------------------------------------------------------
+Wed Mar 20 10:28:13 UTC 2013 - rguenther@suse.com
+
+- Adjust gcc48 rpmlintrc to ignore errors about suffixed
+ shared library names.
+- Add rpmlintrc to libffi48 and libgcj48 packages for the same reason.
+
+-------------------------------------------------------------------
+Mon Mar 18 14:00:48 UTC 2013 - rguenther@suse.com
+
+- Update to first GCC 4.8.0 release candidate (r196783).
++++ 94 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:Factory/.gcc48.new/cross-armv7hl-gcc-icecream-backend.changes
--- /work/SRC/openSUSE:Factory/gcc48/cross-hppa-gcc48-icecream-backend.changes 2013-10-04 07:21:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gcc48.new/cross-hppa-gcc48-icecream-backend.changes 2013-11-20 10:25:29.000000000 +0100
@@ -1,0 +2,48 @@
+Sun Nov 17 13:40:11 UTC 2013 - schwab@suse.de
+
+- pr58369.patch: Add backport of PR58369
+
+-------------------------------------------------------------------
+Wed Nov 13 13:06:30 UTC 2013 - rguenther@suse.com
+
+- Disable new cross-compilers and use the icecream fallback again
+ for now.
+
+-------------------------------------------------------------------
+Mon Nov 4 13:39:45 UTC 2013 - rguenther@suse.com
+
+- Change s390 and s390x to use -march=z196 -mtune=zEC12 by default.
+ [fate#315297]
+
+-------------------------------------------------------------------
+Mon Oct 28 15:38:02 UTC 2013 - schwab@suse.de
+
+- m68k-notice-update-cc.patch: handle register conflict with PRE_DEC
+
+-------------------------------------------------------------------
+Wed Oct 23 12:09:09 UTC 2013 - rguenther@suse.com
+
+- Restructure cross compiler spec files. Build cross compilers
+ and icecream backends from a single spec, when targeting
+ *-suse-linux-gnu then use an available target glibc for building.
+
+-------------------------------------------------------------------
+Wed Oct 16 09:48:57 UTC 2013 - rguenther@suse.com
+
+- Update to GCC 4.8.2 release. [fate#315333, fate#315288]
+- Change package version scheme to use the SVN revision number
+ instead of a date.
+
+-------------------------------------------------------------------
+Wed Oct 16 07:52:54 UTC 2013 - rguenther@suse.com
+
+- Change ppc and ppc64 compilers to default to code generation for
+ power7 CPUs. [fate#315448]
+
+-------------------------------------------------------------------
+Wed Oct 9 08:51:04 UTC 2013 - schwab@suse.de
+
+- Add support for m68k: set libgcc_s to 2, enable libatomic and disable
+ multilibs
+
+-------------------------------------------------------------------
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-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:
----
cross-armv7hl-gcc48-icecream-backend.changes
cross-armv7hl-gcc48-icecream-backend.spec
cross-icecream.spec.in
gcc-4.8.1-20130909.tar.bz2
New:
----
cross-armv7hl-gcc-icecream-backend.changes
cross-armv7hl-gcc-icecream-backend.spec
gcc-4.8.2-r203692.tar.bz2
m68k-notice-update-cc.patch
pr58369.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cross-aarch64-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:34.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:34.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-aarch64-gcc48-icecream-backend
+%define cross_arch aarch64
+%define gcc_target_arch aarch64-suse-linux
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch aarch64-suse-linux
-%define gcc_icecream 1
-%define binutils_target aarch64
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-aarch64-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: ppc64 x86_64 ia64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ cross-armv6hl-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:34.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:34.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-armv6hl-gcc48-icecream-backend
+%define cross_arch armv6hl
+%define gcc_target_arch armv6hl-suse-linux-gnueabi
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch armv6hl-suse-linux
-%define gcc_icecream 1
-%define binutils_target armv6hl
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-armv6hl-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: ppc64 x86_64 ia64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
+
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ cross-armv7hl-gcc-icecream-backend.spec ++++++
#
# spec file for package cross-armv7hl-gcc-icecream-backend
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-armv7hl-gcc-icecream-backend
%define cross_arch armv7hl
%define gcc_target_arch armv7hl-suse-linux-gnueabi
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# 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/
#
%define build_cp 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_nof 0
%define build_with_mudflap 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
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.8.2+r203692
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
#testpatch begin
Patch1: gcc-dir-version.patch
Patch2: gcc-sles-version.patch
Patch3: gcc-noalias-warn.diff
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
Patch33: m68k-notice-update-cc.patch
Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for SAP features
Patch130: sap303956-uchar.diff
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch2
%patch3
%patch7
%patch8
%patch23
%patch24
%patch30
%patch31
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch51
%patch55
%patch57
%patch60
%patch61
%patch130
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one
if test `cat gcc/DEV-PHASE` == "prerelease"; then
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
#ENABLE_CHECKING="--enable-checking=yes"
ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
%if !%{build_with_mudflap}
--disable-libmudflap \
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
%if 0%{!?gcc_target_arch:1}
--program-suffix=%{binsuffix} \
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
--with-cpu-32=power7 \
--with-cpu-64=power7 \
--with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%if 0%{!?gcc_icecream:1}
%package -n cross-%cross_arch-gcc48-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc48-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%endif
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# binsuffix is not applied consistently for cross builds, get rid of
# the remains
rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$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
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{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
%if 0%{?gcc_icecream:1}
rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
rm -rf $RPM_BUILD_ROOT/%{_libdir}
%endif
%if 0%{!?gcc_icecream:1}
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
%endif
%if 0%{!?gcc_icecream:1}
%files -n cross-%cross_arch-gcc48-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%endif
%changelog
++++++ cross-hppa-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:34.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:34.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-hppa-gcc48-icecream-backend
+%define cross_arch hppa
+%define gcc_target_arch hppa-suse-linux
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch hppa-suse-linux
-%define gcc_icecream 1
-%define binutils_target hppa
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-hppa-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: ppc64 x86_64 ia64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ cross-i386-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:34.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:34.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-i386-gcc48-icecream-backend
+%define cross_arch i386
+%define gcc_target_arch i586-suse-linux
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch i386-suse-linux
-%define gcc_icecream 1
-%define binutils_target i386
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-i386-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: ppc64 x86_64 ia64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
+
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ cross-ia64-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:34.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:34.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-ia64-gcc48-icecream-backend
+%define cross_arch ia64
+%define gcc_target_arch ia64-suse-linux
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch ia64-suse-linux
-%define gcc_icecream 1
-%define binutils_target ia64
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-ia64-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: ppc64 x86_64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: ppc64 x86_64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ cross-ppc-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-ppc-gcc48-icecream-backend
+%define cross_arch ppc
+%define gcc_target_arch powerpc64-suse-linux
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch ppc-suse-linux
-%define gcc_icecream 1
-%define binutils_target ppc
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-ppc-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: x86_64 ia64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
+
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ cross-ppc64-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-ppc64-gcc48-icecream-backend
+%define cross_arch ppc64
+%define gcc_target_arch powerpc64-suse-linux
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch ppc64-suse-linux
-%define gcc_icecream 1
-%define binutils_target ppc64
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-ppc64-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: x86_64 ia64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
+
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ cross-s390-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-s390-gcc48-icecream-backend
+%define cross_arch s390
+%define gcc_target_arch s390-suse-linux
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch s390-suse-linux
-%define gcc_icecream 1
-%define binutils_target s390
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-s390-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: ppc64 x86_64 ia64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ cross-s390x-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-s390x-gcc48-icecream-backend
+%define cross_arch s390x
+%define gcc_target_arch s390x-suse-linux
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch s390x-suse-linux
-%define gcc_icecream 1
-%define binutils_target s390x
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-s390x-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: ppc64 x86_64 ia64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: ppc64 x86_64 ia64 aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ cross-x86_64-gcc48-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -16,26 +16,38 @@
#
+%define pkgname cross-x86_64-gcc48-icecream-backend
+%define cross_arch x86_64
+%define gcc_target_arch x86_64-suse-linux
+%define gcc_icecream 1
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# 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/
+#
+
%define build_cp 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_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch x86_64-suse-linux
-%define gcc_icecream 1
-%define binutils_target x86_64
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -43,7 +55,11 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-x86_64-gcc48-icecream-backend
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
@@ -66,20 +82,23 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-ExclusiveArch: ppc64 ia64 s390x
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
+%endif
+ExclusiveArch: ppc64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -98,6 +117,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -127,36 +148,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -175,7 +177,7 @@
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -189,6 +191,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -243,7 +247,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -301,12 +305,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -321,7 +319,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -368,36 +366,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -426,7 +427,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -447,55 +450,84 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
-make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ native"
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc48-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
+
+%description -n cross-%cross_arch-gcc48-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
+
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-rm -rf $RPM_BUILD_ROOT
-make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
-make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
-# But the assembler comes from the cross-binutils, and hence is _not_
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
$RPM_BUILD_ROOT/env/usr/bin/gcc
-%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
for back in cc1 cc1plus; do
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+ install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
-if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
- install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+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
-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
-rm -rf $RPM_BUILD_ROOT/inst
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
@@ -505,11 +537,28 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc48-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
%changelog
++++++ gcc48-testresults.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -49,7 +49,7 @@
%define tsan_arch x86_64
%define asan_arch x86_64 %ix86 ppc ppc64 %sparc
%define itm_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc
-%define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc
+%define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc m68k
# We don't want to build java
%ifarch mips
@@ -88,8 +88,12 @@
%ifarch hppa
%define libgcc_s 4
%else
+%ifarch m68k
+%define libgcc_s 2
+%else
%define libgcc_s 1
%endif
+%endif
%define libgcj_sover 14
%define libgcj_bc_sover 1
%define libffi_sover 4
@@ -142,19 +146,21 @@
%endif
Name: gcc48-testresults
+# With generated files in src we could drop the following
BuildRequires: bison
BuildRequires: flex
-BuildRequires: gcc-c++
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
+# until here, but at least renaming and patching info files breaks this
+BuildRequires: gcc-c++
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
@@ -218,11 +224,11 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
%if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
@@ -251,7 +257,7 @@
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -270,6 +276,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -293,36 +301,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -397,7 +386,7 @@
%endif
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -411,6 +400,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -465,7 +456,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -523,12 +514,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -543,7 +528,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -590,36 +575,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -648,7 +636,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -669,16 +659,20 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
%if 0%{?building_libffi:1}
make stage1-bubble $PARALLEL
++++++ gcc48.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -31,7 +31,7 @@
%define tsan_arch x86_64
%define asan_arch x86_64 %ix86 ppc ppc64 %sparc
%define itm_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc
-%define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc
+%define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc m68k
# We don't want to build java
%ifarch mips
@@ -70,8 +70,12 @@
%ifarch hppa
%define libgcc_s 4
%else
+%ifarch m68k
+%define libgcc_s 2
+%else
%define libgcc_s 1
%endif
+%endif
%define libgcj_sover 14
%define libgcj_bc_sover 1
%define libffi_sover 4
@@ -124,19 +128,21 @@
%endif
Name: gcc48
+# With generated files in src we could drop the following
BuildRequires: bison
BuildRequires: flex
-BuildRequires: gcc-c++
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
+# until here, but at least renaming and patching info files breaks this
+BuildRequires: gcc-c++
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
@@ -200,11 +206,11 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
%if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
@@ -233,7 +239,7 @@
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -252,6 +258,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -1377,36 +1385,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -1481,7 +1470,7 @@
%endif
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -1495,6 +1484,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -1549,7 +1540,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -1607,12 +1598,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -1627,7 +1612,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -1674,36 +1659,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -1732,7 +1720,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -1753,16 +1743,20 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
%if 0%{?building_libffi:1}
make stage1-bubble $PARALLEL
@@ -2361,6 +2355,9 @@
%{libsubdir}/include/xsaveoptintrin.h
%{libsubdir}/include/xtestintrin.h
%endif
+%ifarch m68k
+%{libsubdir}/include/math-68881.h
+%endif
%if %{build_with_mudflap}
%{libsubdir}/include/mf-runtime.h
%endif
++++++ libffi48.spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -48,7 +48,7 @@
%define tsan_arch x86_64
%define asan_arch x86_64 %ix86 ppc ppc64 %sparc
%define itm_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc
-%define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc
+%define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc m68k
# We don't want to build java
%ifarch mips
@@ -87,8 +87,12 @@
%ifarch hppa
%define libgcc_s 4
%else
+%ifarch m68k
+%define libgcc_s 2
+%else
%define libgcc_s 1
%endif
+%endif
%define libgcj_sover 14
%define libgcj_bc_sover 1
%define libffi_sover 4
@@ -141,19 +145,21 @@
%endif
Name: libffi48
+# With generated files in src we could drop the following
BuildRequires: bison
BuildRequires: flex
-BuildRequires: gcc-c++
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
+# until here, but at least renaming and patching info files breaks this
+BuildRequires: gcc-c++
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
@@ -217,11 +223,11 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 0
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
%if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
@@ -250,7 +256,7 @@
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -269,6 +275,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -381,36 +389,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -485,7 +474,7 @@
%endif
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -499,6 +488,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -553,7 +544,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -611,12 +602,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -631,7 +616,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -678,36 +663,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%endif
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -736,7 +724,9 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -757,16 +747,20 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
%if 0%{?building_libffi:1}
make stage1-bubble $PARALLEL
libgcj48.spec: same change
++++++ change_spec ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -102,40 +102,45 @@
ln -f gcc$base_ver.changes gcc$base_ver-testresults.changes; )
fi
-# disabled: mips, sparc, alpha
-if test "$do_icecream" = 1 ; then
- for arch in hppa i386 x86_64 s390 s390x ppc ppc64 ia64 aarch64 armv7hl armv6hl; do
- exclarch=`echo $arch | sed -e 's/ppc$/ppc64/'`
- { sed -n -e '1,/COMMON-BEGIN/p' cross-icecream.spec.in
- sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile
- sed -n -e '/COMMON-END/,$p' cross-icecream.spec.in; } |
- sed -e "s#@cross_arch@#$arch#" \
- -e "s#@base_ver@#$base_ver#" \
- -e "s/^\(ExclusiveArch.*\) $exclarch /\1 /" \
- > cross-$arch-gcc$base_ver-icecream-backend.spec
- test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-$arch-gcc$base_ver-icecream-backend.changes
- done
-fi
-export outfile
-if test "$do_cross_shared" = 1 ; then
- # shared cross
- for arch in ; do
- base_ver=$base_ver cross_arch=$arch sh cross.spec.in > cross-$arch-gcc$base_ver.spec
- test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-$arch-gcc$base_ver.changes
- done
-fi
-if test "$do_cross_static" = 1 ; then
- # static crosses
- for arch in ; do
- echo '%define build_static 1' > cross-$arch-gcc$base_ver-static.spec
- base_ver=$base_ver cross_arch=$arch name_suffix="-static" sh cross.spec.in >> cross-$arch-gcc$base_ver-static.spec
- test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-$arch-gcc$base_ver-static.changes
- done
-# # avr is static but wants the non-static versioned name
-# echo '%define build_static 1' > cross-avr-gcc$base_ver.spec
-# base_ver=$base_ver cross_arch=avr sh cross.spec.in >> cross-avr-gcc$base_ver.spec
-# test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-avr-gcc$base_ver.changes
+
+add_cross() {
+ local pkgname="$1"; shift
+ local rpmtarget="$1"; shift
+ local triplet="$1"; shift
+
+ exclarch=`echo $rpmtarget | sed -e 's/ppc$/ppc64/'`
+ echo "%define pkgname $pkgname" > $pkgname.spec
+ echo "%define cross_arch $rpmtarget" >> $pkgname.spec
+ echo "%define gcc_target_arch $triplet" >> $pkgname.spec
+ echo "$@" >> $pkgname.spec
+ { sed -n -e '1,/COMMON-BEGIN/p' cross.spec.in
+ sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile
+ sed -n -e '/COMMON-END/,$p' cross.spec.in; } |
+ sed -e "s#@base_ver@#$base_ver#" \
+ -e "s/^\(ExclusiveArch.*\) $exclarch /\1 /" \
+ >> $pkgname.spec
+ test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes $pkgname.changes
+}
+
+# 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_icecream" = 1 ; then
+add_cross cross-aarch64-gcc$base_ver-icecream-backend aarch64 aarch64-suse-linux %define gcc_icecream 1
+add_cross cross-armv6hl-gcc$base_ver-icecream-backend armv6hl armv6hl-suse-linux-gnueabi %define gcc_icecream 1
+add_cross cross-armv7hl-gcc$base_ve-icecream-backend armv7hl armv7hl-suse-linux-gnueabi %define gcc_icecream 1
+add_cross cross-hppa-gcc$base_ver-icecream-backend hppa hppa-suse-linux %define gcc_icecream 1
+add_cross cross-i386-gcc$base_ver-icecream-backend i386 i586-suse-linux %define gcc_icecream 1
+add_cross cross-x86_64-gcc$base_ver-icecream-backend x86_64 x86_64-suse-linux %define gcc_icecream 1
+add_cross cross-s390-gcc$base_ver-icecream-backend s390 s390-suse-linux %define gcc_icecream 1
+add_cross cross-s390x-gcc$base_ver-icecream-backend s390x s390x-suse-linux %define gcc_icecream 1
+add_cross cross-ppc-gcc$base_ver-icecream-backend ppc powerpc64-suse-linux %define gcc_icecream 1
+add_cross cross-ppc64-gcc$base_ver-icecream-backend ppc64 powerpc64-suse-linux %define gcc_icecream 1
+add_cross cross-ia64-gcc$base_ver-icecream-backend ia64 ia64-suse-linux %define gcc_icecream 1
fi
for f in *.spec; do
++++++ cross.spec.in ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -1,15 +1,3 @@
-#! /bin/sh
-
-#
-# call this via pre_checkin.sh
-#
-# 2005-05-09, jw@suse.de
-
-test -z "$cross_arch" && echo 1>&2 "Error: $0 needs environment variable 'cross_arch'"
-test -z "$outfile" && echo 1>&2 "Error: $0 needs environment variable 'outfile'"
-cross_arch_cpu=`echo $cross_arch | sed -e 's/\([^-]*\)-\?.*/\1/'`
-
-cat << EOF
#
# spec file for package gcc (Version 4.0.1)
#
@@ -20,35 +8,25 @@
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
-# norootforbuild
-
%define build_cp 1
%define build_ada 0
-%define build_java 0
%define build_libjava 0
+%define build_java 0
+
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_nof 0
%define build_with_mudflap 0
-%define gcc_target_arch $cross_arch
-%if "$cross_arch" == "spu"
-%define build_fortran 1
-%endif
-
-%if 0%{?build_static:1}
-%define build_fortran 0
-%endif
-
-%define binutils_target $cross_arch
-%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl"
+%define binutils_target %{cross_arch}
+%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv6l" || %{binutils_target} == "armv6hl"
+%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
-%if %{binutils_target} == "armv5tel"
+%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
@@ -56,7 +34,12 @@
%define canonical_target_abi -gnueabi
%endif
-Name: cross-$cross_arch-gcc$base_ver$name_suffix
+%if 0%{?gcc_icecream:1}
+%define build_sysroot /
+%endif
+
+
+Name: %{pkgname}
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: gcc-c++
BuildRequires: bison
@@ -79,50 +62,114 @@
%ifarch ia64
BuildRequires: libunwind-devel
%endif
-Requires: cross-%{binutils_target}-binutils
-
-%if "$cross_arch" == "spu"
-%define sysroot /usr/spu
-%if 0%{?build_static:1}
-BuildRequires: cross-$cross_arch_cpu-newlib-headers
-%else
-BuildRequires: cross-$cross_arch_cpu-newlib
-%endif
-Requires: cross-$cross_arch_cpu-newlib
+%if 0%{!?gcc_icecream:1}
+BuildRequires: cross-%cross_arch-glibc-devel
%endif
+ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
+%define _binary_payload w.ufdio
-%if "$cross_arch" == "aarch64"
-BuildRequires: cross-$cross_arch-suse-linux-glibc
-Requires: cross-$cross_arch-suse-linux-glibc
-%endif
+# COMMON-BEGIN
+# COMMON-END
+%if 0%{!?gcc_icecream:1}
+make %{?jobs:-j%jobs}
+%else
+make %{?jobs:-j%jobs} all-host
+%endif
-EOF
-sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile | sed -n -e '1,/%description/p'
-cat << EOF
-This compiler supports the C language on $cross_arch microprocessors.
-Also install cross-$cross_arch-binutils and $cross_arch-libc.
+%if 0%{!?gcc_icecream:1}
+%package -n cross-%cross_arch-gcc@base_ver@-icecream-backend
+Summary: Icecream backend for the GNU C Compiler
+Group: Development/Languages/C and C++
-EOF
-sed -n -e '/%description/,$p' $outfile | sed -n -e '/COMMON-BEGIN/,/COMMON-END/p'
+%description -n cross-%cross_arch-gcc@base_ver@-icecream-backend
+This package contains the icecream environment for the GNU C Compiler
+%endif
-cat << EOF
-make %{?jobs:-j%jobs}
+%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
-make install DESTDIR=\$RPM_BUILD_ROOT
-rm -rf \$RPM_BUILD_ROOT%{_prefix}/share
-rm -f \$RPM_BUILD_ROOT%{_prefix}/bin/*-gccbug
-find \$RPM_BUILD_ROOT -name libiberty.a | xargs rm
-%clean
-rm -rf \$RPM_BUILD_ROOT
+# install and fixup host parts
+make DESTDIR=$RPM_BUILD_ROOT install-host
+# binsuffix is not applied consistently for cross builds, get rid of
+# the remains
+rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
+# with the present setup fixincludes are for the build includes which
+# is wrong - get rid of them
+rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
+rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
+# common fixup
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+# remove docs
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+
+# install and fixup target parts
+# ??? don't do this - debugedit is not prepared for this and crashes
+# so expect the sysroot to be populated from natively built binaries
+#%if 0%{?sysroot:1}
+#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
+#%else
+#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
+#%endif
+
+
+# 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/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
+ $RPM_BUILD_ROOT/env/usr/bin/as
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
+ $RPM_BUILD_ROOT/env/usr/bin/g++
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
+ $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
+
+cd $RPM_BUILD_ROOT/env
+tar cvzf ../%{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
+
+%if 0%{?gcc_icecream:1}
+rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
+rm -rf $RPM_BUILD_ROOT/%{_libdir}
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files
+%defattr(-,root,root)
+%{_prefix}/bin
+%dir %{targetlibsubdir}
+%dir %{_libdir}/gcc/%{gcc_target_arch}
+%{targetlibsubdir}
+%else
%files
%defattr(-,root,root)
-%{_prefix}
+/usr/share/icecream-envs
+%endif
+
+%if 0%{!?gcc_icecream:1}
+%files -n cross-%cross_arch-gcc@base_ver@-icecream-backend
+%defattr(-,root,root)
+/usr/share/icecream-envs
+%endif
-EOF
+%changelog -n cross-%{pkgname}-gcc@base_ver@
++++++ gcc.spec.in ++++++
--- /var/tmp/diff_new_pack.E2B8j4/_old 2013-11-20 10:25:35.000000000 +0100
+++ /var/tmp/diff_new_pack.E2B8j4/_new 2013-11-20 10:25:35.000000000 +0100
@@ -33,7 +33,7 @@
%define tsan_arch x86_64
%define asan_arch x86_64 %ix86 ppc ppc64 %sparc
%define itm_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc
-%define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc
+%define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x %sparc m68k
# We don't want to build java
%ifarch mips
@@ -72,8 +72,12 @@
%ifarch hppa
%define libgcc_s 4
%else
+%ifarch m68k
+%define libgcc_s 2
+%else
%define libgcc_s 1
%endif
+%endif
%define libgcj_sover 14
%define libgcj_bc_sover 1
%define libffi_sover 4
@@ -128,19 +132,21 @@
Name: gcc@base_ver@
-BuildRequires: gcc-c++
+# With generated files in src we could drop the following
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
+# until here, but at least renaming and patching info files breaks this
+BuildRequires: gcc-c++
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
@@ -205,11 +211,11 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: http://gcc.gnu.org/
-Version: 4.8.1_20130909
+Version: 4.8.2+r203692
Release: 1
-%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.8
# COMMON-END
@@ -239,7 +245,7 @@
# COMMON-BEGIN
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
@@ -259,6 +265,8 @@
Patch30: gcc43-no-unwind-tables.diff
Patch31: libjava-aarch64-support.diff
Patch32: libgcj_bc-install.patch
+Patch33: m68k-notice-update-cc.patch
+Patch34: pr58369.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -878,36 +886,17 @@
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
-# %TARGET_ARCH is the canonicalized CPU part
-# %CONFIGURE_TARGET is the target triple used for --target=
+# %cross_arch is supposed to be the rpm target variant arch
+# %TARGET_ARCH will be the canonicalized target CPU part
+# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
-%define CONFIGURE_TARGET %{gcc_target_arch}
-%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
-%define CONFIGURE_TARGET powerpc64-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
-%define CONFIGURE_TARGET i586-suse-linux
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv6hl"
-%define CONFIGURE_TARGET armv6hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
-%define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi
-%endif
-%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
-%define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi
-%endif
+%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
-%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
-
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -988,7 +977,7 @@
# COMMON-BEGIN
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
@@ -1002,6 +991,8 @@
%patch30
%patch31
%patch32 -p1
+%patch33 -p1
+%patch34 -p1
%patch51
%patch55
%patch57
@@ -1056,7 +1047,7 @@
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
-%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
@@ -1114,12 +1105,6 @@
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
-# configure tries to parse include/features.h to detect
-# if glibc supports SSP. When cross compiling we would need
-# to install a cross glibc, which we don't, or make the whole
-# thing point to the native glibc, which is in /, hence the
-# --with-build-sysroot=/
-
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
@@ -1134,7 +1119,7 @@
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
-#%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
@@ -1181,36 +1166,39 @@
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
-%if 0%{?gcc_target_arch:1}
-%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
+%if 0%{!?gcc_target_arch:1}
+ --program-suffix=%{binsuffix} \
+%ifarch ia64
+ --with-system-libunwind \
+%else
+ --without-system-libunwind \
%endif
-%if 0%{?canonical_target:1}
- --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
+%if 0%{?gcc_target_arch:1}
+ --target=%{gcc_target_arch} \
+ --disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
+%else
+ --with-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
+%if 0%{?build_sysroot:1}
+ --with-build-sysroot=%{build_sysroot} \
+%else
+%if 0%{?sysroot:1}
+ --with-build-sysroot=%{sysroot} \
+%else
+ --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
+%endif
%endif
-%if 0%{?build_static:1}
- --disable-shared \
+%if 0%{?canonical_target:1}
+ --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
- --disable-nls \
- --target=%{CONFIGURE_TARGET} \
-%else
- --program-suffix=%{binsuffix} \
- --enable-linux-futex \
-%ifarch ia64
- --with-system-libunwind \
-%else
- --without-system-libunwind \
-%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
@@ -1237,9 +1225,11 @@
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64"
%if "%{TARGET_ARCH}" == "powerpc"
- --with-cpu=default32 \
+ --with-cpu=default32 \
%endif
- --with-cpu-64=power4 \
+ --with-cpu-32=power7 \
+ --with-cpu-64=power7 \
+ --with-tune=power7 \
--enable-secureplt \
--with-long-double-128 \
%endif
@@ -1260,16 +1250,20 @@
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
- --with-tune=z196 --with-arch=z10 \
+ --with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
- --build=%{GCCDIST}
+%if "%{TARGET_ARCH}" == "m68k"
+ --disable-multilib \
+%endif
+ --build=%{GCCDIST} \
+ --host=%{GCCDIST}
# COMMON-END
@@ -1884,6 +1878,9 @@
%{libsubdir}/include/xsaveoptintrin.h
%{libsubdir}/include/xtestintrin.h
%endif
+%ifarch m68k
+%{libsubdir}/include/math-68881.h
+%endif
%if %{build_with_mudflap}
%{libsubdir}/include/mf-runtime.h
%endif
++++++ m68k-notice-update-cc.patch ++++++
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 5e3236f..7035504 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -4209,6 +4209,13 @@ notice_update_cc (rtx exp, rtx insn)
&& cc_status.value2
&& reg_overlap_mentioned_p (cc_status.value1, cc_status.value2))
cc_status.value2 = 0;
+ /* Check for PRE_DEC in dest modifying a register used in src. */
+ if (cc_status.value1 && GET_CODE (cc_status.value1) == MEM
+ && GET_CODE (XEXP (cc_status.value1, 0)) == PRE_DEC
+ && cc_status.value2
+ && reg_overlap_mentioned_p (XEXP (XEXP (cc_status.value1, 0), 0),
+ cc_status.value2))
+ cc_status.value2 = 0;
if (((cc_status.value1 && FP_REG_P (cc_status.value1))
|| (cc_status.value2 && FP_REG_P (cc_status.value2))))
cc_status.flags = CC_IN_68881;
++++++ pr58369.patch ++++++
2013-10-18 Mikael Pettersson