Hello community,

here is the log from the commit of package gcc49 for openSUSE:Factory checked 
in at 2015-02-04 09:31:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gcc49 (Old)
 and      /work/SRC/openSUSE:Factory/.gcc49.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gcc49"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gcc49/cross-aarch64-gcc49.changes        
2014-06-25 21:20:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gcc49.new/cross-aarch64-gcc49.changes   
2015-02-04 09:31:48.000000000 +0100
@@ -1,0 +2,47 @@
+Mon Dec  8 09:01:59 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r218474).
+  * Includes patches to allow building against ISL 0.14.
+
+-------------------------------------------------------------------
+Mon Nov 24 13:52:44 UTC 2014 - [email protected]
+
+- Fix baselibs.conf.
+- Fix libjava version.
+- Fix missing default attributes on go package filelists.
+
+-------------------------------------------------------------------
+Thu Oct 30 11:41:45 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r216917).
+  * Includes GCC 4.9.2 release with lots of bugfixes.
+
+-------------------------------------------------------------------
+Thu Sep 18 12:37:30 UTC 2014 - [email protected]
+
+- Enable cross compilers for SPARC
+
+-------------------------------------------------------------------
+Fri Aug  1 08:38:23 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r213409).
+  * Includes fix for libgfortran integer overflows, CVE-2014-5044
+    [bnc#888791]
+
+-------------------------------------------------------------------
+Wed Jul 16 10:08:34 UTC 2014 - [email protected]
+
+- Update to GCC 4.9.1 release.
+
+-------------------------------------------------------------------
+Wed Jul  9 20:53:47 UTC 2014 - [email protected]
+
+- Fix spec templates for avr and spu.
+- Add cross-avr-gcc49.
+
+-------------------------------------------------------------------
+Thu Jun 26 07:15:02 UTC 2014 - [email protected]
+
+- Add libffi49-rpmlintrc as source.
+
+-------------------------------------------------------------------
cross-armv6hl-gcc49.changes: same change
cross-armv7hl-gcc49.changes: same change
New Changes file:

--- /dev/null   2014-12-25 22:38:16.200041506 +0100
+++ /work/SRC/openSUSE:Factory/.gcc49.new/cross-avr-gcc49.changes       
2015-02-04 09:31:49.000000000 +0100
@@ -0,0 +1,180 @@
+-------------------------------------------------------------------
+Mon Dec  8 09:01:59 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r218474).
+  * Includes patches to allow building against ISL 0.14.
+
+-------------------------------------------------------------------
+Mon Nov 24 13:52:44 UTC 2014 - [email protected]
+
+- Fix baselibs.conf.
+- Fix libjava version.
+- Fix missing default attributes on go package filelists.
+
+-------------------------------------------------------------------
+Thu Oct 30 11:41:45 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r216917).
+  * Includes GCC 4.9.2 release with lots of bugfixes.
+
+-------------------------------------------------------------------
+Thu Sep 18 12:37:30 UTC 2014 - [email protected]
+
+- Enable cross compilers for SPARC
+
+-------------------------------------------------------------------
+Fri Aug  1 08:38:23 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r213409).
+  * Includes fix for libgfortran integer overflows, CVE-2014-5044
+    [bnc#888791]
+
+-------------------------------------------------------------------
+Wed Jul 16 10:08:34 UTC 2014 - [email protected]
+
+- Update to GCC 4.9.1 release.
+
+-------------------------------------------------------------------
+Wed Jul  9 20:53:47 UTC 2014 - [email protected]
+
+- Fix spec templates for avr and spu.
+- Add cross-avr-gcc49.
+
+-------------------------------------------------------------------
+Thu Jun 26 07:15:02 UTC 2014 - [email protected]
+
+- Add libffi49-rpmlintrc as source.
+
+-------------------------------------------------------------------
+Tue Jun 17 09:14:00 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r211729).
+
+-------------------------------------------------------------------
+Thu Jun  5 11:27:53 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r211260).
+
+-------------------------------------------------------------------
+Thu May 22 08:18:10 UTC 2014 - [email protected]
+
+- Fix libstdc++49-doc build conditional to really only build from
+  libgcj49.spec.
+
+-------------------------------------------------------------------
+Tue May 13 13:45:22 UTC 2014 - [email protected]
+
+- Build libstdc++48-doc package from the libgcj48 build and build
+  the libstdc++ API reference, build-requiring doxygen and graphviz.
+  Add patch gcc48-libstdc++-api-reference.patch to refer to that
+  instead of the online version.  [bnc#871501]
+
+-------------------------------------------------------------------
+Mon Apr 28 08:28:58 UTC 2014 - [email protected]
+
+- Drop cross-ppc-gcc49 packages, they conflict with cross-ppc64-gcc49
+  because they share the same target triplet.  Obsolete older
+  cross-ppc-gcc49 from cross-ppc64-gcc49.
+
+-------------------------------------------------------------------
+Fri Apr 25 09:21:16 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r209782).
+  * includes gcc49-pr60720.patch
+- Add requires to libgo from gcc-go.  [bnc#875128]
+
+-------------------------------------------------------------------
+Tue Apr 22 07:54:46 UTC 2014 - [email protected]
+
+- Update to gcc 4.9.0.
+- Switch to release checking and enable profiledbootstrap where
+  applicable.
+
+-------------------------------------------------------------------
+Sat Apr 19 10:47:34 UTC 2014 - [email protected]
+
+- Add aarch64 to atomic_arch
+
+-------------------------------------------------------------------
+Mon Apr 14 08:29:37 UTC 2014 - [email protected]
+
+- Update to gcc 4.9.0 RC1.
+
+-------------------------------------------------------------------
+Mon Apr  7 09:14:13 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r209179).
+  * obsoletes gcc49-pr59626.patch
+- tls-no-direct.diff, only affect %ix86.
+- Drop old compatibility provide and conflict of/with libgcc%{libgcc_s}
+
+-------------------------------------------------------------------
+Mon Mar 31 10:17:53 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208978).
+- Enable cross compilers (and icecream backends), compared to GCC 4.8
+  packages drop hppa and ia64 from the list of targets.
+- gcc49-pr60720.patch, fix LTO ICEs with mismatched decl references
+  in global initializers.
+
+-------------------------------------------------------------------
+Tue Mar 25 08:49:26 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208807).
+- Use power7 code generation only for ppc64le.
+- gcc49-pr59626.patch, fix indirectly calling _FORTIFY_SOURCE wrappers
+  with LTO.
+
+-------------------------------------------------------------------
+Fri Mar 21 09:35:08 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208745).
+
+-------------------------------------------------------------------
+Thu Mar 13 15:18:38 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208538).
+- Change -Wunprototyped-calls from being enabled by default to be
+  enabled with -Wall to solve GCC testsuite fallout.
+
+-------------------------------------------------------------------
+Fri Feb 28 13:11:38 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208221).
+- Fix typo in libgcj_bc suffix computation. 
+
+-------------------------------------------------------------------
+Wed Feb 26 09:35:45 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208170).
+  * includes now obsolete gcc49-libjava-install.patch
+- Disable building libvtv, it's not useful unless we instrument
+  libstdc++.
+
+-------------------------------------------------------------------
+Wed Feb 19 13:02:03 UTC 2014 - [email protected]
+
+- New package, inherits from gcc48
+  * gcc-dir-version.patch, drop patchlevel from install directory names
+  * gcc-sles-version.patch, do not print (prerelease) with --version
+  but drop patchlevel by one
+  * gcc-add-defaultsspec.diff, add the ability to provide a specs file
+  that is read by default
+  * Wunprototyped-calls.diff, new warning to warn about calls to functions
+  without seeing a real prototype earlier
+  * libjava-no-multilib.diff, do not build multilibs for libjava even on
+  multilib systems (we use baselibs for it)
+  * tls-no-direct.diff, avoid direct %fs references on x86 to not slow down
+  Xen
+  * gcc43-no-unwind-tables.diff, do not produce unwind tables for CRT files
+  * gcc41-ia64-stack-protector.patch, stack protector support for IA64
+  * gcc41-java-slow_pthread_self.patch, force us to assume pthread_self
+  is fast
+  * gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr for ppc
+  * gcc44-textdomain.patch, make translation files version specific and
+  adjust textdomain to find them
+  * gcc44-rename-info-files.patch, fix cross-references in info files when
+  renaming them to be version specific
+- Adds the following patches
+  * gcc49-libjava-install.patch, fix PR60261
+
--- /work/SRC/openSUSE:Factory/gcc49/cross-i386-gcc49.changes   2014-06-25 
21:20:23.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gcc49.new/cross-i386-gcc49.changes      
2015-02-04 09:31:49.000000000 +0100
@@ -1,0 +2,47 @@
+Mon Dec  8 09:01:59 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r218474).
+  * Includes patches to allow building against ISL 0.14.
+
+-------------------------------------------------------------------
+Mon Nov 24 13:52:44 UTC 2014 - [email protected]
+
+- Fix baselibs.conf.
+- Fix libjava version.
+- Fix missing default attributes on go package filelists.
+
+-------------------------------------------------------------------
+Thu Oct 30 11:41:45 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r216917).
+  * Includes GCC 4.9.2 release with lots of bugfixes.
+
+-------------------------------------------------------------------
+Thu Sep 18 12:37:30 UTC 2014 - [email protected]
+
+- Enable cross compilers for SPARC
+
+-------------------------------------------------------------------
+Fri Aug  1 08:38:23 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r213409).
+  * Includes fix for libgfortran integer overflows, CVE-2014-5044
+    [bnc#888791]
+
+-------------------------------------------------------------------
+Wed Jul 16 10:08:34 UTC 2014 - [email protected]
+
+- Update to GCC 4.9.1 release.
+
+-------------------------------------------------------------------
+Wed Jul  9 20:53:47 UTC 2014 - [email protected]
+
+- Fix spec templates for avr and spu.
+- Add cross-avr-gcc49.
+
+-------------------------------------------------------------------
+Thu Jun 26 07:15:02 UTC 2014 - [email protected]
+
+- Add libffi49-rpmlintrc as source.
+
+-------------------------------------------------------------------
cross-ppc64-gcc49.changes: same change
cross-ppc64le-gcc49.changes: same change
cross-s390-gcc49.changes: same change
cross-s390x-gcc49.changes: same change
New Changes file:

--- /dev/null   2014-12-25 22:38:16.200041506 +0100
+++ /work/SRC/openSUSE:Factory/.gcc49.new/cross-sparc-gcc49.changes     
2015-02-04 09:31:49.000000000 +0100
@@ -0,0 +1,180 @@
+-------------------------------------------------------------------
+Mon Dec  8 09:01:59 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r218474).
+  * Includes patches to allow building against ISL 0.14.
+
+-------------------------------------------------------------------
+Mon Nov 24 13:52:44 UTC 2014 - [email protected]
+
+- Fix baselibs.conf.
+- Fix libjava version.
+- Fix missing default attributes on go package filelists.
+
+-------------------------------------------------------------------
+Thu Oct 30 11:41:45 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r216917).
+  * Includes GCC 4.9.2 release with lots of bugfixes.
+
+-------------------------------------------------------------------
+Thu Sep 18 12:37:30 UTC 2014 - [email protected]
+
+- Enable cross compilers for SPARC
+
+-------------------------------------------------------------------
+Fri Aug  1 08:38:23 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r213409).
+  * Includes fix for libgfortran integer overflows, CVE-2014-5044
+    [bnc#888791]
+
+-------------------------------------------------------------------
+Wed Jul 16 10:08:34 UTC 2014 - [email protected]
+
+- Update to GCC 4.9.1 release.
+
+-------------------------------------------------------------------
+Wed Jul  9 20:53:47 UTC 2014 - [email protected]
+
+- Fix spec templates for avr and spu.
+- Add cross-avr-gcc49.
+
+-------------------------------------------------------------------
+Thu Jun 26 07:15:02 UTC 2014 - [email protected]
+
+- Add libffi49-rpmlintrc as source.
+
+-------------------------------------------------------------------
+Tue Jun 17 09:14:00 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r211729).
+
+-------------------------------------------------------------------
+Thu Jun  5 11:27:53 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r211260).
+
+-------------------------------------------------------------------
+Thu May 22 08:18:10 UTC 2014 - [email protected]
+
+- Fix libstdc++49-doc build conditional to really only build from
+  libgcj49.spec.
+
+-------------------------------------------------------------------
+Tue May 13 13:45:22 UTC 2014 - [email protected]
+
+- Build libstdc++48-doc package from the libgcj48 build and build
+  the libstdc++ API reference, build-requiring doxygen and graphviz.
+  Add patch gcc48-libstdc++-api-reference.patch to refer to that
+  instead of the online version.  [bnc#871501]
+
+-------------------------------------------------------------------
+Mon Apr 28 08:28:58 UTC 2014 - [email protected]
+
+- Drop cross-ppc-gcc49 packages, they conflict with cross-ppc64-gcc49
+  because they share the same target triplet.  Obsolete older
+  cross-ppc-gcc49 from cross-ppc64-gcc49.
+
+-------------------------------------------------------------------
+Fri Apr 25 09:21:16 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r209782).
+  * includes gcc49-pr60720.patch
+- Add requires to libgo from gcc-go.  [bnc#875128]
+
+-------------------------------------------------------------------
+Tue Apr 22 07:54:46 UTC 2014 - [email protected]
+
+- Update to gcc 4.9.0.
+- Switch to release checking and enable profiledbootstrap where
+  applicable.
+
+-------------------------------------------------------------------
+Sat Apr 19 10:47:34 UTC 2014 - [email protected]
+
+- Add aarch64 to atomic_arch
+
+-------------------------------------------------------------------
+Mon Apr 14 08:29:37 UTC 2014 - [email protected]
+
+- Update to gcc 4.9.0 RC1.
+
+-------------------------------------------------------------------
+Mon Apr  7 09:14:13 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r209179).
+  * obsoletes gcc49-pr59626.patch
+- tls-no-direct.diff, only affect %ix86.
+- Drop old compatibility provide and conflict of/with libgcc%{libgcc_s}
+
+-------------------------------------------------------------------
+Mon Mar 31 10:17:53 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208978).
+- Enable cross compilers (and icecream backends), compared to GCC 4.8
+  packages drop hppa and ia64 from the list of targets.
+- gcc49-pr60720.patch, fix LTO ICEs with mismatched decl references
+  in global initializers.
+
+-------------------------------------------------------------------
+Tue Mar 25 08:49:26 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208807).
+- Use power7 code generation only for ppc64le.
+- gcc49-pr59626.patch, fix indirectly calling _FORTIFY_SOURCE wrappers
+  with LTO.
+
+-------------------------------------------------------------------
+Fri Mar 21 09:35:08 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208745).
+
+-------------------------------------------------------------------
+Thu Mar 13 15:18:38 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208538).
+- Change -Wunprototyped-calls from being enabled by default to be
+  enabled with -Wall to solve GCC testsuite fallout.
+
+-------------------------------------------------------------------
+Fri Feb 28 13:11:38 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208221).
+- Fix typo in libgcj_bc suffix computation. 
+
+-------------------------------------------------------------------
+Wed Feb 26 09:35:45 UTC 2014 - [email protected]
+
+- Update to SVN trunk head (r208170).
+  * includes now obsolete gcc49-libjava-install.patch
+- Disable building libvtv, it's not useful unless we instrument
+  libstdc++.
+
+-------------------------------------------------------------------
+Wed Feb 19 13:02:03 UTC 2014 - [email protected]
+
+- New package, inherits from gcc48
+  * gcc-dir-version.patch, drop patchlevel from install directory names
+  * gcc-sles-version.patch, do not print (prerelease) with --version
+  but drop patchlevel by one
+  * gcc-add-defaultsspec.diff, add the ability to provide a specs file
+  that is read by default
+  * Wunprototyped-calls.diff, new warning to warn about calls to functions
+  without seeing a real prototype earlier
+  * libjava-no-multilib.diff, do not build multilibs for libjava even on
+  multilib systems (we use baselibs for it)
+  * tls-no-direct.diff, avoid direct %fs references on x86 to not slow down
+  Xen
+  * gcc43-no-unwind-tables.diff, do not produce unwind tables for CRT files
+  * gcc41-ia64-stack-protector.patch, stack protector support for IA64
+  * gcc41-java-slow_pthread_self.patch, force us to assume pthread_self
+  is fast
+  * gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr for ppc
+  * gcc44-textdomain.patch, make translation files version specific and
+  adjust textdomain to find them
+  * gcc44-rename-info-files.patch, fix cross-references in info files when
+  renaming them to be version specific
+- Adds the following patches
+  * gcc49-libjava-install.patch, fix PR60261
+
New Changes file:

cross-sparc64-gcc49.changes: same change
--- /work/SRC/openSUSE:Factory/gcc49/cross-x86_64-gcc49.changes 2014-06-25 
21:20:23.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gcc49.new/cross-x86_64-gcc49.changes    
2015-02-04 09:31:50.000000000 +0100
@@ -1,0 +2,47 @@
+Mon Dec  8 09:01:59 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r218474).
+  * Includes patches to allow building against ISL 0.14.
+
+-------------------------------------------------------------------
+Mon Nov 24 13:52:44 UTC 2014 - [email protected]
+
+- Fix baselibs.conf.
+- Fix libjava version.
+- Fix missing default attributes on go package filelists.
+
+-------------------------------------------------------------------
+Thu Oct 30 11:41:45 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r216917).
+  * Includes GCC 4.9.2 release with lots of bugfixes.
+
+-------------------------------------------------------------------
+Thu Sep 18 12:37:30 UTC 2014 - [email protected]
+
+- Enable cross compilers for SPARC
+
+-------------------------------------------------------------------
+Fri Aug  1 08:38:23 UTC 2014 - [email protected]
+
+- Update to gcc-4_9-branch head (r213409).
+  * Includes fix for libgfortran integer overflows, CVE-2014-5044
+    [bnc#888791]
+
+-------------------------------------------------------------------
+Wed Jul 16 10:08:34 UTC 2014 - [email protected]
+
+- Update to GCC 4.9.1 release.
+
+-------------------------------------------------------------------
+Wed Jul  9 20:53:47 UTC 2014 - [email protected]
+
+- Fix spec templates for avr and spu.
+- Add cross-avr-gcc49.
+
+-------------------------------------------------------------------
+Thu Jun 26 07:15:02 UTC 2014 - [email protected]
+
+- Add libffi49-rpmlintrc as source.
+
+-------------------------------------------------------------------
gcc49-testresults.changes: same change
gcc49.changes: same change
libffi49.changes: same change
libgcj49.changes: same change

Old:
----
  gcc-4.9.0-r211729.tar.bz2

New:
----
  cross-avr-gcc49.changes
  cross-avr-gcc49.spec
  cross-sparc-gcc49.changes
  cross-sparc-gcc49.spec
  cross-sparc64-gcc49.changes
  cross-sparc64-gcc49.spec
  gcc-4.9.2-r218474.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cross-aarch64-gcc49.spec ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -49,9 +49,18 @@
 %if %{cross_arch} == "armv5tel"
 %define binutils_target arm
 %endif
+%if %{cross_arch} == "sparcv9"
+%define binutils_target sparc
+%endif
 %define canonical_target %(echo %{binutils_target} | sed -e 
"s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "avr" || %{binutils_target} == "spu"
+%define binutils_os %{canonical_target}
+%else
 %if %{binutils_target} == "arm"
-%define canonical_target_abi -gnueabi
+%define binutils_os %{canonical_target}-suse-linux-gnueabi
+%else
+%define binutils_os %{canonical_target}-suse-linux
+%endif
 %endif
 
 %if 0%{?gcc_icecream:1}
@@ -95,7 +104,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        4.9.0+r211729
+Version:        4.9.2+r218474
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -110,6 +119,7 @@
 Source5:        README.First-for.SuSE.packagers
 Source6:        baselibs.conf
 Source7:        libgcj49-rpmlintrc
+Source8:        libffi49-rpmlintrc
 
 #testpatch begin
 
@@ -393,8 +403,8 @@
        --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
 \
+%if 0%{?binutils_os:1}
+       --with-build-time-tools=/usr/%{binutils_os}/bin \
 %endif
 %if "%{TARGET_ARCH}" == "spu"
        --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
@@ -515,7 +525,7 @@
 # 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
 \
+install -s -D %{_prefix}/bin/%{binutils_os}-as \
        $RPM_BUILD_ROOT/env/usr/bin/as
 install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/g++

cross-armv6hl-gcc49.spec: same change
cross-armv7hl-gcc49.spec: same change
++++++ cross-avr-gcc49.spec ++++++
#
# spec file for package cross-avr-gcc49
#
# Copyright (c) 2014 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-avr-gcc49
%define cross_arch avr
%define gcc_target_arch avr-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_go 0

%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%if %{cross_arch} == "sparcv9"
%define binutils_target sparc
%endif
%define canonical_target %(echo %{binutils_target} | sed -e 
"s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "avr" || %{binutils_target} == "spu"
%define binutils_os %{canonical_target}
%else
%if %{binutils_target} == "arm"
%define binutils_os %{canonical_target}-suse-linux-gnueabi
%else
%define binutils_os %{canonical_target}-suse-linux
%endif
%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
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
# file conflicts with it and is no longer packaged
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes:      cross-ppc-gcc49 <= 4.9.0+r209354
%endif

%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

Url:            http://gcc.gnu.org/
Version:        4.9.2+r218474
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.9
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1:        change_spec
Source2:        libffi49-rpmlintrc
Source3:        gcc49-rpmlintrc
Source4:        ecj.jar
Source5:        README.First-for.SuSE.packagers
Source6:        baselibs.conf
Source7:        libgcj49-rpmlintrc
Source8:        libffi49-rpmlintrc

#testpatch begin

Patch1:         gcc-dir-version.patch
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
Patch39:        gcc48-libstdc++-api-reference.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

#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
%patch7
%patch8
%patch23
%patch24
%patch30
%patch39
%patch51
%patch55
%patch57
%patch60
%patch61

#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 possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
  if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
    : > gcc/DEV-PHASE
  fi
  ( 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
%if %{build_go}
languages=$languages,go
%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 \
%if 0%{!?build_libvtv:1}
        --disable-libvtv \
%endif
        --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
        --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 \
        --program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
        --with-system-libunwind \
%else
        --without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
        --program-prefix=%{gcc_target_arch}- \
        --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%{?binutils_os:1}
        --with-build-time-tools=/usr/%{binutils_os}/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" || 
"%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
        --with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
        --with-cpu=power7 \
%else
        --with-cpu-64=power4 \
%endif
        --enable-secureplt \
        --with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
        --disable-multilib \
%endif
%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"
        --enable-multilib \
        --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

%package -n cross-%cross_arch-gcc49-icecream-backend
Summary:        Icecream backend for the GNU C Compiler
Group:          Development/Languages/C and C++

%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler


%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
# 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/%{binutils_os}-as \
        $RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/gcc

for back in cc1 cc1plus; do 
        install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
                $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
  install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
                $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi

# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* 
$RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
  ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }'  ;\
done | sort -u `
for lib in $libs; do
  # Check wether the same library also exists in the parent directory,
  # and prefer that on the assumption that it is a more generic one.
  baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
  test -f "$baselib" && lib=$baselib
  install -s -D $lib $RPM_BUILD_ROOT/env$lib
done

cd $RPM_BUILD_ROOT/env
tar 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

%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}

%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs

%changelog
++++++ cross-i386-gcc49.spec ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -49,9 +49,18 @@
 %if %{cross_arch} == "armv5tel"
 %define binutils_target arm
 %endif
+%if %{cross_arch} == "sparcv9"
+%define binutils_target sparc
+%endif
 %define canonical_target %(echo %{binutils_target} | sed -e 
"s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "avr" || %{binutils_target} == "spu"
+%define binutils_os %{canonical_target}
+%else
 %if %{binutils_target} == "arm"
-%define canonical_target_abi -gnueabi
+%define binutils_os %{canonical_target}-suse-linux-gnueabi
+%else
+%define binutils_os %{canonical_target}-suse-linux
+%endif
 %endif
 
 %if 0%{?gcc_icecream:1}
@@ -95,7 +104,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        4.9.0+r211729
+Version:        4.9.2+r218474
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -110,6 +119,7 @@
 Source5:        README.First-for.SuSE.packagers
 Source6:        baselibs.conf
 Source7:        libgcj49-rpmlintrc
+Source8:        libffi49-rpmlintrc
 
 #testpatch begin
 
@@ -393,8 +403,8 @@
        --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
 \
+%if 0%{?binutils_os:1}
+       --with-build-time-tools=/usr/%{binutils_os}/bin \
 %endif
 %if "%{TARGET_ARCH}" == "spu"
        --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
@@ -515,7 +525,7 @@
 # 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
 \
+install -s -D %{_prefix}/bin/%{binutils_os}-as \
        $RPM_BUILD_ROOT/env/usr/bin/as
 install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/g++

cross-ppc64-gcc49.spec: same change
cross-ppc64le-gcc49.spec: same change
cross-s390-gcc49.spec: same change
cross-s390x-gcc49.spec: same change
++++++ cross-sparc-gcc49.spec ++++++
#
# spec file for package cross-sparc-gcc49
#
# Copyright (c) 2014 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-sparc-gcc49
%define cross_arch sparcv9
%define gcc_target_arch sparc-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_go 0

%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%if %{cross_arch} == "sparcv9"
%define binutils_target sparc
%endif
%define canonical_target %(echo %{binutils_target} | sed -e 
"s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "avr" || %{binutils_target} == "spu"
%define binutils_os %{canonical_target}
%else
%if %{binutils_target} == "arm"
%define binutils_os %{canonical_target}-suse-linux-gnueabi
%else
%define binutils_os %{canonical_target}-suse-linux
%endif
%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
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
# file conflicts with it and is no longer packaged
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes:      cross-ppc-gcc49 <= 4.9.0+r209354
%endif

%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

Url:            http://gcc.gnu.org/
Version:        4.9.2+r218474
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.9
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1:        change_spec
Source2:        libffi49-rpmlintrc
Source3:        gcc49-rpmlintrc
Source4:        ecj.jar
Source5:        README.First-for.SuSE.packagers
Source6:        baselibs.conf
Source7:        libgcj49-rpmlintrc
Source8:        libffi49-rpmlintrc

#testpatch begin

Patch1:         gcc-dir-version.patch
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
Patch39:        gcc48-libstdc++-api-reference.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

#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
%patch7
%patch8
%patch23
%patch24
%patch30
%patch39
%patch51
%patch55
%patch57
%patch60
%patch61

#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 possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
  if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
    : > gcc/DEV-PHASE
  fi
  ( 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
%if %{build_go}
languages=$languages,go
%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 \
%if 0%{!?build_libvtv:1}
        --disable-libvtv \
%endif
        --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
        --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 \
        --program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
        --with-system-libunwind \
%else
        --without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
        --program-prefix=%{gcc_target_arch}- \
        --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%{?binutils_os:1}
        --with-build-time-tools=/usr/%{binutils_os}/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" || 
"%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
        --with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
        --with-cpu=power7 \
%else
        --with-cpu-64=power4 \
%endif
        --enable-secureplt \
        --with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
        --disable-multilib \
%endif
%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"
        --enable-multilib \
        --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

%package -n cross-%cross_arch-gcc49-icecream-backend
Summary:        Icecream backend for the GNU C Compiler
Group:          Development/Languages/C and C++

%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler


%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
# 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/%{binutils_os}-as \
        $RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/gcc

for back in cc1 cc1plus; do 
        install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
                $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
  install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
                $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi

# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* 
$RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
  ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }'  ;\
done | sort -u `
for lib in $libs; do
  # Check wether the same library also exists in the parent directory,
  # and prefer that on the assumption that it is a more generic one.
  baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
  test -f "$baselib" && lib=$baselib
  install -s -D $lib $RPM_BUILD_ROOT/env$lib
done

cd $RPM_BUILD_ROOT/env
tar 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

%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}

%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs

%changelog
++++++ cross-sparc64-gcc49.spec ++++++
#
# spec file for package cross-sparc64-gcc49
#
# Copyright (c) 2014 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-sparc64-gcc49
%define cross_arch sparc64
%define gcc_target_arch sparc64-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_go 0

%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%if %{cross_arch} == "sparcv9"
%define binutils_target sparc
%endif
%define canonical_target %(echo %{binutils_target} | sed -e 
"s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "avr" || %{binutils_target} == "spu"
%define binutils_os %{canonical_target}
%else
%if %{binutils_target} == "arm"
%define binutils_os %{canonical_target}-suse-linux-gnueabi
%else
%define binutils_os %{canonical_target}-suse-linux
%endif
%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
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
# file conflicts with it and is no longer packaged
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes:      cross-ppc-gcc49 <= 4.9.0+r209354
%endif

%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

Url:            http://gcc.gnu.org/
Version:        4.9.2+r218474
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.9
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1:        change_spec
Source2:        libffi49-rpmlintrc
Source3:        gcc49-rpmlintrc
Source4:        ecj.jar
Source5:        README.First-for.SuSE.packagers
Source6:        baselibs.conf
Source7:        libgcj49-rpmlintrc
Source8:        libffi49-rpmlintrc

#testpatch begin

Patch1:         gcc-dir-version.patch
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
Patch39:        gcc48-libstdc++-api-reference.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

#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
%patch7
%patch8
%patch23
%patch24
%patch30
%patch39
%patch51
%patch55
%patch57
%patch60
%patch61

#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 possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
  if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
    : > gcc/DEV-PHASE
  fi
  ( 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
%if %{build_go}
languages=$languages,go
%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 \
%if 0%{!?build_libvtv:1}
        --disable-libvtv \
%endif
        --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
        --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 \
        --program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
        --with-system-libunwind \
%else
        --without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
        --program-prefix=%{gcc_target_arch}- \
        --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%{?binutils_os:1}
        --with-build-time-tools=/usr/%{binutils_os}/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" || 
"%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
        --with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
        --with-cpu=power7 \
%else
        --with-cpu-64=power4 \
%endif
        --enable-secureplt \
        --with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
        --disable-multilib \
%endif
%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"
        --enable-multilib \
        --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

%package -n cross-%cross_arch-gcc49-icecream-backend
Summary:        Icecream backend for the GNU C Compiler
Group:          Development/Languages/C and C++

%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler


%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
# 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/%{binutils_os}-as \
        $RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/gcc

for back in cc1 cc1plus; do 
        install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
                $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
  install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
                $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi

# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* 
$RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
  ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }'  ;\
done | sort -u `
for lib in $libs; do
  # Check wether the same library also exists in the parent directory,
  # and prefer that on the assumption that it is a more generic one.
  baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
  test -f "$baselib" && lib=$baselib
  install -s -D $lib $RPM_BUILD_ROOT/env$lib
done

cd $RPM_BUILD_ROOT/env
tar 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

%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}

%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs

%changelog
++++++ cross-x86_64-gcc49.spec ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -49,9 +49,18 @@
 %if %{cross_arch} == "armv5tel"
 %define binutils_target arm
 %endif
+%if %{cross_arch} == "sparcv9"
+%define binutils_target sparc
+%endif
 %define canonical_target %(echo %{binutils_target} | sed -e 
"s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "avr" || %{binutils_target} == "spu"
+%define binutils_os %{canonical_target}
+%else
 %if %{binutils_target} == "arm"
-%define canonical_target_abi -gnueabi
+%define binutils_os %{canonical_target}-suse-linux-gnueabi
+%else
+%define binutils_os %{canonical_target}-suse-linux
+%endif
 %endif
 
 %if 0%{?gcc_icecream:1}
@@ -95,7 +104,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        4.9.0+r211729
+Version:        4.9.2+r218474
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -110,6 +119,7 @@
 Source5:        README.First-for.SuSE.packagers
 Source6:        baselibs.conf
 Source7:        libgcj49-rpmlintrc
+Source8:        libffi49-rpmlintrc
 
 #testpatch begin
 
@@ -393,8 +403,8 @@
        --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
 \
+%if 0%{?binutils_os:1}
+       --with-build-time-tools=/usr/%{binutils_os}/bin \
 %endif
 %if "%{TARGET_ARCH}" == "spu"
        --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
@@ -515,7 +525,7 @@
 # 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
 \
+install -s -D %{_prefix}/bin/%{binutils_os}-as \
        $RPM_BUILD_ROOT/env/usr/bin/as
 install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/g++

++++++ gcc49-testresults.spec ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -48,7 +48,7 @@
 %define quadmath_arch %ix86 x86_64 ia64
 %define tsan_arch x86_64
 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm
-%define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
+%define itm_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc
 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x 
%sparc m68k
 %define lsan_arch x86_64
 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm
@@ -241,7 +241,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        4.9.0+r211729
+Version:        4.9.2+r218474
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -290,6 +290,7 @@
 Source5:        README.First-for.SuSE.packagers
 Source6:        baselibs.conf
 Source7:        libgcj49-rpmlintrc
+Source8:        libffi49-rpmlintrc
 
 #testpatch begin
 
@@ -624,8 +625,8 @@
        --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
 \
+%if 0%{?binutils_os:1}
+       --with-build-time-tools=/usr/%{binutils_os}/bin \
 %endif
 %if "%{TARGET_ARCH}" == "spu"
        --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \

++++++ gcc49.spec ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -30,7 +30,7 @@
 %define quadmath_arch %ix86 x86_64 ia64
 %define tsan_arch x86_64
 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm
-%define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
+%define itm_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc
 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x 
%sparc m68k
 %define lsan_arch x86_64
 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm
@@ -223,7 +223,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        4.9.0+r211729
+Version:        4.9.2+r218474
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -272,6 +272,7 @@
 Source5:        README.First-for.SuSE.packagers
 Source6:        baselibs.conf
 Source7:        libgcj49-rpmlintrc
+Source8:        libffi49-rpmlintrc
 
 #testpatch begin
 
@@ -1940,8 +1941,8 @@
        --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
 \
+%if 0%{?binutils_os:1}
+       --with-build-time-tools=/usr/%{binutils_os}/bin \
 %endif
 %if "%{TARGET_ARCH}" == "spu"
        --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
@@ -2626,6 +2627,9 @@
 %ifarch %cilkrts_arch
 %{libsubdir}/include/cilk
 %endif
+%ifarch %asan_arch
+%{libsubdir}/include/sanitizer
+%endif
 %versmainlib *crt*.o
 %versmainlib libgcc*.a
 %versmainlib libgcov.a
@@ -3251,6 +3255,7 @@
 
 %if %{build_go}
 %files go
+%defattr(-,root,root)
 %{_prefix}/bin/gccgo%{binsuffix}
 %{libsubdir}/go1
 %versmainlib libgo.a
@@ -3263,6 +3268,7 @@
 
 %if %{separate_biarch}
 %files go%{separate_biarch_suffix}
+%defattr(-,root,root)
 %versbiarchlib libgo.a
 %versbiarchlib libgo.so
 %versbiarchlib libgobegin.a

++++++ libffi49.spec ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -47,7 +47,7 @@
 %define quadmath_arch %ix86 x86_64 ia64
 %define tsan_arch x86_64
 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm
-%define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
+%define itm_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc
 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x 
%sparc m68k
 %define lsan_arch x86_64
 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm
@@ -240,7 +240,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        4.9.0+r211729
+Version:        4.9.2+r218474
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -289,6 +289,7 @@
 Source5:        README.First-for.SuSE.packagers
 Source6:        baselibs.conf
 Source7:        libgcj49-rpmlintrc
+Source8:        libffi49-rpmlintrc
 
 #testpatch begin
 
@@ -789,8 +790,8 @@
        --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
 \
+%if 0%{?binutils_os:1}
+       --with-build-time-tools=/usr/%{binutils_os}/bin \
 %endif
 %if "%{TARGET_ARCH}" == "spu"
        --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
@@ -1124,6 +1125,7 @@
 
 %if %{build_go}
 %files go
+%defattr(-,root,root)
 %{_prefix}/bin/gccgo%{binsuffix}
 %{libsubdir}/go1
 %versmainlib libgo.a
@@ -1136,6 +1138,7 @@
 
 %if %{separate_biarch}
 %files go%{separate_biarch_suffix}
+%defattr(-,root,root)
 %versbiarchlib libgo.a
 %versbiarchlib libgo.so
 %versbiarchlib libgobegin.a

++++++ libgcj49.spec ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -47,7 +47,7 @@
 %define quadmath_arch %ix86 x86_64 ia64
 %define tsan_arch x86_64
 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm
-%define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
+%define itm_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc
 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x 
%sparc m68k
 %define lsan_arch x86_64
 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm
@@ -240,7 +240,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        4.9.0+r211729
+Version:        4.9.2+r218474
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -289,6 +289,7 @@
 Source5:        README.First-for.SuSE.packagers
 Source6:        baselibs.conf
 Source7:        libgcj49-rpmlintrc
+Source8:        libffi49-rpmlintrc
 
 #testpatch begin
 
@@ -879,8 +880,8 @@
        --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
 \
+%if 0%{?binutils_os:1}
+       --with-build-time-tools=/usr/%{binutils_os}/bin \
 %endif
 %if "%{TARGET_ARCH}" == "spu"
        --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
@@ -1490,6 +1491,7 @@
 
 %if %{build_go}
 %files go
+%defattr(-,root,root)
 %{_prefix}/bin/gccgo%{binsuffix}
 %{libsubdir}/go1
 %versmainlib libgo.a
@@ -1502,6 +1504,7 @@
 
 %if %{separate_biarch}
 %files go%{separate_biarch_suffix}
+%defattr(-,root,root)
 %versbiarchlib libgo.a
 %versbiarchlib libgo.so
 %versbiarchlib libgobegin.a

++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -1,9 +1,9 @@
 targettype x86 package libgcc_s1
 targettype x86 package libstdc++6
-libgcj48
-  requires "libgcj48"
-libgcj48-devel
-gcc48-gij
-  requires "libgcj48-<targettype>"
-  +/usr/bin/gij-4.8 -> /usr/bin/gij<extension>-4.8
-  +/usr/bin/grmiregistry-4.8 -> /usr/bin/grmiregistry<extension>-4.8
+libgcj49
+  requires "libgcj49"
+libgcj49-devel
+gcc49-gij
+  requires "libgcj49-<targettype>"
+  +/usr/bin/gij-4.9 -> /usr/bin/gij<extension>-4.9
+  +/usr/bin/grmiregistry-4.9 -> /usr/bin/grmiregistry<extension>-4.9

++++++ change_spec ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -133,10 +133,13 @@
 add_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux %define 
gcc_icecream 1
 add_cross cross-armv6hl-gcc$base_ver armv6hl armv6hl-suse-linux-gnueabi 
%define gcc_icecream 1
 add_cross cross-armv7hl-gcc$base_ver armv7hl armv7hl-suse-linux-gnueabi 
%define gcc_icecream 1
+add_cross cross-avr-gcc$base_ver avr avr-suse-linux %define gcc_icecream 1
 add_cross cross-i386-gcc$base_ver i386 i586-suse-linux %define gcc_icecream 1
 add_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux %define 
gcc_icecream 1
 add_cross cross-s390-gcc$base_ver s390 s390-suse-linux %define gcc_icecream 1
 add_cross cross-s390x-gcc$base_ver s390x s390x-suse-linux %define gcc_icecream 
1
+add_cross cross-sparc-gcc$base_ver sparcv9 sparc-suse-linux %define 
gcc_icecream 1
+add_cross cross-sparc64-gcc$base_ver sparc64 sparc64-suse-linux %define 
gcc_icecream 1
 # No cross-ppc because it shares the target triplet with cross-ppc64
 #add_cross cross-ppc-gcc$base_ver ppc powerpc64-suse-linux %define 
gcc_icecream 1
 add_cross cross-ppc64-gcc$base_ver ppc64 powerpc64-suse-linux %define 
gcc_icecream 1

++++++ cross.spec.in ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:57.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:57.000000000 +0100
@@ -28,9 +28,18 @@
 %if %{cross_arch} == "armv5tel"
 %define binutils_target arm
 %endif
+%if %{cross_arch} == "sparcv9"
+%define binutils_target sparc
+%endif
 %define canonical_target %(echo %{binutils_target} | sed -e 
"s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "avr" || %{binutils_target} == "spu"
+%define binutils_os %{canonical_target}
+%else
 %if %{binutils_target} == "arm"
-%define canonical_target_abi -gnueabi
+%define binutils_os %{canonical_target}-suse-linux-gnueabi
+%else
+%define binutils_os %{canonical_target}-suse-linux
+%endif
 %endif
 
 %if 0%{?gcc_icecream:1}
@@ -64,7 +73,7 @@
 %if 0%{!?gcc_icecream:1}
 BuildRequires: cross-%cross_arch-glibc-devel
 %endif
-ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
+ExclusiveArch:  ppc64 x86_64 ia64 s390x aarch64
 %define _binary_payload w.ufdio
 # Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
 # file conflicts with it and is no longer packaged
@@ -121,7 +130,7 @@
 # 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
 \
+install -s -D %{_prefix}/bin/%{binutils_os}-as \
        $RPM_BUILD_ROOT/env/usr/bin/as
 install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
        $RPM_BUILD_ROOT/env/usr/bin/g++


++++++ gcc-4.9.0-r211729.tar.bz2 -> gcc-4.9.2-r218474.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/gcc49/gcc-4.9.0-r211729.tar.bz2 
/work/SRC/openSUSE:Factory/.gcc49.new/gcc-4.9.2-r218474.tar.bz2 differ: char 
11, line 1

++++++ gcc-dir-version.patch ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:58.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:58.000000000 +0100
@@ -119,7 +119,7 @@
      set text [eval exec "$GCJ_UNDER_TEST -B$specdir -v 2>@ stdout"]
      regexp " version \[^\n\r\]*" $text version
 -    set libjava_version [lindex $version 1]
-+    set libjava_version 4.8
++    set libjava_version 4.9
  
      verbose "version: $libjava_version"
  

++++++ gcc.spec.in ++++++
--- /var/tmp/diff_new_pack.uJOhHg/_old  2015-02-04 09:31:58.000000000 +0100
+++ /var/tmp/diff_new_pack.uJOhHg/_new  2015-02-04 09:31:58.000000000 +0100
@@ -32,7 +32,7 @@
 %define quadmath_arch %ix86 x86_64 ia64
 %define tsan_arch x86_64
 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm
-%define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
+%define itm_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc
 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x 
%sparc m68k
 %define lsan_arch x86_64
 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm
@@ -228,7 +228,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 URL:          http://gcc.gnu.org/
-Version: 4.9.0+r211729
+Version: 4.9.2+r218474
 Release:      1
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -278,6 +278,7 @@
 Source5:       README.First-for.SuSE.packagers
 Source6:       baselibs.conf
 Source7:       libgcj49-rpmlintrc
+Source8:       libffi49-rpmlintrc
 
 #testpatch begin
 
@@ -1316,8 +1317,8 @@
        --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
 \
+%if 0%{?binutils_os:1}
+       --with-build-time-tools=/usr/%{binutils_os}/bin \
 %endif
 %if "%{TARGET_ARCH}" == "spu"
        --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
@@ -2019,6 +2020,9 @@
 %ifarch %cilkrts_arch
 %{libsubdir}/include/cilk
 %endif
+%ifarch %asan_arch
+%{libsubdir}/include/sanitizer
+%endif
 %versmainlib *crt*.o
 %versmainlib libgcc*.a
 %versmainlib libgcov.a
@@ -2659,6 +2663,7 @@
 
 %if %{build_go}
 %files go
+%defattr(-,root,root)
 %{_prefix}/bin/gccgo%{binsuffix}
 %{libsubdir}/go1
 %versmainlib libgo.a
@@ -2671,6 +2676,7 @@
 
 %if %{separate_biarch}
 %files go%{separate_biarch_suffix}
+%defattr(-,root,root)
 %versbiarchlib libgo.a
 %versbiarchlib libgo.so
 %versbiarchlib libgobegin.a

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to