add packaging
authorAnas Nashif <anas.nashif@intel.com>
Sat, 17 Nov 2012 19:44:37 +0000 (11:44 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Sat, 17 Nov 2012 19:44:37 +0000 (11:44 -0800)
38 files changed:
packaging/Wunprototyped-calls.diff [deleted file]
packaging/change_spec [new file with mode: 0644]
packaging/check-build.sh [new file with mode: 0644]
packaging/cross-armv5el-gcc47-icecream-backend.spec [new file with mode: 0644]
packaging/cross-armv7el-gcc47-icecream-backend.spec [new file with mode: 0644]
packaging/cross-armv7hl-gcc47-icecream-backend.spec [new file with mode: 0644]
packaging/cross-i386-gcc47-icecream-backend.spec [new file with mode: 0644]
packaging/cross-icecream.spec.in [new file with mode: 0644]
packaging/cross-x86_64-gcc47-icecream-backend.spec [new file with mode: 0644]
packaging/cross.spec.in [new file with mode: 0644]
packaging/ecj.jar [new file with mode: 0644]
packaging/gcc-add-defaultsspec.diff [deleted file]
packaging/gcc-arm-linker.patch [deleted file]
packaging/gcc-dir-version.patch [deleted file]
packaging/gcc-noalias-warn.diff [deleted file]
packaging/gcc-sles-version.patch [deleted file]
packaging/gcc.spec.in [new file with mode: 0644]
packaging/gcc4-ppc64-m32-m64-multilib-only.patch [deleted file]
packaging/gcc41-ia64-stack-protector.patch [deleted file]
packaging/gcc41-java-slow_pthread_self.patch [deleted file]
packaging/gcc41-ppc32-retaddr.patch [deleted file]
packaging/gcc43-no-unwind-tables.diff [deleted file]
packaging/gcc44-rename-info-files.patch [deleted file]
packaging/gcc44-textdomain.patch [deleted file]
packaging/gcc47-rpmlintrc [new file with mode: 0644]
packaging/gcc47-testresults.spec [new file with mode: 0644]
packaging/gcc47.spec [new file with mode: 0644]
packaging/libffi47.spec [new file with mode: 0644]
packaging/libgcj47-rpmlintrc [new file with mode: 0644]
packaging/libgcj47.spec [new file with mode: 0644]
packaging/libjava-no-multilib.diff [deleted file]
packaging/pr33763.diff [deleted file]
packaging/pr49484.diff [deleted file]
packaging/pre_checkin.sh [new file with mode: 0644]
packaging/program-transform-name.diff [deleted file]
packaging/sap303956-uchar.diff [deleted file]
packaging/suse-record-gcc-opts.diff [deleted file]
packaging/tls-no-direct.diff [deleted file]

diff --git a/packaging/Wunprototyped-calls.diff b/packaging/Wunprototyped-calls.diff
deleted file mode 100644 (file)
index b389f18..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-Index: gcc/c-family/c.opt
-===================================================================
-*** gcc/c-family/c.opt.orig    2012-02-07 11:33:52.000000000 +0100
---- gcc/c-family/c.opt 2012-02-08 12:54:08.000000000 +0100
-*************** Wunused-local-typedefs
-*** 665,670 ****
---- 665,674 ----
-  C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning
-  Warn when typedefs locally defined in a function are not used
-  
-+ Wunprototyped-calls
-+ C Var(warn_unprototyped_calls) Warning
-+ Warn about calls to unprototyped functions with at least one argument
-+ 
-  Wunused-macros
-  C ObjC C++ ObjC++ Warning
-  Warn about macros defined in the main file that are not used
-Index: gcc/testsuite/gcc.dg/cleanup-1.c
-===================================================================
-*** gcc/testsuite/gcc.dg/cleanup-1.c.orig      2010-02-23 12:43:21.000000000 +0100
---- gcc/testsuite/gcc.dg/cleanup-1.c   2012-02-08 12:54:08.000000000 +0100
-***************
-*** 6,12 ****
-  #define C(x) __attribute__((cleanup(x)))
-  
-  static int f1(void *x U) { return 0; }
-! static void f2() { }
-  static void f3(void) { } /* { dg-message "note: declared here" } */
-  static void f4(void *x U) { }
-  static void f5(int *x U) { }
---- 6,12 ----
-  #define C(x) __attribute__((cleanup(x)))
-  
-  static int f1(void *x U) { return 0; }
-! static void f2() { } /* { dg-message "declared here" "" } */
-  static void f3(void) { } /* { dg-message "note: declared here" } */
-  static void f4(void *x U) { }
-  static void f5(int *x U) { }
-*************** static void f9(int x U) { } /* { dg-mess
-*** 18,24 ****
-  void test(void)
-  {
-    int o1 C(f1);
-!   int o2 C(f2);
-    int o3 C(f3);              /* { dg-error "too many arguments" } */
-    int o4 C(f4);
-    int o5 C(f5);
---- 18,24 ----
-  void test(void)
-  {
-    int o1 C(f1);
-!   int o2 C(f2);              /* { dg-warning "without a real prototype" } */
-    int o3 C(f3);              /* { dg-error "too many arguments" } */
-    int o4 C(f4);
-    int o5 C(f5);
-Index: gcc/c-typeck.c
-===================================================================
-*** gcc/c-typeck.c.orig        2012-02-07 11:34:02.000000000 +0100
---- gcc/c-typeck.c     2012-02-08 12:54:08.000000000 +0100
-*************** build_function_call_vec (location_t loc,
-*** 2823,2828 ****
---- 2823,2841 ----
-        && !check_builtin_function_arguments (fundecl, nargs, argarray))
-      return error_mark_node;
-  
-+   /* If we cannot check function arguments because a prototype is
-+      missing for the callee, warn here.  */
-+   if (warn_unprototyped_calls
-+       && nargs > 0 && !TYPE_ARG_TYPES (fntype)
-+       && fundecl && !DECL_BUILT_IN (fundecl) && !C_DECL_IMPLICIT (fundecl)
-+       && !DECL_ARGUMENTS (fundecl))
-+     {
-+       if (warning (OPT_Wunprototyped_calls,
-+                 "call to function %qD without a real prototype", fundecl))
-+      inform (DECL_SOURCE_LOCATION (fundecl), "%qD was declared here",
-+              fundecl);
-+     }
-+ 
-    /* Check that the arguments to the function are valid.  */
-    check_function_arguments (fntype, nargs, argarray);
-  
-Index: gcc/c-family/c-opts.c
-===================================================================
-*** gcc/c-family/c-opts.c.orig 2012-01-18 15:23:58.000000000 +0100
---- gcc/c-family/c-opts.c      2012-02-08 12:54:08.000000000 +0100
-*************** c_common_handle_option (size_t scode, co
-*** 392,397 ****
---- 392,398 ----
-            can turn it off only if it's not explicit.  */
-         if (warn_main == -1)
-           warn_main = (value ? 2 : 0);
-+        warn_unprototyped_calls = 1;
-  
-         /* In C, -Wall turns on -Wenum-compare, which we do here.
-            In C++ it is on by default, which is done in
diff --git a/packaging/change_spec b/packaging/change_spec
new file mode 100644 (file)
index 0000000..ee12148
--- /dev/null
@@ -0,0 +1,151 @@
+#!/bin/bash
+
+do_icecream=1
+do_cross_static=0
+do_cross_shared=0
+do_optional_compiler=0
+do_optional_compiler_languages=0
+rm -f libgcj*.spec libgcj*.changes libffi*.spec libffi*.changes gcc*-testresults.spec gcc*-testresults.changes gcc*.spec cross*.spec cross*.changes
+
+# Default is to generate the normal gcc package
+# unless a parameter is given.  In case that it is '-*',
+# that parameter will be used as suffix for the package name
+# and as suffix for the install path (/opt/gccSUFFIX)
+# In case that it is '[0-9]*', that parameter will be used
+# as a suffix for a versioned package name.
+
+if [ $# -lt 1 ]; then
+       outfile=gcc.spec
+else
+       case $1 in
+       [0-9]*)
+         base_ver=$1
+         outfile=gcc$1.spec
+       ;;
+       *)
+         exit 1
+       ;;
+       esac
+fi
+
+       echo -n > $outfile
+       if test "$do_optional_compiler" = "1"; then
+           echo '%define run_tests 1' >> $outfile
+           echo '%define build_optional_compiler 1' >> $outfile
+       fi
+       if test "$do_optional_compiler_languages" = "1"; then
+           echo '%define run_tests 1' >> $outfile
+           echo '%define build_optional_compiler_languages 1' >> $outfile
+       fi
+       sed -e 's%@base_ver@%'$base_ver'%g' \
+           gcc.spec.in \
+       | sed -n -e '{
+/^# PACKAGE-BEGIN/h
+/^# PACKAGE-BEGIN/,/^# PACKAGE-END/H
+/^# PACKAGE-BEGIN/,/^# PACKAGE-END/!p
+/^# PACKAGE-END/{g
+s/@variant@//g
+p
+g
+s/@variant@/-32bit/g
+p
+g
+s/@variant@/-64bit/g
+p
+}
+}' >> $outfile
+       if test "$do_optional_compiler" = "0"; then
+       if test "$do_optional_compiler_languages" = "0"; then
+       echo '%define building_libjava 1' > libgcj$base_ver.spec
+       sed -e '/^# LIBJAVA-DELETE-BEGIN/,/^# LIBJAVA-DELETE-END/d;s/-n libgcj@base_ver@$//g;s/^Name:[[:space:]]*gcc/Name: libgcj/g' \
+           gcc.spec.in \
+       | sed -e 's%@base_ver@%'$base_ver'%g' \
+       | sed -n -e '{
+/^# PACKAGE-BEGIN/h
+/^# PACKAGE-BEGIN/,/^# PACKAGE-END/H
+/^# PACKAGE-BEGIN/,/^# PACKAGE-END/!p
+/^# PACKAGE-END/{g
+s/@variant@//g
+p
+g
+s/@variant@/-32bit/g
+p
+g
+s/@variant@/-64bit/g
+p
+}
+}' >> libgcj$base_ver.spec
+       echo '%define building_testsuite 1' > gcc$base_ver-testresults.spec
+       echo '%define run_tests 1' >> gcc$base_ver-testresults.spec
+       sed -e '/^# GCC-TESTSUITE-DELETE-BEGIN/,/^# GCC-TESTSUITE-DELETE-END/d;s/-n gcc@base_ver@-testresults$//g;s/^Name:[[:space:]]*gcc@base_ver@/Name: gcc@base_ver@-testresults/g' \
+           gcc.spec.in \
+       | sed -e 's%@base_ver@%'$base_ver'%g' \
+>> gcc$base_ver-testresults.spec
+       echo '%define building_libffi 1' > libffi$base_ver.spec
+       sed -e '/^# LIBFFI-DELETE-BEGIN/,/^# LIBFFI-DELETE-END/d;s/^Name:[[:space:]]*gcc/Name: libffi/g' \
+           gcc.spec.in \
+       | sed -e 's%@base_ver@%'$base_ver'%g' \
+       | sed -n -e '{
+/^# PACKAGE-BEGIN/h
+/^# PACKAGE-BEGIN/,/^# PACKAGE-END/H
+/^# PACKAGE-BEGIN/,/^# PACKAGE-END/!p
+/^# PACKAGE-END/{g
+s/@variant@//g
+p
+g
+s/@variant@/-32bit/g
+p
+g
+s/@variant@/-64bit/g
+p
+}
+}' \
+       | sed -e '/^%package -n libffi'$base_ver'$/d' \
+       | sed -e 's/-n libffi'$base_ver'$//g' \
+>> libffi$base_ver.spec
+
+  test -f gcc$base_ver.changes \
+    && ( ln -f gcc$base_ver.changes libgcj$base_ver.changes; \
+        ln -f gcc$base_ver.changes libffi$base_ver.changes; \
+        ln -f gcc$base_ver.changes gcc$base_ver-testresults.changes; )
+       fi
+    fi
+
+# disabled: mips, sparc, alpha
+if test "$do_icecream" = 1 ; then
+  for arch in i386 x86_64 armv7hl armv5el armv7el; do
+    exclarch=`echo $arch | sed -e 's/i.86/%ix86/'`
+    { sed -n -e '1,/COMMON-BEGIN/p' cross-icecream.spec.in
+      sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile
+      sed -n -e '/COMMON-END/,$p' cross-icecream.spec.in; } |
+    sed -e "s#@cross_arch@#$arch#" \
+       -e "s#@base_ver@#$base_ver#" \
+        -e "s/^\(ExclusiveArch.*\) $exclarch /\1 /" \
+       > cross-$arch-gcc$base_ver-icecream-backend.spec
+    test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-$arch-gcc$base_ver-icecream-backend.changes
+  done
+fi
+
+export outfile
+if test "$do_cross_shared" = 1 ; then
+  # shared cross
+  for arch in ; do
+    base_ver=$base_ver cross_arch=$arch sh cross.spec.in > cross-$arch-gcc$base_ver.spec
+    test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-$arch-gcc$base_ver.changes
+  done
+fi
+if test "$do_cross_static" = 1 ; then
+  # static crosses
+  for arch in ; do
+    echo '%define build_static 1' > cross-$arch-gcc$base_ver-static.spec
+    base_ver=$base_ver cross_arch=$arch name_suffix="-static" sh cross.spec.in >> cross-$arch-gcc$base_ver-static.spec
+    test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-$arch-gcc$base_ver-static.changes
+  done
+#  # avr is static but wants the non-static versioned name
+#  echo '%define build_static 1' > cross-avr-gcc$base_ver.spec
+#  base_ver=$base_ver cross_arch=avr sh cross.spec.in >> cross-avr-gcc$base_ver.spec
+#  test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-avr-gcc$base_ver.changes
+fi
+
+
+exit 0
diff --git a/packaging/check-build.sh b/packaging/check-build.sh
new file mode 100644 (file)
index 0000000..a75c617
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash
+# Copyright (c) 2003,2005 SUSE Linux Products GmbH, Germany.  All rights reserved.
+#
+# Authors: Thorsten Kukuk <kukuk@suse.de>
+#
+# this script use the following variable(s):
+# 
+# - $BUILD_BASENAME
+#
+
+case $BUILD_BASENAME in
+   *ppc*)
+       # Our biarch 32-bit compiler needs to be build on a 64-bit machine,
+       # otherwise some configure checks fail.
+       # Note that we cannot use uname here since powerpc32 was invoked
+       # already.
+       grep 'series64\|ppc64' /proc/version > /dev/null
+       if [ $? -ne 0 ] ; then
+         echo "build does not work on `hostname` for gcc"
+         exit 1
+       fi
+       ;;
+   *x86_64*)
+       #if [ `ulimit -v` -le 740000 ] ; then
+       #  echo "build does not work on ("`hostname`" for gcc)"
+       #  exit 1
+       #fi
+       if [ `getconf _NPROCESSORS_CONF` -lt  2 ] ; then
+         echo "build does not work on `hostname` for gcc"
+         exit 1
+       fi
+       ;;
+   *)
+       ;;
+esac
+
+exit 0
+
diff --git a/packaging/cross-armv5el-gcc47-icecream-backend.spec b/packaging/cross-armv5el-gcc47-icecream-backend.spec
new file mode 100644 (file)
index 0000000..898b59e
--- /dev/null
@@ -0,0 +1,414 @@
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://www.suse.de/feedback/
+#
+
+%define build_cp 1
+%define build_ada 0
+%define build_libjava 0
+%define build_java 0
+%define build_fortran 0
+%define build_objc 0
+%define build_objcp 0
+%define build_nof 0
+%define build_with_mudflap 0
+%define gcc_target_arch armv5el-tizen-linux
+%define gcc_icecream 1
+
+%define binutils_target armv5el
+%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" || %{binutils_target} == "armv7el"
+%define binutils_target arm
+%endif
+%if %{binutils_target} == "armv5el"
+%define binutils_target arm
+%endif
+%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "arm"
+%define canonical_target_abi -gnueabi
+%endif
+
+Name:         cross-armv5el-gcc47-icecream-backend
+BuildRequires: cross-%{binutils_target}-binutils
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-devel
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: makeinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64  %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 
+%define _binary_payload w.ufdio
+
+# COMMON-BEGIN
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+# LIBJAVA-DELETE-BEGIN
+Group:         Development/Languages/C and C++
+Summary:       The GNU C Compiler and Support Files
+License:        GPL-3.0+
+
+%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++.
+
+
+
+# COMMON-END
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+# COMMON-END
+
+make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross g++ native"
+
+%install
+cd obj-%{GCCDIST}
+rm -rf $RPM_BUILD_ROOT
+make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
+make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
+
+# But the assembler comes from the cross-binutils, and hence is _not_
+# named funnily, not even on ppc, so there we need the original target
+install -s -D %{_prefix}/bin/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}-as \
+       $RPM_BUILD_ROOT/env/usr/bin/as
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+       $RPM_BUILD_ROOT/env/usr/bin/g++
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+       $RPM_BUILD_ROOT/env/usr/bin/gcc
+
+%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
+for back in cc1 cc1plus; do 
+       install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
+done
+if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
+  install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
+fi
+
+libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
+  ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }'  ;\
+done | sort -u `
+for lib in $libs; do
+   # Check wether the same library also exists in the parent directory,
+   # and prefer that on the assumption that it is a more generic one.
+   baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
+   test -f "$baselib" && lib=$baselib
+   install -s -D $lib $RPM_BUILD_ROOT/env$lib
+done
+rm -rf $RPM_BUILD_ROOT/inst
+cd $RPM_BUILD_ROOT/env
+tar cvzf ../%{name}_%{_arch}.tar.gz *
+cd ..
+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
+cd $RPM_BUILD_DIR
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/share/icecream-envs
+
+%changelog -n cross-armv5el-gcc47-icecream-backend
diff --git a/packaging/cross-armv7el-gcc47-icecream-backend.spec b/packaging/cross-armv7el-gcc47-icecream-backend.spec
new file mode 100644 (file)
index 0000000..6574319
--- /dev/null
@@ -0,0 +1,414 @@
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://www.suse.de/feedback/
+#
+
+%define build_cp 1
+%define build_ada 0
+%define build_libjava 0
+%define build_java 0
+%define build_fortran 0
+%define build_objc 0
+%define build_objcp 0
+%define build_nof 0
+%define build_with_mudflap 0
+%define gcc_target_arch armv7el-tizen-linux
+%define gcc_icecream 1
+
+%define binutils_target armv7el
+%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" || %{binutils_target} == "armv7el"
+%define binutils_target arm
+%endif
+%if %{binutils_target} == "armv5el"
+%define binutils_target arm
+%endif
+%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "arm"
+%define canonical_target_abi -gnueabi
+%endif
+
+Name:         cross-armv7el-gcc47-icecream-backend
+BuildRequires: cross-%{binutils_target}-binutils
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-devel
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: makeinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64  %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 
+%define _binary_payload w.ufdio
+
+# COMMON-BEGIN
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+# LIBJAVA-DELETE-BEGIN
+Group:         Development/Languages/C and C++
+Summary:       The GNU C Compiler and Support Files
+License:        GPL-3.0+
+
+%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++.
+
+
+
+# COMMON-END
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+# COMMON-END
+
+make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross g++ native"
+
+%install
+cd obj-%{GCCDIST}
+rm -rf $RPM_BUILD_ROOT
+make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
+make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
+
+# But the assembler comes from the cross-binutils, and hence is _not_
+# named funnily, not even on ppc, so there we need the original target
+install -s -D %{_prefix}/bin/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}-as \
+       $RPM_BUILD_ROOT/env/usr/bin/as
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+       $RPM_BUILD_ROOT/env/usr/bin/g++
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+       $RPM_BUILD_ROOT/env/usr/bin/gcc
+
+%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
+for back in cc1 cc1plus; do 
+       install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
+done
+if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
+  install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
+fi
+
+libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
+  ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }'  ;\
+done | sort -u `
+for lib in $libs; do
+   # Check wether the same library also exists in the parent directory,
+   # and prefer that on the assumption that it is a more generic one.
+   baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
+   test -f "$baselib" && lib=$baselib
+   install -s -D $lib $RPM_BUILD_ROOT/env$lib
+done
+rm -rf $RPM_BUILD_ROOT/inst
+cd $RPM_BUILD_ROOT/env
+tar cvzf ../%{name}_%{_arch}.tar.gz *
+cd ..
+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
+cd $RPM_BUILD_DIR
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/share/icecream-envs
+
+%changelog -n cross-armv7el-gcc47-icecream-backend
diff --git a/packaging/cross-armv7hl-gcc47-icecream-backend.spec b/packaging/cross-armv7hl-gcc47-icecream-backend.spec
new file mode 100644 (file)
index 0000000..9a4ba8f
--- /dev/null
@@ -0,0 +1,414 @@
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://www.suse.de/feedback/
+#
+
+%define build_cp 1
+%define build_ada 0
+%define build_libjava 0
+%define build_java 0
+%define build_fortran 0
+%define build_objc 0
+%define build_objcp 0
+%define build_nof 0
+%define build_with_mudflap 0
+%define gcc_target_arch armv7hl-tizen-linux
+%define gcc_icecream 1
+
+%define binutils_target armv7hl
+%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" || %{binutils_target} == "armv7el"
+%define binutils_target arm
+%endif
+%if %{binutils_target} == "armv5el"
+%define binutils_target arm
+%endif
+%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "arm"
+%define canonical_target_abi -gnueabi
+%endif
+
+Name:         cross-armv7hl-gcc47-icecream-backend
+BuildRequires: cross-%{binutils_target}-binutils
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-devel
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: makeinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64  %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 
+%define _binary_payload w.ufdio
+
+# COMMON-BEGIN
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+# LIBJAVA-DELETE-BEGIN
+Group:         Development/Languages/C and C++
+Summary:       The GNU C Compiler and Support Files
+License:        GPL-3.0+
+
+%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++.
+
+
+
+# COMMON-END
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+# COMMON-END
+
+make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross g++ native"
+
+%install
+cd obj-%{GCCDIST}
+rm -rf $RPM_BUILD_ROOT
+make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
+make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
+
+# But the assembler comes from the cross-binutils, and hence is _not_
+# named funnily, not even on ppc, so there we need the original target
+install -s -D %{_prefix}/bin/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}-as \
+       $RPM_BUILD_ROOT/env/usr/bin/as
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+       $RPM_BUILD_ROOT/env/usr/bin/g++
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+       $RPM_BUILD_ROOT/env/usr/bin/gcc
+
+%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
+for back in cc1 cc1plus; do 
+       install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
+done
+if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
+  install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
+fi
+
+libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
+  ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }'  ;\
+done | sort -u `
+for lib in $libs; do
+   # Check wether the same library also exists in the parent directory,
+   # and prefer that on the assumption that it is a more generic one.
+   baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
+   test -f "$baselib" && lib=$baselib
+   install -s -D $lib $RPM_BUILD_ROOT/env$lib
+done
+rm -rf $RPM_BUILD_ROOT/inst
+cd $RPM_BUILD_ROOT/env
+tar cvzf ../%{name}_%{_arch}.tar.gz *
+cd ..
+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
+cd $RPM_BUILD_DIR
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/share/icecream-envs
+
+%changelog -n cross-armv7hl-gcc47-icecream-backend
diff --git a/packaging/cross-i386-gcc47-icecream-backend.spec b/packaging/cross-i386-gcc47-icecream-backend.spec
new file mode 100644 (file)
index 0000000..5c675ac
--- /dev/null
@@ -0,0 +1,414 @@
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://www.suse.de/feedback/
+#
+
+%define build_cp 1
+%define build_ada 0
+%define build_libjava 0
+%define build_java 0
+%define build_fortran 0
+%define build_objc 0
+%define build_objcp 0
+%define build_nof 0
+%define build_with_mudflap 0
+%define gcc_target_arch i386-tizen-linux
+%define gcc_icecream 1
+
+%define binutils_target i386
+%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" || %{binutils_target} == "armv7el"
+%define binutils_target arm
+%endif
+%if %{binutils_target} == "armv5el"
+%define binutils_target arm
+%endif
+%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "arm"
+%define canonical_target_abi -gnueabi
+%endif
+
+Name:         cross-i386-gcc47-icecream-backend
+BuildRequires: cross-%{binutils_target}-binutils
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-devel
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: makeinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64  %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+ExclusiveArch: ppc ppc64 x86_64 ia64 
+%define _binary_payload w.ufdio
+
+# COMMON-BEGIN
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+# LIBJAVA-DELETE-BEGIN
+Group:         Development/Languages/C and C++
+Summary:       The GNU C Compiler and Support Files
+License:        GPL-3.0+
+
+%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++.
+
+
+
+# COMMON-END
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+# COMMON-END
+
+make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross g++ native"
+
+%install
+cd obj-%{GCCDIST}
+rm -rf $RPM_BUILD_ROOT
+make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
+make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
+
+# But the assembler comes from the cross-binutils, and hence is _not_
+# named funnily, not even on ppc, so there we need the original target
+install -s -D %{_prefix}/bin/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}-as \
+       $RPM_BUILD_ROOT/env/usr/bin/as
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+       $RPM_BUILD_ROOT/env/usr/bin/g++
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+       $RPM_BUILD_ROOT/env/usr/bin/gcc
+
+%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
+for back in cc1 cc1plus; do 
+       install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
+done
+if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
+  install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
+fi
+
+libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
+  ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }'  ;\
+done | sort -u `
+for lib in $libs; do
+   # Check wether the same library also exists in the parent directory,
+   # and prefer that on the assumption that it is a more generic one.
+   baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
+   test -f "$baselib" && lib=$baselib
+   install -s -D $lib $RPM_BUILD_ROOT/env$lib
+done
+rm -rf $RPM_BUILD_ROOT/inst
+cd $RPM_BUILD_ROOT/env
+tar cvzf ../%{name}_%{_arch}.tar.gz *
+cd ..
+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
+cd $RPM_BUILD_DIR
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/share/icecream-envs
+
+%changelog -n cross-i386-gcc47-icecream-backend
diff --git a/packaging/cross-icecream.spec.in b/packaging/cross-icecream.spec.in
new file mode 100644 (file)
index 0000000..cb4210f
--- /dev/null
@@ -0,0 +1,114 @@
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://www.suse.de/feedback/
+#
+
+%define build_cp 1
+%define build_ada 0
+%define build_libjava 0
+%define build_java 0
+%define build_fortran 0
+%define build_objc 0
+%define build_objcp 0
+%define build_nof 0
+%define build_with_mudflap 0
+%define gcc_target_arch @cross_arch@-tizen-linux
+%define gcc_icecream 1
+
+%define binutils_target @cross_arch@
+%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" || %{binutils_target} == "armv7el"
+%define binutils_target arm
+%endif
+%if %{binutils_target} == "armv5el"
+%define binutils_target arm
+%endif
+%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "arm"
+%define canonical_target_abi -gnueabi
+%endif
+
+Name:         cross-@cross_arch@-gcc@base_ver@-icecream-backend
+BuildRequires: cross-%{binutils_target}-binutils
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-devel
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: makeinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64  %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 
+%define _binary_payload w.ufdio
+
+# COMMON-BEGIN
+# COMMON-END
+
+make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross g++ native"
+
+%install
+cd obj-%{GCCDIST}
+rm -rf $RPM_BUILD_ROOT
+make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
+make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
+
+# But the assembler comes from the cross-binutils, and hence is _not_
+# named funnily, not even on ppc, so there we need the original target
+install -s -D %{_prefix}/bin/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}-as \
+       $RPM_BUILD_ROOT/env/usr/bin/as
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+       $RPM_BUILD_ROOT/env/usr/bin/g++
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+       $RPM_BUILD_ROOT/env/usr/bin/gcc
+
+%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
+for back in cc1 cc1plus; do 
+       install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
+done
+if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
+  install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
+fi
+
+libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
+  ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }'  ;\
+done | sort -u `
+for lib in $libs; do
+   # Check wether the same library also exists in the parent directory,
+   # and prefer that on the assumption that it is a more generic one.
+   baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
+   test -f "$baselib" && lib=$baselib
+   install -s -D $lib $RPM_BUILD_ROOT/env$lib
+done
+rm -rf $RPM_BUILD_ROOT/inst
+cd $RPM_BUILD_ROOT/env
+tar cvzf ../%{name}_%{_arch}.tar.gz *
+cd ..
+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
+cd $RPM_BUILD_DIR
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/share/icecream-envs
+
+%changelog -n cross-@cross_arch@-gcc@base_ver@-icecream-backend
diff --git a/packaging/cross-x86_64-gcc47-icecream-backend.spec b/packaging/cross-x86_64-gcc47-icecream-backend.spec
new file mode 100644 (file)
index 0000000..a366863
--- /dev/null
@@ -0,0 +1,414 @@
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://www.suse.de/feedback/
+#
+
+%define build_cp 1
+%define build_ada 0
+%define build_libjava 0
+%define build_java 0
+%define build_fortran 0
+%define build_objc 0
+%define build_objcp 0
+%define build_nof 0
+%define build_with_mudflap 0
+%define gcc_target_arch x86_64-tizen-linux
+%define gcc_icecream 1
+
+%define binutils_target x86_64
+%if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" || %{binutils_target} == "armv7el"
+%define binutils_target arm
+%endif
+%if %{binutils_target} == "armv5el"
+%define binutils_target arm
+%endif
+%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if %{binutils_target} == "arm"
+%define canonical_target_abi -gnueabi
+%endif
+
+Name:         cross-x86_64-gcc47-icecream-backend
+BuildRequires: cross-%{binutils_target}-binutils
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-devel
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: makeinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64  %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+ExclusiveArch: ppc ppc64 %ix86 ia64 
+%define _binary_payload w.ufdio
+
+# COMMON-BEGIN
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+# LIBJAVA-DELETE-BEGIN
+Group:         Development/Languages/C and C++
+Summary:       The GNU C Compiler and Support Files
+License:        GPL-3.0+
+
+%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++.
+
+
+
+# COMMON-END
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+# COMMON-END
+
+make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross g++ native"
+
+%install
+cd obj-%{GCCDIST}
+rm -rf $RPM_BUILD_ROOT
+make -C gcc DESTDIR=$RPM_BUILD_ROOT/inst install-driver install-common
+make DESTDIR=$RPM_BUILD_ROOT/inst maybe-install-lto-plugin
+
+# But the assembler comes from the cross-binutils, and hence is _not_
+# named funnily, not even on ppc, so there we need the original target
+install -s -D %{_prefix}/bin/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}-as \
+       $RPM_BUILD_ROOT/env/usr/bin/as
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \
+       $RPM_BUILD_ROOT/env/usr/bin/g++
+install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-gcc \
+       $RPM_BUILD_ROOT/env/usr/bin/gcc
+
+%define targetlibsubdir %{_libdir}/gcc/%{CONFIGURE_TARGET}/%{gcc_dir_version}
+for back in cc1 cc1plus; do 
+       install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/$back \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
+done
+if test -f $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so; then
+  install -s -D $RPM_BUILD_ROOT/inst%{targetlibsubdir}/liblto_plugin.so \
+               $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
+fi
+
+libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
+  ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }'  ;\
+done | sort -u `
+for lib in $libs; do
+   # Check wether the same library also exists in the parent directory,
+   # and prefer that on the assumption that it is a more generic one.
+   baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
+   test -f "$baselib" && lib=$baselib
+   install -s -D $lib $RPM_BUILD_ROOT/env$lib
+done
+rm -rf $RPM_BUILD_ROOT/inst
+cd $RPM_BUILD_ROOT/env
+tar cvzf ../%{name}_%{_arch}.tar.gz *
+cd ..
+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
+cd $RPM_BUILD_DIR
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/share/icecream-envs
+
+%changelog -n cross-x86_64-gcc47-icecream-backend
diff --git a/packaging/cross.spec.in b/packaging/cross.spec.in
new file mode 100644 (file)
index 0000000..7c31528
--- /dev/null
@@ -0,0 +1,103 @@
+#! /bin/sh
+
+#
+# call this via pre_checkin.sh
+#
+# 2005-05-09, jw@suse.de
+
+test -z "$cross_arch" && echo 1>&2 "Error: $0 needs environment variable 'cross_arch'"
+test -z "$outfile" && echo 1>&2 "Error: $0 needs environment variable 'outfile'"
+cross_arch_cpu=`echo $cross_arch | sed -e 's/\([^-]*\)-\?.*/\1/'`
+
+cat << EOF
+#
+# spec file for package gcc (Version 4.0.1)
+#
+# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://www.suse.de/feedback/
+#
+
+# norootforbuild
+
+%define build_cp 1
+%define build_ada 0
+%define build_java 0
+%define build_libjava 0
+%define build_fortran 0
+%define build_objc 0
+%define build_objcp 0
+%define build_nof 0
+%define build_with_mudflap 0
+%define gcc_target_arch $cross_arch
+
+%if "$cross_arch" == "spu"
+%define build_fortran 1
+%endif
+
+%if 0%{?build_static:1}
+%define build_fortran 0
+%endif
+
+Name: cross-$cross_arch-gcc$base_ver$name_suffix
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-devel
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+BuildRequires: cross-$cross_arch_cpu-binutils
+%if "$cross_arch" == "spu"
+%if 0%{?build_static:1}
+BuildRequires: cross-$cross_arch_cpu-newlib-headers
+%else
+BuildRequires: cross-$cross_arch_cpu-newlib
+%endif
+Requires: cross-$cross_arch_cpu-newlib
+%endif
+Requires: cross-$cross_arch_cpu-binutils
+# Suffixed gcc conflicts with unsuffixed gcc
+%if "$name_suffix" == ""
+%else
+Conflicts: cross-$cross_arch_cpu-gcc$base_ver
+%endif
+
+%define _prefix /opt/cross
+
+EOF
+sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile | sed -n -e '1,/%description/p' 
+cat << EOF
+This compiler supports the C language on $cross_arch microprocessors.
+Also install cross-$cross_arch-binutils and $cross_arch-libc.
+
+
+EOF
+sed -n -e '/%description/,$p' $outfile | sed -n -e '/COMMON-BEGIN/,/COMMON-END/p'
+
+cat << EOF
+
+make %{?jobs:-j%jobs} 
+
+%install
+cd obj-%{GCCDIST}
+make install DESTDIR=\$RPM_BUILD_ROOT
+rm -rf \$RPM_BUILD_ROOT%{_prefix}/share
+rm -f \$RPM_BUILD_ROOT%{_prefix}/bin/*-gccbug
+find \$RPM_BUILD_ROOT -name libiberty.a | xargs rm
+
+%clean
+rm -rf \$RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%{_prefix}
+
+EOF
diff --git a/packaging/ecj.jar b/packaging/ecj.jar
new file mode 100644 (file)
index 0000000..8d5ed17
Binary files /dev/null and b/packaging/ecj.jar differ
diff --git a/packaging/gcc-add-defaultsspec.diff b/packaging/gcc-add-defaultsspec.diff
deleted file mode 100644 (file)
index dc30d87..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-Index: gcc/gcc.c
-===================================================================
---- gcc/gcc.c.orig     2011-11-03 16:27:42.000000000 +0100
-+++ gcc/gcc.c  2011-11-03 17:08:03.000000000 +0100
-@@ -260,6 +260,7 @@ static const char *replace_outfile_spec_
- static const char *remove_outfile_spec_function (int, const char **);
- static const char *version_compare_spec_function (int, const char **);
- static const char *include_spec_function (int, const char **);
-+static const char *include_noerr_spec_function (int, const char **);
- static const char *find_file_spec_function (int, const char **);
- static const char *find_plugindir_spec_function (int, const char **);
- static const char *print_asm_header_spec_function (int, const char **);
-@@ -1247,6 +1248,7 @@ static const struct spec_function static
-   { "remove-outfile",         remove_outfile_spec_function },
-   { "version-compare",                version_compare_spec_function },
-   { "include",                        include_spec_function },
-+  { "include_noerr",            include_noerr_spec_function },
-   { "find-file",              find_file_spec_function },
-   { "find-plugindir",         find_plugindir_spec_function },
-   { "print-asm-header",               print_asm_header_spec_function },
-@@ -6240,6 +6242,8 @@ main (int argc, char **argv)
-   if (access (specs_file, R_OK) == 0)
-     read_specs (specs_file, TRUE);
-+  do_self_spec ("%:include_noerr(defaults.spec)%(default_spec)");
-+
-   /* Process any configure-time defaults specified for the command line
-      options, via OPTION_DEFAULT_SPECS.  */
-   for (i = 0; i < ARRAY_SIZE (option_default_specs); i++)
-@@ -8088,6 +8092,21 @@ get_random_number (void)
-   return ret ^ getpid();
- }
-+static const char *
-+include_noerr_spec_function (int argc, const char **argv)
-+{
-+  char *file;
-+
-+  if (argc != 1)
-+    abort ();
-+
-+  file = find_a_file (&startfile_prefixes, argv[0], R_OK, 0);
-+  if (file)
-+    read_specs (file, FALSE);
-+
-+  return NULL;
-+}
-+
- /* %:compare-debug-dump-opt spec function.  Save the last argument,
-    expected to be the last -fdump-final-insns option, or generate a
-    temporary.  */
diff --git a/packaging/gcc-arm-linker.patch b/packaging/gcc-arm-linker.patch
deleted file mode 100644 (file)
index 9fcb8d1..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-2012-05-01  Richard Earnshaw  <rearnsha@arm.com>
-
-        * arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_DEFAULT): Avoid ifdef
-        comparing enumeration values.  Update comments.
-
-2012-04-26  Michael Hope  <michael.hope@linaro.org>
-            Richard Earnshaw  <rearnsha@arm.com>
-
-        * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_SOFT_FLOAT): Define.
-        (GLIBC_DYNAMIC_LINKER_HARD_FLOAT): Define.
-        (GLIBC_DYNAMIC_LINKER_DEFAULT): Define.
-        (GLIBC_DYNAMIC_LINKER): Redefine to use the hard float path.
-
-
---- gcc-4_7-branch/gcc/config/arm/linux-eabi.h 2012-03-02 13:36:59.221206250 +0100
-+++ trunk/gcc/config/arm/linux-eabi.h  2012-05-03 19:41:43.484057843 +0200
-@@ -32,7 +32,8 @@
-   while (false)
- /* We default to a soft-float ABI so that binaries can run on all
--   target hardware.  */
-+   target hardware.  If you override this to use the hard-float ABI then
-+   change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well.  */
- #undef  TARGET_DEFAULT_FLOAT_ABI
- #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
-@@ -59,10 +60,23 @@
- #undef  SUBTARGET_EXTRA_LINK_SPEC
- #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
--/* Use ld-linux.so.3 so that it will be possible to run "classic"
--   GNU/Linux binaries on an EABI system.  */
-+/* GNU/Linux on ARM currently supports three dynamic linkers:
-+   - ld-linux.so.2 - for the legacy ABI
-+   - ld-linux.so.3 - for the EABI-derived soft-float ABI
-+   - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI.
-+   All the dynamic linkers live in /lib.
-+   We default to soft-float, but this can be overridden by changing both
-+   GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
-+
- #undef  GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
-+#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
-+
-+#define GLIBC_DYNAMIC_LINKER \
-+   "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \
-+    %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
-+    %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
- /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
-    use the GNU/Linux version, not the generic BPABI version.  */
diff --git a/packaging/gcc-dir-version.patch b/packaging/gcc-dir-version.patch
deleted file mode 100644 (file)
index eb830df..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-Index: gcc/Makefile.in
-===================================================================
---- gcc/Makefile.in.orig       2011-11-08 16:23:29.000000000 +0100
-+++ gcc/Makefile.in    2011-11-09 11:59:34.000000000 +0100
-@@ -792,12 +792,14 @@ GTM_H     = tm.h      $(tm_file_list) in
- TM_H      = $(GTM_H) insn-flags.h $(OPTIONS_H)
- # Variables for version information.
--BASEVER     := $(srcdir)/BASE-VER  # 4.x.y
-+BASEVER     := $(srcdir)/BASE-VER  # 4.x
-+FULLVER     := $(srcdir)/FULL-VER  # 4.x.y
- DEVPHASE    := $(srcdir)/DEV-PHASE # experimental, prerelease, ""
- DATESTAMP   := $(srcdir)/DATESTAMP # YYYYMMDD or empty
- REVISION    := $(srcdir)/REVISION  # [BRANCH revision XXXXXX]
- BASEVER_c   := $(shell cat $(BASEVER))
-+FULLVER_c   := $(shell cat $(FULLVER))
- DEVPHASE_c  := $(shell cat $(DEVPHASE))
- DATESTAMP_c := $(shell cat $(DATESTAMP))
-@@ -816,6 +818,7 @@ version     := $(BASEVER_c)
- # (i.e. if DEVPHASE_c is empty).  The space immediately after the
- # comma in the $(if ...) constructs is significant - do not remove it.
- BASEVER_s   := "\"$(BASEVER_c)\""
-+FULLVER_s   := "\"$(FULLVER_c)\""
- DEVPHASE_s  := "\"$(if $(DEVPHASE_c), ($(DEVPHASE_c)))\""
- DATESTAMP_s := "\"$(if $(DEVPHASE_c), $(DATESTAMP_c))\""
- PKGVERSION_s:= "\"@PKGVERSION@\""
-@@ -2146,11 +2149,11 @@ options-save.o: options-save.c $(CONFIG_
- dumpvers: dumpvers.c
--CFLAGS-version.o += -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
-+CFLAGS-version.o += -DBASEVER=$(FULLVER_s) -DDATESTAMP=$(DATESTAMP_s) \
-       -DREVISION=$(REVISION_s) \
-       -DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
-       -DBUGURL=$(BUGURL_s)
--version.o: version.c version.h $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
-+version.o: version.c version.h $(REVISION) $(DATESTAMP) $(FULLVER) $(DEVPHASE)
- gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-       $(HASHTAB_H) $(SPLAY_TREE_H) $(OBSTACK_H) $(BITMAP_H) \
-@@ -2736,10 +2739,10 @@ common/common-targhooks.o : common/commo
-    coretypes.h $(INPUT_H) $(TM_H) $(COMMON_TARGET_H) common/common-targhooks.h
- bversion.h: s-bversion; @true
--s-bversion: BASE-VER
--      echo "#define BUILDING_GCC_MAJOR `echo $(BASEVER_c) | sed -e 's/^\([0-9]*\).*$$/\1/'`" > bversion.h
--      echo "#define BUILDING_GCC_MINOR `echo $(BASEVER_c) | sed -e 's/^[0-9]*\.\([0-9]*\).*$$/\1/'`" >> bversion.h
--      echo "#define BUILDING_GCC_PATCHLEVEL `echo $(BASEVER_c) | sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\)$$/\1/'`" >> bversion.h
-+s-bversion: FULL-VER
-+      echo "#define BUILDING_GCC_MAJOR `echo $(FULLVER_c) | sed -e 's/^\([0-9]*\).*$$/\1/'`" > bversion.h
-+      echo "#define BUILDING_GCC_MINOR `echo $(FULLVER_c) | sed -e 's/^[0-9]*\.\([0-9]*\).*$$/\1/'`" >> bversion.h
-+      echo "#define BUILDING_GCC_PATCHLEVEL `echo $(FULLVER_c) | sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\)$$/\1/'`" >> bversion.h
-       echo "#define BUILDING_GCC_VERSION (BUILDING_GCC_MAJOR * 1000 + BUILDING_GCC_MINOR)" >> bversion.h
-       $(STAMP) s-bversion
-@@ -3811,9 +3814,9 @@ build/%.o :  # dependencies provided by
- ## build/version.o is compiled by the $(COMPILER_FOR_BUILD) but needs
- ## several C macro definitions, just like version.o
- build/version.o:  version.c version.h \
--                  $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
-+                  $(REVISION) $(DATESTAMP) $(FULLVER) $(DEVPHASE)
-       $(COMPILER_FOR_BUILD) -c $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) \
--      -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
-+      -DBASEVER=$(FULLVER_s) -DDATESTAMP=$(DATESTAMP_s) \
-       -DREVISION=$(REVISION_s) \
-       -DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
-       -DBUGURL=$(BUGURL_s) -o $@ $<
-@@ -3988,7 +3991,7 @@ PREPROCESSOR_DEFINES = \
-   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
-   @TARGET_SYSTEM_ROOT_DEFINE@
--CFLAGS-cppbuiltin.o += $(PREPROCESSOR_DEFINES) -DBASEVER=$(BASEVER_s)
-+CFLAGS-cppbuiltin.o += $(PREPROCESSOR_DEFINES) -DBASEVER=$(FULLVER_s)
- cppbuiltin.o: cppbuiltin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-       $(TREE_H) cppbuiltin.h Makefile
-@@ -4008,8 +4011,8 @@ build/gcov-iov$(build_exeext): build/gco
-               build/gcov-iov.o -o $@
- gcov-iov.h: s-iov
--s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE)
--      build/gcov-iov$(build_exeext) '$(BASEVER_c)' '$(DEVPHASE_c)' \
-+s-iov: build/gcov-iov$(build_exeext) $(FULLVER) $(DEVPHASE)
-+      build/gcov-iov$(build_exeext) '$(FULLVER_c)' '$(DEVPHASE_c)' \
-           > tmp-gcov-iov.h
-       $(SHELL) $(srcdir)/../move-if-change tmp-gcov-iov.h gcov-iov.h
-       $(STAMP) s-iov
-Index: libjava/Makefile.am
-===================================================================
---- libjava/Makefile.am.orig   2011-11-03 16:30:42.000000000 +0100
-+++ libjava/Makefile.am        2011-11-09 11:59:34.000000000 +0100
-@@ -774,7 +774,7 @@ install_data_local_split = 50
- install-data-local:
-       $(PRE_INSTALL)
- ## Install the .pc file.
--      @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*$$//'`; \
-+      @pc_version=`echo $(GCJVERSION)`; \
-       file="libgcj-$${pc_version}.pc"; \
-       $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
-       echo "  $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
-Index: libjava/Makefile.in
-===================================================================
---- libjava/Makefile.in.orig   2011-11-03 16:31:17.000000000 +0100
-+++ libjava/Makefile.in        2011-11-09 11:59:34.000000000 +0100
-@@ -12411,7 +12411,7 @@ install-exec-hook: install-binPROGRAMS i
- @BUILD_ECJ1_TRUE@     mv $(DESTDIR)$(libexecsubdir)/`echo ecjx | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
- install-data-local:
-       $(PRE_INSTALL)
--      @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*$$//'`; \
-+      @pc_version=`echo $(GCJVERSION)`; \
-       file="libgcj-$${pc_version}.pc"; \
-       $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
-       echo "  $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
-Index: libjava/testsuite/lib/libjava.exp
-===================================================================
---- libjava/testsuite/lib/libjava.exp.orig     2011-04-18 12:48:54.000000000 +0200
-+++ libjava/testsuite/lib/libjava.exp  2011-11-09 11:59:34.000000000 +0100
-@@ -177,7 +177,7 @@ proc libjava_init { args } {
-     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.7
-     verbose "version: $libjava_version"
-Index: gcc/cppbuiltin.c
-===================================================================
---- gcc/cppbuiltin.c.orig      2011-03-14 15:04:06.000000000 +0100
-+++ gcc/cppbuiltin.c   2012-01-24 10:22:18.000000000 +0100
-@@ -38,9 +38,9 @@ parse_basever (int *major, int *minor, i
-   static int s_major = -1, s_minor, s_patchlevel;
-   if (s_major == -1)
--    if (sscanf (BASEVER, "%d.%d.%d", &s_major, &s_minor, &s_patchlevel) != 3)
-+    if (sscanf (version_string, "%d.%d.%d", &s_major, &s_minor, &s_patchlevel) != 3)
-       {
--      sscanf (BASEVER, "%d.%d", &s_major, &s_minor);
-+      sscanf (version_string, "%d.%d", &s_major, &s_minor);
-       s_patchlevel = 0;
-       }
diff --git a/packaging/gcc-noalias-warn.diff b/packaging/gcc-noalias-warn.diff
deleted file mode 100644 (file)
index 90976fb..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-Index: boehm-gc/finalize.c
-===================================================================
---- boehm-gc/finalize.c.orig   2007-03-11 13:17:59.000000000 +0100
-+++ boehm-gc/finalize.c        2010-07-01 16:26:16.000000000 +0200
-@@ -165,6 +165,7 @@ signed_word * log_size_ptr;
-     int index;
-     struct disappearing_link * new_dl;
-     DCL_LOCK_STATE;
-+    struct disappearing_link *** dl_head_adr = &dl_head;
-     
-     if ((word)link & (ALIGNMENT-1))
-       ABORT("Bad arg to GC_general_register_disappearing_link");
-@@ -177,7 +178,7 @@ signed_word * log_size_ptr;
- #     ifndef THREADS
-           DISABLE_SIGNALS();
- #     endif
--      GC_grow_table((struct hash_chain_entry ***)(&dl_head),
-+      GC_grow_table((struct hash_chain_entry ***)dl_head_adr,
-                     &log_dl_table_size);
- #     ifdef CONDPRINT
-         if (GC_print_stats) {
-@@ -348,6 +349,7 @@ finalization_mark_proc * mp;
-     struct finalizable_object *new_fo;
-     hdr *hhdr;
-     DCL_LOCK_STATE;
-+    struct finalizable_object *** fo_head_adr = &fo_head;
- #   ifdef THREADS
-       DISABLE_SIGNALS();
-@@ -358,7 +360,7 @@ finalization_mark_proc * mp;
- #     ifndef THREADS
-           DISABLE_SIGNALS();
- #     endif
--      GC_grow_table((struct hash_chain_entry ***)(&fo_head),
-+      GC_grow_table((struct hash_chain_entry ***)fo_head_adr,
-                     &log_fo_table_size);
- #     ifdef CONDPRINT
-         if (GC_print_stats) {
diff --git a/packaging/gcc-sles-version.patch b/packaging/gcc-sles-version.patch
deleted file mode 100644 (file)
index 41b94f0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: gcc/Makefile.in
-===================================================================
---- gcc/Makefile.in.orig       2011-11-03 17:00:43.000000000 +0100
-+++ gcc/Makefile.in    2011-11-03 17:01:28.000000000 +0100
-@@ -2145,7 +2145,7 @@ dumpvers: dumpvers.c
- CFLAGS-version.o += -DBASEVER=$(FULLVER_s) -DDATESTAMP=$(DATESTAMP_s) \
-       -DREVISION=$(REVISION_s) \
--      -DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
-+      -DDEVPHASE="" -DPKGVERSION=$(PKGVERSION_s) \
-       -DBUGURL=$(BUGURL_s)
- version.o: version.c version.h $(REVISION) $(DATESTAMP) $(FULLVER) $(DEVPHASE)
diff --git a/packaging/gcc.spec.in b/packaging/gcc.spec.in
new file mode 100644 (file)
index 0000000..a79796b
--- /dev/null
@@ -0,0 +1,2161 @@
+%define fast_build 1
+
+# Ada currently fails to build on a few platforms, enable it only
+# on those that work
+# Note that AdaCore only supports %ix86, x86_64 and ia64
+%ifarch %ix86 x86_64
+%define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
+%else
+%define build_ada 0
+%endif
+
+%define quadmath_arch %ix86 x86_64 ia64
+
+# We don't want to build java
+%ifarch mips
+%define build_java 0
+%define build_libjava 0
+%else
+%define build_java 1
+%define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+%endif
+
+%define build_cp 1
+%define build_fortran 1
+%define build_objc 1
+%define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
+%define build_with_mudflap 0
+
+%if %{build_objcp}
+%define build_cp 1
+%define build_objc 1
+%endif
+
+%if %{build_libjava}
+%define build_cp 1
+%endif
+
+# For optional compilers only build C, C++ and Fortran
+##%if 0%{?build_optional_compiler:1}%{?build_optional_compiler_languages:1}
+%if 0%{!?building_libffi:1}
+%define build_ada 0
+%define build_java 0
+%define build_libjava 0
+%define build_objc 1
+%define build_objcp 1
+%endif
+
+
+Name:         gcc@base_ver@
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-tools
+BuildRequires: makeinfo
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: texinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64 %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%if %{build_ada}
+%define hostsuffix -4.7
+BuildRequires: gcc47-ada
+%endif
+%if 0%{?building_libjava:1}%{?building_testsuite:1}
+BuildRequires: fastjar
+BuildRequires: unzip
+%endif
+%if 0%{?building_libffi:1}
+BuildRequires: pkg-config
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+%if 0%{?run_tests:1}
+BuildRequires: dejagnu
+BuildRequires: expect
+BuildRequires: gdb
+%endif
+
+# Define version number of libgcc_s
+%ifarch hppa
+%define libgcc_s 4
+%else
+%define libgcc_s 1
+%endif
+%ifarch ppc
+# We support building the nof libraries, but don't want this in the
+# regular rpms
+%define build_nof 0
+%else
+%define build_nof 0
+%endif
+
+%define separate_bi32 0
+%define separate_bi64 0
+%ifarch x86_64 
+%define separate_bi32 1
+%endif
+
+# Define two macros to trigger -32bit or -64bit package variants
+%define separate_biarch 0
+%if %{separate_bi32}
+%define separate_biarch 1
+%define separate_biarch_suffix -32bit
+%endif
+%if %{separate_bi64}
+%define separate_biarch 1
+%define separate_biarch_suffix -64bit
+%endif
+
+%ifarch x86_64
+# 64-bit is primary build target
+%define build_primary_64bit 1
+%else
+%define build_primary_64bit 0
+%endif
+
+%define biarch_libjava 0
+
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+
+%if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+Requires: binutils glibc-devel
+Requires: cpp@base_ver@ = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgcc%{libgcc_s} >= %{version}-%{release}
+Requires: libgomp1 >= %{version}-%{release}
+%if %{build_with_mudflap}
+Requires: libmudflap0 >= %{version}-%{release}
+Requires: libmudflapth0 >= %{version}-%{release}
+%endif
+%else
+Requires: libgcc@base_ver@ = %{version}-%{release}
+Requires: libgomp@base_ver@ = %{version}-%{release}
+%endif
+%endif
+
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+# LIBJAVA-DELETE-BEGIN
+Group:         Development/Languages/C and C++
+Summary:       The GNU C Compiler and Support Files
+License:        GPL-3.0+
+
+%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++.
+
+
+
+# COMMON-END
+%package -n gcc@base_ver@-32bit
+Summary:      The GNU C Compiler 32bit support
+Group:        Development/Languages/C and C++
+Requires: gcc@base_ver@ = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgcc%{libgcc_s}-32bit >= %{version}-%{release}
+Requires: libgomp1-32bit >= %{version}-%{release}
+%if %{build_with_mudflap}
+Requires: libmudflap0-32bit >= %{version}-%{release}
+Requires: libmudflapth0-32bit >= %{version}-%{release}
+%endif
+%else
+Requires: libgcc@base_ver@-32bit = %{version}-%{release}
+Requires: libgomp@base_ver@-32bit = %{version}-%{release}
+%endif
+Requires: glibc-devel-32bit
+
+%description -n gcc@base_ver@-32bit
+This package contains 32bit support for the GNU Compiler Collection.
+
+%package -n gcc@base_ver@-64bit
+Summary:      The GNU C Compiler 64bit support
+Group:        Development/Languages/C and C++
+Requires: gcc@base_ver@ = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgcc%{libgcc_s}-64bit >= %{version}-%{release}
+Requires: libgomp1-64bit >= %{version}-%{release}
+%if %{build_with_mudflap}
+Requires: libmudflap0-64bit >= %{version}-%{release}
+Requires: libmudflapth0-64bit >= %{version}-%{release}
+%endif
+%else
+Requires: libgcc@base_ver@-64bit = %{version}-%{release}
+Requires: libgomp@base_ver@-64bit = %{version}-%{release}
+%endif
+Requires: glibc-devel-64bit
+
+%description -n gcc@base_ver@-64bit
+This package contains 64bit support for the GNU Compiler Collection.
+
+
+%package locale
+Summary:      Locale Data for the GNU Compiler Collection
+License:        GPL-3.0+
+Group:        Development/Languages/C and C++
+Requires: gcc@base_ver@ = %{version}-%{release}
+
+%description locale
+Locale data for the GNU Compiler Collection (GCC) to give error message
+in the current locale.
+
+
+%package c++
+Summary:      The GNU C++ Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/C and C++
+Requires: gcc@base_ver@ = %{version}-%{release}
+Requires: libstdc++@base_ver@-devel = %{version}-%{release}
+
+%description c++
+This package contains the GNU compiler for C++.
+
+# PACKAGE-BEGIN
+%package -n libstdc++@base_ver@-devel@variant@
+Summary:      Include Files and Libraries mandatory for Development
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/C and C++
+%if 0%{!?build_optional_compiler:1}
+Requires: libstdc++6@variant@ >= %{version}-%{release}
+%else
+Requires: libstdc++@base_ver@@variant@ = %{version}-%{release}
+%endif
+Requires: glibc-devel@variant@
+%ifarch ia64
+Requires: libunwind-devel
+%endif
+
+%description -n libstdc++@base_ver@-devel@variant@
+This package contains all the headers and libraries of the standard C++
+library. It is needed for compiling C++ code.
+# PACKAGE-END
+
+%package -n libstdc++@base_ver@-doc
+Summary:      Documentation for the GNU C++ standard library
+License:        GPL-3.0+
+Group:        Documentation/HTML
+BuildArch:    noarch
+
+%description -n libstdc++@base_ver@-doc
+Extensive HTML documentation for the GNU C++ standard library.
+
+
+# PACKAGE-BEGIN
+%package -n libgcc@base_ver@@variant@
+Summary:      C compiler runtime library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Base
+%if 0%{!?build_optional_compiler:1}
+Provides: libgcc%{libgcc_s}@variant@ = %{version}-%{release}
+Conflicts: libgcc%{libgcc_s}@variant@ < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libgcc@base_ver@@variant@
+Libgcc is needed for dynamically linked C programs.
+
+%post -n libgcc@base_ver@@variant@
+/sbin/ldconfig
+
+%postun -n libgcc@base_ver@@variant@
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+%package -n libgomp@base_ver@@variant@
+Summary:      The GNU compiler collection OpenMP runtime library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Base
+%if 0%{!?build_optional_compiler:1}
+Provides: libgomp1@variant@ = %{version}-%{release}
+Conflicts: libgomp1@variant@ < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libgomp@base_ver@@variant@
+This is the OpenMP runtime library needed by OpenMP enabled programs
+that were built with the -fopenmp compiler option and by programs that
+were auto-parallelized via the -ftree-parallelize-loops compiler
+option.
+
+
+%post -n libgomp@base_ver@@variant@
+/sbin/ldconfig
+
+%postun -n libgomp@base_ver@@variant@
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+%package -n libstdc++@base_ver@@variant@
+Summary:      The standard C++ shared library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Libraries
+%if 0%{!?build_optional_compiler:1}
+Provides: libstdc++6@variant@ = %{version}-%{release}
+Conflicts: libstdc++6@variant@ < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libstdc++@base_ver@@variant@
+The standard C++ library, needed for dynamically linked C++ programs.
+
+
+%post -n libstdc++@base_ver@@variant@
+/sbin/ldconfig
+
+%postun -n libstdc++@base_ver@@variant@
+/sbin/ldconfig
+# PACKAGE-END
+
+
+%package info
+Summary:      Documentation for the GNU compiler collection
+License:      GFDL-1.2
+Group:        Documentation/Other
+BuildArch:    noarch
+
+%description info
+GNU info-pages for the GNU compiler collection covering both user-level
+and internals documentation.
+
+
+# PACKAGE-BEGIN
+%package objc@variant@
+Summary:      GNU Objective C Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc@base_ver@ = %{version}-%{release}
+Requires: libobjc2@variant@ >= %{version}-%{release}
+
+%description objc@variant@
+This package contains the GNU Objective C compiler. Objective C is an
+object oriented language, created by Next Inc. and used in their
+Nextstep OS. The source code is available in the gcc package.
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+%package -n libobjc@base_ver@@variant@
+Summary:      Library for the GNU Objective C Compiler
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Libraries/Other
+Provides: libobjc2@variant@ = %{version}-%{release}
+Conflicts: libobjc2@variant@ < %{version}-%{release}
+
+%description -n libobjc@base_ver@@variant@
+The library for the GNU Objective C compiler.
+
+%post -n libobjc@base_ver@@variant@
+/sbin/ldconfig
+
+%postun -n libobjc@base_ver@@variant@
+/sbin/ldconfig
+# PACKAGE-END
+
+%package obj-c++
+Summary:      GNU Objective C++ Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc@base_ver@-objc = %{version}-%{release}
+Requires: gcc@base_ver@-c++ = %{version}-%{release}
+
+%description obj-c++
+This package contains the GNU Objective C++ compiler. Objective C++ is an
+object oriented language, created by Next Inc. and used in their
+Nextstep OS. The source code is available in the gcc package.
+
+
+%package -n cpp@base_ver@
+Summary:      The GCC Preprocessor
+License:        GPL-3.0+
+Group:        Development/Languages/C and C++
+
+%description -n cpp@base_ver@
+This Package contains just the preprocessor that is used by the X11
+packages.
+
+
+# PACKAGE-BEGIN
+%package ada@variant@
+Summary:      GNU Ada95 Compiler Based on GCC (GNAT)
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc@base_ver@@variant@ = %{version}-%{release}
+Requires: libada@base_ver@@variant@ = %{version}-%{release}
+
+%description ada@variant@
+This package contains an Ada95 compiler and associated development
+tools based on the GNU GCC technology. Ada95 is the object oriented
+successor of the Ada83 language. To build this package from source you
+must have installed a binary version to bootstrap the compiler.
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+%package -n libada@base_ver@@variant@
+Summary:      GNU Ada Runtime Libraries
+License:      GPL-3.0-with-GCC-exception
+Group:        System/Libraries
+Provides: libgnarl-4_7@variant@ = %{version}-%{release}
+Conflicts: libgnarl-4_7@variant@ < %{version}-%{release}
+Provides: libgnat-4_7@variant@ = %{version}-%{release}
+Conflicts: libgnat-4_7@variant@ < %{version}-%{release}
+
+%description -n libada@base_ver@@variant@
+This package contains the shared libraries required to run programs
+compiled with the GNU Ada compiler (GNAT) if they are compiled to use
+shared libraries. It also contains the shared libraries for the
+Implementation of the Ada Semantic Interface Specification (ASIS), the
+implementation of Distributed Systems Programming (GLADE) and the Posix
+1003.5 Binding (Florist).
+
+%post -n libada@base_ver@@variant@
+/sbin/ldconfig
+
+%postun -n libada@base_ver@@variant@
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+%package fortran@variant@
+Summary:      The GNU Fortran Compiler and Support Files
+License:        GPL-3.0+
+Group:        Development/Languages/Fortran
+Requires: gcc@base_ver@ = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgfortran3@variant@ >= %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath0@variant@ >= %{version}-%{release}
+%endif
+%else
+Requires: libgfortran@base_ver@@variant@ = %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath@base_ver@@variant@ = %{version}-%{release}
+%endif
+%endif
+
+%description fortran@variant@
+This is the Fortran compiler of the GNU Compiler Collection (GCC).
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+%package -n libgfortran@base_ver@@variant@
+Summary:      The GNU Fortran Compiler Runtime Library
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/Fortran
+%if 0%{!?build_optional_compiler:1}
+Provides: libgfortran3@variant@ = %{version}-%{release}
+Conflicts: libgfortran3@variant@ < %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath0@variant@ >= %{version}-%{release}
+%endif
+%else
+%ifarch %quadmath_arch
+Requires: libquadmath@base_ver@@variant@ = %{version}-%{release}
+%endif
+Autoprov: no
+%endif
+
+%description -n libgfortran@base_ver@@variant@
+The runtime library needed to run programs compiled with the Fortran compiler
+of the GNU Compiler Collection (GCC).
+
+%post -n libgfortran@base_ver@@variant@
+/sbin/ldconfig
+
+%postun -n libgfortran@base_ver@@variant@
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+%package -n libquadmath@base_ver@@variant@
+Summary:      The GNU Fortran Compiler Quadmath Runtime Library
+License:        LGPL-2.1
+Group:        Development/Languages/Fortran
+%if 0%{!?build_optional_compiler:1}
+Provides: libquadmath0@variant@ = %{version}-%{release}
+Conflicts: libquadmath0@variant@ < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libquadmath@base_ver@@variant@
+The runtime library needed to run programs compiled with the Fortran compiler
+of the GNU Compiler Collection (GCC) and quadruple precision floating point
+operations.
+
+%post -n libquadmath@base_ver@@variant@
+/sbin/ldconfig
+
+%postun -n libquadmath@base_ver@@variant@
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+%package -n libmudflap@base_ver@@variant@
+Summary:      The Mudflap Extension Runtime Library
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/C and C++
+Provides: libmudflap0@variant@ = %{version}-%{release}
+Conflicts: libmudflap0@variant@ < %{version}-%{release}
+Provides: libmudflapth0@variant@ = %{version}-%{release}
+Conflicts: libmudflapth0@variant@ < %{version}-%{release}
+
+%description -n libmudflap@base_ver@@variant@
+This is the Mudflap Extension Runtime Library.
+
+%post -n libmudflap@base_ver@@variant@
+/sbin/ldconfig
+
+%postun -n libmudflap@base_ver@@variant@
+/sbin/ldconfig
+# PACKAGE-END
+
+
+%package -n libgcj@base_ver@
+# LIBJAVA-DELETE-END
+Summary:      Java Runtime Library for gcc
+License:      GPL-2.0-with-classpath-exception
+Group:        System/Libraries
+%define gcj_sover 13
+Provides: libgcj%{gcj_sover} = %{version}-%{release}
+Conflicts: libgcj%{gcj_sover} < %{version}-%{release}
+Provides: libgij%{gcj_sover} = %{version}-%{release}
+Conflicts: libgij%{gcj_sover} < %{version}-%{release}
+Provides: libgcj-tools%{gcj_sover} = %{version}-%{release}
+Conflicts: libgcj-tools%{gcj_sover} < %{version}-%{release}
+
+%description -n libgcj@base_ver@
+This library is needed if you want to use the GNU Java compiler, gcj.
+Source code for this package is in gcc.
+
+%post -n libgcj@base_ver@
+/sbin/ldconfig
+
+%postun -n libgcj@base_ver@
+/sbin/ldconfig
+
+
+%package -n gcc@base_ver@-java
+Summary:      The GNU Java Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/Java
+Requires: gcc@base_ver@ = %{version}
+Requires: libgcj@base_ver@-devel = %{version}-%{release}
+
+%description -n gcc@base_ver@-java
+The Java compiler from the GCC-tools-suite.
+
+
+%package -n libgcj_bc@base_ver@
+Summary:      Fake library for BC-ABI compatibility.
+License:        GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+Provides: libgcj_bc1 = %{version}-%{release}
+Conflicts: libgcj_bc1 < %{version}-%{release}
+# libgcj_bc is special in that it just contains a symlink to
+# a proper libgcj version.  So require that library and add
+# provides for the shlib version as created at link time
+Requires: libgcj%{gcj_sover}
+%ifarch x86_64 
+Provides: libgcj_bc.so.1()(64bit)
+%else
+Provides: libgcj_bc.so.1
+%endif
+
+
+%description -n libgcj_bc@base_ver@
+A fake library that is used at link time only. It ensures that
+binaries built with the BC-ABI link against a constant SONAME.
+This way, BC-ABI binaries continue to work if the SONAME underlying
+libgcj.so changes.
+
+
+%package -n libgcj@base_ver@-jar
+Summary:      Java runtime library (jar files).
+License:        GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+
+%description -n libgcj@base_ver@-jar
+These are the jar files that go along with the gcj front end to gcc.
+
+
+%package -n libgcj@base_ver@-devel
+Summary:      Include Files and Libraries mandatory for Development.
+License:        GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+Requires: libstdc++@base_ver@-devel = %{version}
+Requires: libgcj%{gcj_sover} >= %{version}-%{release}
+Requires: libgcj_bc1 >= %{version}-%{release}
+Requires: libgcj@base_ver@-jar = %{version}-%{release}
+Requires: gtk2-devel
+Requires: libart_lgpl-devel
+Requires: glibc-devel
+Requires: zlib-devel
+%ifarch ia64
+Requires: libunwind-devel
+%endif
+
+%description -n libgcj@base_ver@-devel
+This package contains all necessary include files and libraries needed
+to develop applications that require these.
+
+
+%package -n gcc@base_ver@-gij
+Summary:      Java Bytecode Interpreter for gcc
+License:      GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+Requires: libgcj%{gcj_sover} >= %{version}-%{release}
+
+%description -n gcc@base_ver@-gij
+This package contains the java bytecode interpreter gij and related tools.
+
+# LIBFFI-DELETE-END
+# PACKAGE-BEGIN
+%package -n libffi@base_ver@@variant@
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4@variant@ = %{version}-%{release}
+Conflicts: libffi4@variant@ < %{version}-%{release}
+
+%description -n libffi@base_ver@@variant@
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post -n libffi@base_ver@@variant@
+/sbin/ldconfig
+
+%postun -n libffi@base_ver@@variant@
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+%package -n libffi@base_ver@-devel@variant@
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4@variant@ >= %{version}-%{release}
+Provides: libffi-devel@variant@ = %{version}-%{release}
+Conflicts: libffi-devel@variant@ < %{version}-%{release}
+
+%description -n libffi@base_ver@-devel@variant@
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+
+%package -n gcc@base_ver@-testresults
+# GCC-TESTSUITE-DELETE-END
+Summary:      Testsuite results
+License:       SUSE-Public-Domain
+Group:        Development/Languages/C and C++
+
+%description -n gcc@base_ver@-testresults
+Results from running the gcc and target library testsuites.
+
+
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+
+# Versionspecific directories
+%define versmainlibdir %{libsubdir}
+%define versmainlibdirbi32 %{libsubdir}/32
+%define versmainlibdirbi64 %{libsubdir}/64
+%if %{build_primary_64bit}
+%define versmainlibdirbi %{versmainlibdirbi32}
+%else
+%define versmainlibdirbi %{versmainlibdirbi64}
+%endif
+
+%if 0%{?build_optional_compiler:1}
+%define mainlibdir %{versmainlibdir}
+%define mainlibdirbi32 %{versmainlibdirbi32}
+%define mainlibdirbi64 %{versmainlibdirbi64}
+%define noflibdir %{versnoflibdir}
+%define mainlibdirbi %{versmainlibdirbi}
+%else
+%define mainlibdir %{_libdir}
+%define mainlibdirbi32 %{_prefix}/lib
+%define mainlibdirbi64 %{_prefix}/lib64
+%define noflibdir %{_prefix}/lib/nof
+%if %{build_primary_64bit}
+%define mainlibdirbi %{mainlibdirbi32}
+%else
+%define mainlibdirbi %{mainlibdirbi64}
+%endif
+%endif
+
+
+# Now define a few macros that make it easy to package libs and
+# related files just to the right package, without caring for the
+# exact path the files are in.
+#   %mainlib  package X from all dirs that belong to the main package
+#   %biarchlib   package X from all dirs that belong to the -32/64bit package
+# by default, nof libs go where the 32bit libs go.
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%endif
+%define biarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define biarchlib() %{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%else
+%define biarchlib() %{mainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%endif
+%define versbiarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%else
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+
+%if 0%{?building_libffi:1}
+make stage1-bubble $PARALLEL
+make all-target-libffi $PARALLEL
+%else
+# Only run profiled bootstrap on archs where it works
+#%ifarch %ix86 x86_64 ppc ppc64 ia64
+#make profiledbootstrap-lean STAGE1_CFLAGS="-O -g" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%else
+%ifarch %arm
+STAGE1_FLAGS="-O0"
+%else
+STAGE1_FLAGS="-O -g"
+%endif
+#make bootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%endif
+#make -C gcc proto
+make info
+%if 0%{?run_tests:1}
+echo "Run testsuite"
+(make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
+make -k check $PARALLEL || true
+mkdir ../testresults
+../contrib/test_summary | tee ../testresults/test_summary.txt
+%endif
+%endif
+
+%install
+export NO_BRP_CHECK_BYTECODE_VERSION=true
+cd obj-%{GCCDIST}
+# GCC-TESTSUITE-DELETE-BEGIN
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
+%if 0%{?building_libffi:1}
+make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
+%else
+%if 0%{?building_libjava:1}
+make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
+make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
+# install-common also installs collect2, gcov and the g++ and gfortran driver
+%if %{build_cp}
+rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
+%endif
+%if %{build_fortran}
+rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
+%endif
+rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
+rm $RPM_BUILD_ROOT%{libsubdir}/collect2
+%else
+make install DESTDIR=$RPM_BUILD_ROOT
+%if %{build_java}
+make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
+rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
+rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{libsubdir}/jc1
+rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
+%endif
+%endif
+%endif
+
+# Remove libffi installed files if we did not want to build it
+%if !0%{?building_libffi:1}
+rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
+%if %{biarch}
+  rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
+%endif
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
+%endif
+
+# Remove some useless .la files
+for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
+    libmudflap libmudflapth libgomp libstdc++ libsupc++ libgcj-tools libgij; do
+  rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
+%if %{biarch}
+  rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
+%endif
+done
+
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
+%if %{biarch}
+%if %{build_primary_64bit}
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
+%else
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
+%endif
+%endif
+
+# LIBFFI-DELETE-BEGIN
+# LIBJAVA-DELETE-BEGIN
+%if %{build_cp}
+# Merge multilib c++config.h to allow omitting the duplicate and
+# identical other arch specific headers
+dir_ml=
+cxxconfig="`find %{GCCDIST}/libstdc++-v3/include -name c++config.h`"
+for i in `find %{GCCDIST}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do
+  if ! diff -up $cxxconfig $i; then
+    file_32=x
+    file_64=x
+    case $i in
+      %{GCCDIST}/32/*)
+        file_32=$i
+        file_64=$cxxconfig
+        dir_ml=32
+       ;;
+      %{GCCDIST}/64/*)
+        file_32=$cxxconfig
+       file_64=$i
+        dir_ml=64
+       ;;
+    esac
+    if ! ( test -f "$file_32" && test -f "$file_64" ); then
+      echo "Urgs?"
+      exit 1
+    fi
+    
+    cat > $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF
+#ifndef _CPP_CPPCONFIG_WRAPPER
+#define _CPP_CPPCONFIG_WRAPPER 1
+#include <bits/wordsize.h>
+#if __WORDSIZE == 32
+`cat $file_32`
+#else
+`cat $file_64`
+#endif
+#endif
+EOF
+    break
+  fi
+done
+rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]*
+if ! test -z "$dir_ml"; then
+  ln -s . $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml
+fi
+%endif
+# LIBJAVA-DELETE-END
+
+%if 0%{!?build_optional_compiler:1}
+# move shared libs from versionspecific dir to main libdir
+for libname in \
+%if 0%{?building_libjava:1}
+  libgcj libgij libgcj-tools \
+%else
+%if %{build_fortran}
+  libgfortran \
+%ifarch %quadmath_arch
+  libquadmath \
+%endif
+%endif
+%if %{build_objc}
+  libobjc \
+%endif
+%if %{build_cp}
+  libstdc++ \
+%endif
+  libgomp \
+%if %{build_with_mudflap}
+  libmudflap libmudflapth \
+%endif
+%endif
+    ; do
+  for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do
+    mv $lib $RPM_BUILD_ROOT%{mainlibdir}/
+  done
+  ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
+         $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so
+%if %{biarch}
+  if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
+    for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do
+      mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/
+    done
+    ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
+         $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so
+  fi
+%endif
+done
+%if %{build_cp}
+%if !0%{?building_libjava:1}
+# And we want to move the shlib gdb pretty printers to a more sane
+# place so ldconfig does not complain
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}
+mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/
+sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py
+%if %{biarch}
+  if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
+    mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}
+    mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/
+    sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py
+  fi
+%endif
+%endif
+%endif
+%if 0%{?building_libjava:1}
+# libgcj_bc is special as the .so file is actually a different
+# library as the library refered to by the SONAME which should
+# be a simple link to our libgcj.
+for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name libgcj_bc.so.*`; do
+  rm $lib
+done
+ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdir}/libgcj_bc.so.1
+%if %{biarch_libjava}
+for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name libgcj_bc.so.*`; do
+  rm $lib
+done
+ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdirbi}/libgcj_bc.so.1
+%endif
+%endif
+%endif
+
+# LIBJAVA-DELETE-BEGIN
+%if 0%{!?build_optional_compiler:1}
+# Move libgcc_s around
+if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so
+  ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/
+fi
+chmod a+x $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s}
+%if %{biarch}
+%if %{build_primary_64bit}
+if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so
+  ln -sf /lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/
+fi
+ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so
+chmod a+x $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s}
+%else
+# 32-bit biarch systems
+if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so
+  ln -sf /lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/
+fi
+ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so
+chmod a+x $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+%else
+# Move libgcc_s around
+mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/
+if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so
+  ln -sf %{versmainlibdir}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/
+fi
+chmod a+x $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so.%{libgcc_s}
+%if %{biarch}
+%if %{build_primary_64bit}
+mv $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/
+if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so
+  ln -sf %{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/
+fi
+ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so
+chmod a+x $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s}
+%else
+# 32-bit biarch systems
+mv $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/
+if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so
+  ln -sf %{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/
+fi
+ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so
+chmod a+x $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+%endif
+
+# Provide a defaults.spec file which adds a proper rpath
+%if 0%{?build_optional_compiler:1}
+cat > $RPM_BUILD_ROOT%{libsubdir}/defaults.spec << EOF
+*link:
++ %%{!m32:%%{!m64:-rpath=%{libsubdir}}} %%{m32:-rpath=%{libsubdir}/32} %%{m64:-rpath=%{libsubdir}/64}
+EOF
+%endif
+# LIBJAVA-DELETE-END
+# LIBFFI-DELETE-END
+
+%if %{build_ada}
+mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
+ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
+ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
+chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
+%if %{biarch}
+mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
+ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
+ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
+chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
+%endif
+%endif
+
+rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
+
+# Remove some crap from the .la files:
+for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
+  echo "changing $l"
+# -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
+  sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
+      -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
+      -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
+      -e '/^dependency_libs/s|-L[^ ]* ||g' \
+%if %{biarch}
+%if %{build_primary_64bit}
+      -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
+      -e '/^libdir/s|lib64/\.\./||' \
+%else
+      -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
+%endif
+%endif
+      < $l  > $l.new
+  mv $l.new $l
+done
+
+# GCC-TESTSUITE-DELETE-END
+%if 0%{?run_tests:1} 
+cp `find . -name "*.sum"` ../testresults/
+cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
+chmod 644 ../testresults/*
+%endif
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+%if %{build_cp}
+# Find C++ and Java headers
+find $RPM_BUILD_ROOT%{_prefix}/include/c++ \
+  -regex ".*/\(org\|gcj\|gnu\|java\|javax\)" -prune \
+  -o \( -type d -printf "%%%%dir " , \
+        -printf "%{_prefix}/include/c++/%%P\n" \) > ../c++-headers
+%endif
+# LIBFFI-DELETE-END
+# Remove files that we do not need to clean up filelist
+rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
+#rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/root
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/curses.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-*
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sound
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/features.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/ncurses.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/stdio.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/X11
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/obstack.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/spe.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/tgmath.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys
+# no plugins
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
+rm -f  $RPM_BUILD_ROOT%{_infodir}/dir
+rm -f  $RPM_BUILD_ROOT%{_prefix}/bin/gccbug%{binsuffix}
+
+%if !0%{?building_libjava:1}%{?building_libffi:1}
+# delete compile flag tracking from crt files
+crt_list=$RPM_BUILD_ROOT%{versmainlibdir}/crt*.o
+%if %{biarch}
+%if %{build_primary_64bit}
+crt32_list=$RPM_BUILD_ROOT%{versmainlibdirbi32}/crt*.o
+%else
+crt64_list=$RPM_BUILD_ROOT%{versmainlibdirbi64}/crt*.o
+%endif
+%endif
+for o in $crt_list $crt32_list $crt64_list; do
+  objcopy -R ".comment.SUSE.OPTs" $o
+done
+%endif
+
+%if 0%{?building_libjava:1}
+# gcj -static doesn't work properly anyway, unless using --whole-archive
+# let's save the space instead.
+find $RPM_BUILD_ROOT -name libgcj.a \
+       -o -name libgcj-tools.a \
+       -o -name libgij.a \
+       -o -name libjvm.a \
+       -o -name libgcj_bc.a \
+  | xargs rm -f
+
+find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
+  sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
+
+# security files have broken install locations, also they cause conflicts
+# between libgcj versions.  Simply delete them here, libgcj will use its
+# defaults in this case (which is what these files contain anyway).
+rm $RPM_BUILD_ROOT%{_libdir}/logging.properties
+rm -r $RPM_BUILD_ROOT%{_libdir}/security
+%endif
+
+%if 0%{?building_libffi:1}
+# Move libffi headers, remove empty libffi libtool file
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
+mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
+mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
+rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
+%if %{biarch}
+rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
+%endif
+# Generate a simple pkg-config file
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
+echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
+%endif
+
+%if %{build_java}
+%if !%{build_libjava}
+rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
+%endif
+rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
+rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
+%endif
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+%if %{build_nof}
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/nof/libiberty.a
+%endif
+%if %{biarch}
+%if %{build_primary_64bit}
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
+%else
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
+%endif
+%endif
+rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
+rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
+
+# LIBFFI-DELETE-BEGIN
+%if 0%{?building_libjava:1}
+# For building libjava only we need to delete other info docs
+rm $RPM_BUILD_ROOT%{_infodir}/cp-tools.info*
+# Remove stale manpages for binaries we do not build
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gjdoc%{binsuffix}.1
+# For building the java frontend we need to copy the ecj jar
+mkdir -p $RPM_BUILD_ROOT%{libsubdir}
+cp $RPM_SOURCE_DIR/ecj.jar $RPM_BUILD_ROOT%{libsubdir}
+%else
+# For regular build, some info files do not get renamed properly.
+# Do so here.
+mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info
+%if %{build_fortran} 
+%ifarch %quadmath_arch
+mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
+%endif
+%endif
+%if %{build_ada}
+mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info
+mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info
+mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info
+%endif
+%endif
+
+# LIBJAVA-DELETE-BEGIN
+cd ..
+%find_lang gcc@base_ver@-locale --all-name
+
+%post info
+%install_info --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
+%if %{build_fortran} 
+%install_info --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
+%ifarch %quadmath_arch
+%install_info --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
+%endif
+%endif
+%if %{build_java}
+%install_info --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
+%endif
+%if %{build_ada}
+%install_info --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} --section="GNU Ada tools" --entry="* GNAT User's Guide: (gnat_ugn). GNAT User's Guide for Unix Platforms" %{_infodir}/gnat_ugn%{binsuffix}.info.gz
+%endif
+
+%postun info
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
+%if %{build_fortran}
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
+%ifarch %quadmath_arch
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
+%endif
+%endif
+%if %{build_java}
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
+%endif
+%if %{build_ada}
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_ugn%{binsuffix}.info.gz
+%endif
+
+
+%files
+%defattr(-,root,root)
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%dir %{libsubdir}/include
+%dir %{libsubdir}/include-fixed
+%if %{biarch}
+%if %{build_primary_64bit}
+%dir %{libsubdir}/32
+%else
+%dir %{libsubdir}/64
+%endif
+%endif
+%if %{build_nof}
+%dir %{libsubdir}/nof
+%endif
+%{_prefix}/bin/gcc%{binsuffix}
+%{_prefix}/bin/gcov%{binsuffix}
+%{_prefix}/bin/gcc-ar%{binsuffix}
+%{_prefix}/bin/gcc-nm%{binsuffix}
+%{_prefix}/bin/gcc-ranlib%{binsuffix}
+%{libsubdir}/collect2
+%{libsubdir}/lto1
+%{libsubdir}/lto-wrapper
+%{libsubdir}/liblto_plugin.so*
+%{libsubdir}/include-fixed/README
+%{libsubdir}/include-fixed/limits.h
+%{libsubdir}/include-fixed/syslimits.h
+%{libsubdir}/include/omp.h
+%{libsubdir}/include/float.h
+%{libsubdir}/include/iso646.h
+%{libsubdir}/include/stdarg.h
+%{libsubdir}/include/stdbool.h
+%{libsubdir}/include/stdfix.h
+%{libsubdir}/include/stddef.h
+%{libsubdir}/include/uchar.h
+%{libsubdir}/include/unwind.h
+%{libsubdir}/include/varargs.h
+%{libsubdir}/include/stdint.h
+%{libsubdir}/include/stdint-gcc.h
+%{libsubdir}/include/stdnoreturn.h
+%{libsubdir}/include/stdalign.h
+%ifarch %arm
+%{libsubdir}/include/mmintrin.h
+%{libsubdir}/include/arm_neon.h
+%{libsubdir}/include/unwind-arm-common.h
+%endif
+%ifarch %ix86 x86_64
+%{libsubdir}/include/cross-stdarg.h
+%{libsubdir}/include/cpuid.h
+%{libsubdir}/include/mm3dnow.h
+%{libsubdir}/include/mmintrin.h
+%{libsubdir}/include/ammintrin.h
+%{libsubdir}/include/bmmintrin.h
+%{libsubdir}/include/emmintrin.h
+%{libsubdir}/include/immintrin.h
+%{libsubdir}/include/avxintrin.h
+%{libsubdir}/include/pmmintrin.h
+%{libsubdir}/include/xmmintrin.h
+%{libsubdir}/include/tmmintrin.h
+%{libsubdir}/include/nmmintrin.h
+%{libsubdir}/include/smmintrin.h
+%{libsubdir}/include/wmmintrin.h
+%{libsubdir}/include/x86intrin.h
+%{libsubdir}/include/ia32intrin.h
+%{libsubdir}/include/mm_malloc.h
+%{libsubdir}/include/fma4intrin.h
+%{libsubdir}/include/xopintrin.h
+%{libsubdir}/include/lwpintrin.h
+%{libsubdir}/include/popcntintrin.h
+%{libsubdir}/include/bmiintrin.h
+%{libsubdir}/include/tbmintrin.h
+%{libsubdir}/include/avx2intrin.h
+%{libsubdir}/include/bmi2intrin.h
+%{libsubdir}/include/fmaintrin.h
+%{libsubdir}/include/lzcntintrin.h
+%{libsubdir}/include/f16cintrin.h
+%endif
+%if %{build_with_mudflap}
+%{libsubdir}/include/mf-runtime.h
+%endif
+%versmainlib *crt*.o
+%versmainlib libgcc*.a
+%versmainlib libgcov.a
+%versmainlib libgcc_s*.so
+%if %{build_with_mudflap}
+%versmainlib libmudflap.a
+%versmainlib libmudflap.so
+%versmainlib libmudflapth.a
+%versmainlib libmudflapth.so
+%endif
+%versmainlib libgomp.so
+%versmainlib libgomp.a
+%versmainlib libgomp.spec
+%doc %{_mandir}/man1/gcc%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gcov%{binsuffix}.1.gz
+%if 0%{?build_optional_compiler:1}
+%{libsubdir}/defaults.spec
+%endif
+
+%if %{separate_biarch}
+%files -n gcc@base_ver@%{separate_biarch_suffix}
+%defattr(-,root,root)
+%versbiarchlib *crt*.o
+%versbiarchlib libgcc*.a
+%versbiarchlib libgcov.a
+%versbiarchlib libgcc_s*.so
+%if %{build_with_mudflap}
+%versbiarchlib libmudflap.a
+%versbiarchlib libmudflap.so
+%versbiarchlib libmudflapth.a
+%versbiarchlib libmudflapth.so
+%endif
+%versbiarchlib libgomp.so
+%versbiarchlib libgomp.a
+%versbiarchlib libgomp.spec
+%endif
+
+%files locale -f gcc@base_ver@-locale.lang
+
+%if %{build_cp}
+%files c++
+%defattr(-,root,root)
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%{_prefix}/bin/g++%{binsuffix}
+%doc %{_mandir}/man1/g++%{binsuffix}.1.gz
+%{libsubdir}/cc1plus
+
+%files -n libstdc++@base_ver@
+%defattr(-,root,root)
+%if %{build_nof}
+%dir %{noflibdir}
+%endif
+%mainlib libstdc++.so.*
+
+%if %{separate_biarch}
+%files -n libstdc++@base_ver@%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libstdc++.so.*
+%endif
+
+%files -n libstdc++@base_ver@-devel -f c++-headers
+%defattr(-,root,root)
+%versmainlib libstdc++.a
+%versmainlib libstdc++.so
+%versmainlib libsupc++.a
+%dir %{_datadir}/gdb
+%dir %{_datadir}/gdb/auto-load
+%dir %{_datadir}/gdb/auto-load%{_prefix}
+%dir %{_datadir}/gdb/auto-load/%{mainlibdir}
+%{_datadir}/gdb/auto-load/%{mainlibdir}/libstdc++.so.*-gdb.py
+%{_datadir}/gcc%{binsuffix}
+
+%if %{separate_biarch}
+%files -n libstdc++@base_ver@-devel%{separate_biarch_suffix}
+%defattr(-,root,root)
+%versbiarchlib libstdc++.a
+%versbiarchlib libstdc++.so
+%versbiarchlib libsupc++.a
+%dir %{_datadir}/gdb/auto-load/%{mainlibdirbi}
+%{_datadir}/gdb/auto-load/%{mainlibdirbi}/libstdc++.so.*-gdb.py
+%endif
+
+%files -n libstdc++@base_ver@-doc
+%defattr(-,root,root)
+%doc libstdc++-v3/doc/html
+%endif
+
+%files -n libgcc@base_ver@
+%defattr(-,root,root)
+%if 0%{!?build_optional_compiler:1}
+/%{_lib}/libgcc_s.so.%{libgcc_s}
+%if %{build_nof}
+%dir /lib/nof
+/lib/nof/libgcc_s.so.%{libgcc_s}
+%endif
+%if %{biarch}
+%if %{build_primary_64bit}
+%if !%{separate_bi32}
+/lib/libgcc_s.so.%{libgcc_s}
+%endif
+%else
+%if !%{separate_bi64}
+/lib64/libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+%endif
+%else
+%versmainlib libgcc_s.so.%{libgcc_s}
+%endif
+
+%if %{separate_bi64}
+%files -n libgcc@base_ver@-64bit
+%defattr(-,root,root)
+%if 0%{!?build_optional_compiler:1}
+/lib64/libgcc_s.so.%{libgcc_s}
+%else
+%versbiarchlib libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+
+%if %{separate_bi32}
+%files -n libgcc@base_ver@-32bit
+%defattr(-,root,root)
+%if 0%{!?build_optional_compiler:1}
+/lib/libgcc_s.so.%{libgcc_s}
+%else
+%versbiarchlib libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+
+
+%files -n libgomp@base_ver@
+%defattr(-,root,root)
+%mainlib libgomp.so.1*
+
+%if %{separate_biarch}
+%files -n libgomp@base_ver@%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libgomp.so.1*
+%endif
+
+
+%if %{build_fortran}
+%files fortran
+%defattr(-,root,root)
+%dir %{libsubdir}/finclude
+%{_prefix}/bin/gfortran%{binsuffix}
+%{libsubdir}/f951
+%{libsubdir}/finclude/*
+%versmainlib libgfortran.a
+%versmainlib libgfortran.so
+%versmainlib libgfortran.spec
+%versmainlib libgfortranbegin.a
+%versmainlib libcaf_single.a
+%ifarch %quadmath_arch
+%{libsubdir}/include/quadmath.h
+%{libsubdir}/include/quadmath_weak.h
+%versmainlib libquadmath.a
+%versmainlib libquadmath.so
+%endif
+%doc %{_mandir}/man1/gfortran%{binsuffix}.1.gz
+
+%if %{separate_biarch}
+%files fortran%{separate_biarch_suffix}
+%defattr(-,root,root)
+%versbiarchlib libgfortran.a
+%versbiarchlib libgfortran.so
+%versbiarchlib libgfortran.spec
+%versbiarchlib libgfortranbegin.a
+%versbiarchlib libcaf_single.a
+%ifarch %quadmath_arch
+%versbiarchlib libquadmath.a
+%versbiarchlib libquadmath.so
+%endif
+%endif
+
+%files -n libgfortran@base_ver@
+%defattr(-,root,root)
+%mainlib libgfortran.so.*
+
+%if %{separate_biarch}
+%files -n libgfortran@base_ver@%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libgfortran.so.*
+%endif
+
+%ifarch %quadmath_arch
+%files -n libquadmath@base_ver@
+%defattr(-,root,root)
+%mainlib libquadmath.so.*
+
+%if %{separate_biarch}
+%files -n libquadmath@base_ver@%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libquadmath.so.*
+%endif
+%endif
+%endif
+
+%if %{build_with_mudflap}
+%files -n libmudflap@base_ver@
+%defattr(-,root,root)
+%mainlib libmudflap.so.0*
+%mainlib libmudflapth.so.0*
+
+%if %{separate_biarch}
+%files -n libmudflap@base_ver@%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libmudflap.so.0*
+%biarchlib libmudflapth.so.0*
+%endif
+%endif
+
+%files info
+%defattr(-,root,root)
+%doc %{_infodir}/cpp%{binsuffix}.info*.gz
+%doc %{_infodir}/cppinternals%{binsuffix}.info*.gz
+%doc %{_infodir}/gcc%{binsuffix}.info*.gz
+%doc %{_infodir}/gccint%{binsuffix}.info*.gz
+%doc %{_infodir}/gccinstall%{binsuffix}.info*.gz
+%doc %{_infodir}/libgomp%{binsuffix}.info*.gz
+%if %{build_fortran}
+%doc %{_infodir}/gfortran%{binsuffix}.info*.gz
+%ifarch %quadmath_arch
+%doc %{_infodir}/libquadmath%{binsuffix}.info*.gz
+%endif
+%endif
+%if %{build_java}
+%doc %{_infodir}/gcj%{binsuffix}.info*.gz
+%endif
+%if %{build_ada}
+%doc %{_infodir}/gnat-style%{binsuffix}.info*gz
+%doc %{_infodir}/gnat_rm%{binsuffix}.info*gz
+%doc %{_infodir}/gnat_ugn%{binsuffix}.info*gz
+%endif
+
+%files -n cpp@base_ver@
+%defattr(-,root,root)
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%{_prefix}/bin/cpp%{binsuffix}
+%{libsubdir}/cc1
+#%{libsubdir}/specs
+%doc %{_mandir}/man1/cpp%{binsuffix}.1.gz
+
+%if %{build_objc}
+%files objc
+%defattr(-,root,root)
+%{libsubdir}/cc1obj
+%{libsubdir}/include/objc
+%versmainlib libobjc.a
+%versmainlib libobjc.so
+
+%if %{separate_biarch}
+%files objc%{separate_biarch_suffix}
+%defattr(-,root,root)
+%versbiarchlib libobjc.a
+%versbiarchlib libobjc.so
+%endif
+
+%files -n libobjc@base_ver@
+%defattr(-,root,root)
+%mainlib libobjc.so.*
+
+%if %{separate_biarch}
+%files -n libobjc@base_ver@%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libobjc.so.*
+%endif
+%endif
+
+
+%if %{build_objcp}
+%files obj-c++
+%defattr(-,root,root)
+%{libsubdir}/cc1objplus
+%endif
+
+
+%if %{build_ada}
+%files ada
+%defattr(-,root,root)
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%{_prefix}/bin/gnat*
+%dir %{versmainlibdir}/adainclude
+%dir %{versmainlibdir}/adalib
+%{versmainlibdir}/adainclude
+%{versmainlibdir}/adalib/*.ali
+%{versmainlibdir}/adalib/*.a
+%{versmainlibdir}/adalib/libgnarl.so
+%{versmainlibdir}/adalib/libgnat.so
+%{versmainlibdir}/gnat1
+
+%if %{separate_biarch}
+%files ada%{separate_biarch_suffix}
+%defattr(-,root,root)
+%dir %{versmainlibdirbi}/adainclude
+%dir %{versmainlibdirbi}/adalib
+%{versmainlibdirbi}/adainclude
+%{versmainlibdirbi}/adalib/*.ali
+%{versmainlibdirbi}/adalib/*.a
+%{versmainlibdirbi}/adalib/libgnarl.so
+%{versmainlibdirbi}/adalib/libgnat.so
+%endif
+
+%files -n libada@base_ver@
+%defattr(-,root,root)
+%mainlib libgnarl-*.so
+%mainlib libgnat-*.so
+
+%if %{separate_biarch}
+%files -n libada@base_ver@%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libgnarl-*.so
+%biarchlib libgnat-*.so
+%endif
+%endif
+# LIBJAVA-DELETE-END
+
+
+%if %{build_java}
+%if 0%{?building_libjava:1}
+%files -n gcc@base_ver@-java
+%defattr(-,root,root)
+%{_prefix}/bin/gcj%{binsuffix}
+%{_prefix}/bin/gcjh%{binsuffix}
+%{_prefix}/bin/gcj-dbtool%{binsuffix}
+%{_prefix}/bin/jcf-dump%{binsuffix}
+%{_prefix}/bin/jv-convert%{binsuffix}
+%{_prefix}/bin/gc-analyze%{binsuffix}
+%{_prefix}/bin/aot-compile%{binsuffix}
+%{_prefix}/bin/rebuild-gcj-db%{binsuffix}
+%{libsubdir}/jc1
+%{libsubdir}/jvgenmain
+%{libsubdir}/ecj.jar
+%{libsubdir}/ecj1
+%doc %{_mandir}/man1/gcj%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gcjh%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gcj-dbtool%{binsuffix}.1.gz
+%doc %{_mandir}/man1/jcf-dump%{binsuffix}.1.gz
+%doc %{_mandir}/man1/jv-convert%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gc-analyze%{binsuffix}.1.gz
+%doc %{_mandir}/man1/aot-compile%{binsuffix}.1.gz
+%doc %{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1.gz
+%endif
+%endif
+
+%if %{build_java}
+%if %{build_libjava}
+%files -n libgcj@base_ver@
+%defattr(-,root,root)
+%dir %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/classmap.db
+# We usually do not multilib libjava
+%if %{biarch_libjava}
+%versbiarchlib libgcj.la
+%biarchlib libgcj.so.*
+%biarchlib libgij.so.*
+%biarchlib libgcj-tools.so.*
+%else
+%versmainlib libgcj.la
+%mainlib libgcj.so.*
+%mainlib libgij.so.*
+%mainlib libgcj-tools.so.*
+%endif
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.la
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.so
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.la
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.so
+
+%files -n libgcj_bc@base_ver@
+%defattr(-,root,root)
+%if %{biarch_libjava}
+%biarchlib libgcj_bc.so.*
+%else
+%mainlib libgcj_bc.so.*
+%endif
+
+%files -n libgcj@base_ver@-jar
+%defattr(-,root,root)
+%{_prefix}/share/java/libgcj-%{gcc_dir_version}.jar
+%{_prefix}/share/java/libgcj-tools-%{gcc_dir_version}.jar
+
+%files -n libgcj@base_ver@-devel
+%defattr(-,root,root)
+%dir %{_prefix}/include/c++
+%dir %{libsubdir}
+%dir %{libsubdir}/include
+%dir %{gxxinclude}
+%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
+%{libsubdir}/include/jawt.h
+%{libsubdir}/include/jawt_md.h
+%{libsubdir}/include/jni.h
+%{libsubdir}/include/jni_md.h
+%{libsubdir}/include/jvmpi.h
+%{gxxinclude}/gnu
+%{gxxinclude}/gcj
+%{gxxinclude}/java
+%{gxxinclude}/javax
+%{gxxinclude}/org
+%{gxxinclude}/sun
+%{libsubdir}/include/gcj
+%if %{biarch_libjava}
+%versbiarchlib libgcj.so
+%versbiarchlib libgcj.spec
+%versbiarchlib libgcj-tools.so
+%versbiarchlib libgij.so
+%versbiarchlib libgcj_bc.so
+%else
+%versmainlib libgcj.so
+%versmainlib libgcj.spec
+%versmainlib libgcj-tools.so
+%versmainlib libgij.so
+%versmainlib libgcj_bc.so
+%endif
+
+%files -n gcc@base_ver@-gij
+%defattr(-,root,root)
+%{_prefix}/bin/gij%{binsuffix}
+%{_prefix}/bin/gappletviewer%{binsuffix}
+%{_prefix}/bin/gjar%{binsuffix}
+%{_prefix}/bin/gjarsigner%{binsuffix}
+%{_prefix}/bin/gjavah%{binsuffix}
+%{_prefix}/bin/gkeytool%{binsuffix}
+%{_prefix}/bin/gnative2ascii%{binsuffix}
+%{_prefix}/bin/gorbd%{binsuffix}
+%{_prefix}/bin/grmic%{binsuffix}
+%{_prefix}/bin/grmid%{binsuffix}
+%{_prefix}/bin/grmiregistry%{binsuffix}
+%{_prefix}/bin/gserialver%{binsuffix}
+%{_prefix}/bin/gtnameserv%{binsuffix}
+%doc %{_mandir}/man1/gij%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gappletviewer%{binsuffix}.1.gz
+%doc %{_mandir}/man1/grmic%{binsuffix}.1.gz
+%doc %{_mandir}/man1/grmid%{binsuffix}.1.gz
+%doc %{_mandir}/man1/grmiregistry%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gkeytool%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gjar%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gjarsigner%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gjavah%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gnative2ascii%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gorbd%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gserialver%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gtnameserv%{binsuffix}.1.gz
+%endif
+%endif
+# LIBFFI-DELETE-END
+
+%if %{build_java}
+%if 0%{?building_libffi:1}
+%files -n libffi@base_ver@
+%defattr(-,root,root)
+%mainlib libffi.so.*
+
+%if %{separate_biarch}
+%files -n libffi@base_ver@%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libffi.so.*
+%endif
+
+%files -n libffi@base_ver@-devel
+%defattr(-,root,root)
+%{_prefix}/include/ffi.h
+%{_prefix}/include/ffitarget.h
+%mainlib libffi.so
+%mainlib libffi.a
+%{_libdir}/pkgconfig/libffi.pc
+%doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
+%doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
+%doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
+
+%if %{separate_biarch}
+%files -n libffi@base_ver@-devel%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libffi.so
+%biarchlib libffi.a
+%endif
+%endif
+%endif
+# GCC-TESTSUITE-DELETE-END
+
+%if 0%{?run_tests:1}
+%files -n gcc@base_ver@-testresults
+%defattr(-,root,root)
+%doc testresults/test_summary.txt
+%doc testresults/*.sum
+%doc testresults/*.log
+%endif
+
+
+%changelog
diff --git a/packaging/gcc4-ppc64-m32-m64-multilib-only.patch b/packaging/gcc4-ppc64-m32-m64-multilib-only.patch
deleted file mode 100644 (file)
index a82cea2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: gcc/config/rs6000/t-linux64
-===================================================================
---- gcc/config/rs6000/t-linux64.orig   2011-11-03 16:27:34.000000000 +0100
-+++ gcc/config/rs6000/t-linux64        2011-11-03 17:08:21.000000000 +0100
-@@ -26,10 +26,10 @@
- # it doesn't tell anything about the 32bit libraries on those systems.  Set
- # MULTILIB_OSDIRNAMES according to what is found on the target.
--MULTILIB_OPTIONS        = m64/m32 msoft-float
--MULTILIB_DIRNAMES       = 64 32 nof
-+MULTILIB_OPTIONS        = m64/m32
-+MULTILIB_DIRNAMES       = 64 32
- MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
--MULTILIB_EXCEPTIONS     = m64/msoft-float
--MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
-+MULTILIB_EXCEPTIONS     =
-+MULTILIB_EXCLUSIONS     =
- MULTILIB_OSDIRNAMES   = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
- MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
diff --git a/packaging/gcc41-ia64-stack-protector.patch b/packaging/gcc41-ia64-stack-protector.patch
deleted file mode 100644 (file)
index b80cf59..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-2005-07-08  Jakub Jelinek  <jakub@redhat.com>
-
-       * config/ia64/ia64.h (FRAME_GROWS_DOWNWARD): Define to 1 if
-       -fstack-protect.
-       * config/ia64/ia64.c (ia64_compute_frame_size): Make sure
-       size is a multiple of 16 if FRAME_GROWS_DOWNWARD.
-       (ia64_initial_elimination_offset): Support FRAME_GROWS_DOWNWARD
-       layout.
-       * config/ia64/linux.h (TARGET_LIBC_PROVIDES_SSP): Define.
-       * config/ia64/ia64.md (stack_protect_set, stack_protect_test): New
-       expanders.
-
-Index: gcc/config/ia64/linux.h
-===================================================================
---- gcc/config/ia64/linux.h.orig       2011-11-03 16:27:28.000000000 +0100
-+++ gcc/config/ia64/linux.h    2011-11-04 11:39:46.000000000 +0100
-@@ -77,6 +77,11 @@ do {                                                \
- #undef LINK_EH_SPEC
- #define LINK_EH_SPEC ""
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+/* IA-64 glibc provides __stack_chk_guard in [r13-8].  */
-+#define TARGET_THREAD_SSP_OFFSET      -8
-+#endif
-+
- /* Put all *tf routines in libgcc.  */
- #undef LIBGCC2_HAS_TF_MODE
- #define LIBGCC2_HAS_TF_MODE 1
-Index: gcc/config/ia64/ia64.c
-===================================================================
---- gcc/config/ia64/ia64.c.orig        2011-11-03 16:27:28.000000000 +0100
-+++ gcc/config/ia64/ia64.c     2011-11-04 11:39:47.000000000 +0100
-@@ -2797,6 +2797,9 @@ ia64_compute_frame_size (HOST_WIDE_INT s
-   else
-     pretend_args_size = crtl->args.pretend_args_size;
-+  if (FRAME_GROWS_DOWNWARD)
-+    size = IA64_STACK_ALIGN (size);
-+
-   total_size = (spill_size + extra_spill_size + size + pretend_args_size
-               + crtl->outgoing_args_size);
-   total_size = IA64_STACK_ALIGN (total_size);
-@@ -2829,32 +2832,19 @@ ia64_can_eliminate (const int from ATTRI
- HOST_WIDE_INT
- ia64_initial_elimination_offset (int from, int to)
- {
--  HOST_WIDE_INT offset;
-+  HOST_WIDE_INT offset, size = get_frame_size ();
--  ia64_compute_frame_size (get_frame_size ());
-+  ia64_compute_frame_size (size);
-   switch (from)
-     {
-     case FRAME_POINTER_REGNUM:
--      switch (to)
--      {
--      case HARD_FRAME_POINTER_REGNUM:
--        if (current_function_is_leaf)
--          offset = -current_frame_info.total_size;
--        else
--          offset = -(current_frame_info.total_size
--                     - crtl->outgoing_args_size - 16);
--        break;
--
--      case STACK_POINTER_REGNUM:
--        if (current_function_is_leaf)
--          offset = 0;
--        else
--          offset = 16 + crtl->outgoing_args_size;
--        break;
--
--      default:
--        gcc_unreachable ();
--      }
-+      offset = FRAME_GROWS_DOWNWARD ? IA64_STACK_ALIGN (size) : 0;
-+      if (!current_function_is_leaf)
-+      offset += 16 + crtl->outgoing_args_size;
-+      if (to == HARD_FRAME_POINTER_REGNUM)
-+      offset -= current_frame_info.total_size;
-+      else
-+      gcc_assert (to == STACK_POINTER_REGNUM);
-       break;
-     case ARG_POINTER_REGNUM:
-Index: gcc/config/ia64/ia64.md
-===================================================================
---- gcc/config/ia64/ia64.md.orig       2011-11-03 16:27:28.000000000 +0100
-+++ gcc/config/ia64/ia64.md    2011-11-04 11:39:47.000000000 +0100
-@@ -5180,6 +5180,43 @@
-  "mov %0 = ip"
-   [(set_attr "itanium_class" "frbr")])
-+;;
-+;; Stack guard expanders
-+
-+(define_expand "stack_protect_set"
-+  [(set (match_operand 0 "memory_operand" "")
-+        (match_operand 1 "memory_operand" ""))]
-+  ""
-+{
-+#ifdef TARGET_THREAD_SSP_OFFSET
-+  rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13);
-+  rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx,
-+                                      GEN_INT (TARGET_THREAD_SSP_OFFSET)));
-+  MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]);
-+  operands[1] = canary;
-+#endif
-+  emit_move_insn (operands[0], operands[1]);
-+  DONE;
-+})
-+
-+(define_expand "stack_protect_test"
-+  [(match_operand 0 "memory_operand" "")
-+   (match_operand 1 "memory_operand" "")
-+   (match_operand 2 "" "")]
-+  ""
-+{
-+#ifdef TARGET_THREAD_SSP_OFFSET
-+  rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13);
-+  rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx,
-+                                      GEN_INT (TARGET_THREAD_SSP_OFFSET)));
-+  MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]);
-+  operands[1] = canary;
-+#endif
-+  emit_cmp_and_jump_insns (operands[0], operands[1], EQ, NULL_RTX,
-+                         ptr_mode, 1, operands[2]);
-+  DONE;
-+})
-+
- ;; Vector operations
- (include "vect.md")
- ;; Atomic operations
-Index: gcc/config/ia64/ia64.h
-===================================================================
---- gcc/config/ia64/ia64.h.orig        2011-04-28 15:02:22.000000000 +0200
-+++ gcc/config/ia64/ia64.h     2011-11-04 11:39:47.000000000 +0100
-@@ -872,7 +872,7 @@ enum reg_class
- /* Define this macro to nonzero if the addresses of local variable slots
-    are at negative offsets from the frame pointer.  */
--#define FRAME_GROWS_DOWNWARD 0
-+#define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0)
- /* Offset from the frame pointer to the first local variable slot to
-    be allocated.  */
diff --git a/packaging/gcc41-java-slow_pthread_self.patch b/packaging/gcc41-java-slow_pthread_self.patch
deleted file mode 100644 (file)
index c3e5681..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-2005-05-20  Jakub Jelinek  <jakub@redhat.com>
-
-       * configure.host (slow_pthread_self): Set to empty unconditionally
-       on Linux targets.
-
-Index: libjava/configure.host
-===================================================================
---- libjava/configure.host.orig        2011-11-03 16:30:42.000000000 +0100
-+++ libjava/configure.host     2011-11-04 11:39:57.000000000 +0100
-@@ -227,6 +227,7 @@ case "${host}" in
-   sh-linux* | sh[34]*-linux*)
-       can_unwind_signal=yes
-       libgcj_ld_symbolic='-Wl,-Bsymbolic'
-+      slow_pthread_self=
-       if test x$slow_pthread_self = xyes \
-          && test x$cross_compiling != xyes; then
-         cat > conftest.c <<EOF
diff --git a/packaging/gcc41-ppc32-retaddr.patch b/packaging/gcc41-ppc32-retaddr.patch
deleted file mode 100644 (file)
index b382c26..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-2005-11-28  Jakub Jelinek  <jakub@redhat.com>
-
-       * config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
-       read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
-       instead of doing an extran indirection from frame_pointer_rtx.
-
-       * gcc.dg/20051128-1.c: New test.
-
-Index: gcc/config/rs6000/rs6000.c
-===================================================================
---- gcc/config/rs6000/rs6000.c.orig    2011-11-03 16:27:33.000000000 +0100
-+++ gcc/config/rs6000/rs6000.c 2011-11-04 11:40:05.000000000 +0100
-@@ -18653,17 +18653,22 @@ rs6000_return_addr (int count, rtx frame
-      don't try to be too clever here.  */
-   if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
-     {
-+      rtx x;
-       cfun->machine->ra_needs_full_frame = 1;
--      return
--      gen_rtx_MEM
--        (Pmode,
--         memory_address
--         (Pmode,
--          plus_constant (copy_to_reg
--                         (gen_rtx_MEM (Pmode,
--                                       memory_address (Pmode, frame))),
--                         RETURN_ADDRESS_OFFSET)));
-+      if (count == 0)
-+      {
-+        gcc_assert (frame == frame_pointer_rtx);
-+        x = arg_pointer_rtx;
-+      }
-+      else
-+      {
-+        x = memory_address (Pmode, frame);
-+        x = copy_to_reg (gen_rtx_MEM (Pmode, x));
-+      }
-+
-+      x = plus_constant (x, RETURN_ADDRESS_OFFSET);
-+      return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
-     }
-   cfun->machine->ra_need_lr = 1;
-Index: gcc/testsuite/gcc.dg/20051128-1.c
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gcc/testsuite/gcc.dg/20051128-1.c  2011-11-04 11:40:05.000000000 +0100
-@@ -0,0 +1,41 @@
-+/* { dg-do run } */
-+/* { dg-options "-O2 -fpic" } */
-+
-+extern void exit (int);
-+extern void abort (void);
-+
-+int b;
-+
-+struct A
-+{
-+  void *pad[147];
-+  void *ra, *h;
-+  long o;
-+};
-+
-+void
-+__attribute__((noinline))
-+foo (struct A *a, void *x)
-+{
-+  __builtin_memset (a, 0, sizeof (a));
-+  if (!b)
-+    exit (0);
-+}
-+
-+void
-+__attribute__((noinline))
-+bar (void)
-+{
-+  struct A a;
-+
-+  __builtin_unwind_init ();
-+  foo (&a, __builtin_return_address (0));
-+}
-+
-+int
-+main (void)
-+{
-+  bar ();
-+  abort ();
-+  return 0;
-+}
diff --git a/packaging/gcc43-no-unwind-tables.diff b/packaging/gcc43-no-unwind-tables.diff
deleted file mode 100644 (file)
index 932b5f9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: libgcc/Makefile.in
-===================================================================
---- libgcc/Makefile.in.orig    2011-11-03 16:29:25.000000000 +0100
-+++ libgcc/Makefile.in 2011-11-03 17:21:33.000000000 +0100
-@@ -279,7 +279,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF
- CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
-   -finhibit-size-directive -fno-inline -fno-exceptions \
-   -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
--  -fno-stack-protector \
-+  -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables \
-   $(INHIBIT_LIBC_CFLAGS)
- # Extra flags to use when compiling crt{begin,end}.o.
diff --git a/packaging/gcc44-rename-info-files.patch b/packaging/gcc44-rename-info-files.patch
deleted file mode 100644 (file)
index b4e0ce7..0000000
+++ /dev/null
@@ -1,922 +0,0 @@
-#! /bin/sh -e
-
-# DP: Allow transformations on info file names. Reference the
-# DP: transformed info file names in the texinfo files.
-
-dir=
-if [ $# -eq 3 -a "$2" = '-d' ]; then
-    pdir="-d $3"
-    dir="$3/"
-elif [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-case "$1" in
-    -patch)
-        patch $pdir -f --no-backup-if-mismatch -p0 < $0
-        ;;
-    -unpatch)
-        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
-        ;;
-    *)
-        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-        exit 1
-esac
-exit 0
-
-
-gcc/ChangeLog:
-
-2004-02-17  Matthias Klose  <doko@debian.org>
-
-       * Makefile.in: Allow transformations on info file names.
-       Define MAKEINFODEFS, macros to pass transformated info file
-       names to makeinfo.
-       * doc/cpp.texi: Use macros defined in MAKEINFODEFS for references.
-       * doc/cppinternals.texi: Likewise.
-       * doc/extend.texi: Likewise.
-       * doc/gcc.texi: Likewise.
-       * doc/gccint.texi: Likewise.
-       * doc/invoke.texi: Likewise.
-       * doc/libgcc.texi: Likewise.
-       * doc/makefile.texi: Likewise.
-       * doc/passes.texi: Likewise.
-       * doc/sourcebuild.texi: Likewise.
-       * doc/standards.texi: Likewise.
-       * doc/trouble.texi: Likewise.
-
-gcc/fortran/ChangeLog:
-       * Make-lang.in: Allow transformations on info file names.
-       Pass macros of transformated info file defined in MAKEINFODEFS
-       names to makeinfo.
-       * gfortran.texi: Use macros defined in MAKEINFODEFS for references.
-
-gcc/java/ChangeLog:
-       * Make-lang.in: Allow transformations on info file names.
-       Pass macros of transformated info file defined in MAKEINFODEFS
-       names to makeinfo.
-       * gcj.texi: Use macros defined in MAKEINFODEFS for references.
-
-
-Index: libgomp/libgomp.texi
-===================================================================
-*** libgomp/libgomp.texi.orig  2012-02-21 14:33:54.000000000 +0100
---- libgomp/libgomp.texi       2012-02-21 14:34:15.000000000 +0100
-*************** texts being (a) (see below), and with th
-*** 31,37 ****
-  @ifinfo
-  @dircategory GNU Libraries
-  @direntry
-! * libgomp: (libgomp).                    GNU OpenMP runtime library
-  @end direntry
-  
-  This manual documents the GNU implementation of the OpenMP API for 
---- 31,37 ----
-  @ifinfo
-  @dircategory GNU Libraries
-  @direntry
-! * @value{fnlibgomp}: (@value{fnlibgomp}).                    GNU OpenMP runtime library
-  @end direntry
-  
-  This manual documents the GNU implementation of the OpenMP API for 
-Index: libgomp/Makefile.am
-===================================================================
-*** libgomp/Makefile.am.orig   2012-02-21 14:33:54.000000000 +0100
---- libgomp/Makefile.am        2012-02-21 14:34:15.000000000 +0100
-*************** endif
-*** 111,126 ****
-  
-  all-local: $(STAMP_GENINSRC)
-  
-! stamp-geninsrc: libgomp.info
-!      cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
-       @touch $@
-  
-! libgomp.info: $(STAMP_BUILD_INFO)
-  
-  stamp-build-info: libgomp.texi
-!      $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi
-       @touch $@
-  
-  
-! CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) libgomp.info
-  MAINTAINERCLEANFILES = $(srcdir)/libgomp.info
---- 111,129 ----
-  
-  all-local: $(STAMP_GENINSRC)
-  
-! INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)')
-! stamp-geninsrc: $(INFO_LIBGOMP_NAME).info
-!      cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info
-       @touch $@
-  
-! libgomp.info: $(INFO_LIBGOMP_NAME).info
-!      cp $(INFO_LIBGOMP_NAME).info libgomp.info
-! $(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO)
-  
-  stamp-build-info: libgomp.texi
-!      $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp $(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi
-       @touch $@
-  
-  
-! CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) $(INFO_LIBGOMP_NAME).info
-  MAINTAINERCLEANFILES = $(srcdir)/libgomp.info
-Index: libgomp/Makefile.in
-===================================================================
-*** libgomp/Makefile.in.orig   2012-02-21 14:33:54.000000000 +0100
---- libgomp/Makefile.in        2012-02-21 14:34:15.000000000 +0100
-*************** info_TEXINFOS = libgomp.texi
-*** 343,349 ****
-  
-  # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
-  @BUILD_INFO_TRUE@STAMP_BUILD_INFO = stamp-build-info
-! CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) libgomp.info
-  MAINTAINERCLEANFILES = $(srcdir)/libgomp.info
-  all: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-recursive
---- 343,350 ----
-  
-  # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
-  @BUILD_INFO_TRUE@STAMP_BUILD_INFO = stamp-build-info
-! INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)')
-! CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) $(INFO_LIBGOMP_NAME).info
-  MAINTAINERCLEANFILES = $(srcdir)/libgomp.info
-  all: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-recursive
-*************** env.lo: libgomp_f.h
-*** 1089,1103 ****
-  env.o: libgomp_f.h
-  
-  all-local: $(STAMP_GENINSRC)
-! 
-! stamp-geninsrc: libgomp.info
-!      cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
-       @touch $@
-  
-! libgomp.info: $(STAMP_BUILD_INFO)
-  
-  stamp-build-info: libgomp.texi
-!      $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi
-       @touch $@
-  
-  # Tell versions [3.59,3.63) of GNU make to not export all variables.
---- 1090,1105 ----
-  env.o: libgomp_f.h
-  
-  all-local: $(STAMP_GENINSRC)
-! stamp-geninsrc: $(INFO_LIBGOMP_NAME).info
-!      cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info
-       @touch $@
-  
-! libgomp.info: $(INFO_LIBGOMP_NAME).info
-!      cp $(INFO_LIBGOMP_NAME).info libgomp.info
-! $(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO)
-  
-  stamp-build-info: libgomp.texi
-!      $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp $(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi
-       @touch $@
-  
-  # Tell versions [3.59,3.63) of GNU make to not export all variables.
-Index: gcc/doc/cpp.texi
-===================================================================
-*** gcc/doc/cpp.texi.orig      2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/cpp.texi   2012-02-21 14:34:15.000000000 +0100
-*************** This manual contains no Invariant Sectio
-*** 53,59 ****
-  @ifinfo
-  @dircategory Software development
-  @direntry
-! * Cpp: (cpp).                  The GNU C preprocessor.
-  @end direntry
-  @end ifinfo
-  
---- 53,59 ----
-  @ifinfo
-  @dircategory Software development
-  @direntry
-! * @value{fncpp}: (@value{fncpp}).                    The GNU C preprocessor.
-  @end direntry
-  @end ifinfo
-  
-Index: gcc/doc/cppinternals.texi
-===================================================================
-*** gcc/doc/cppinternals.texi.orig     2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/cppinternals.texi  2012-02-21 14:34:15.000000000 +0100
-***************
-*** 7,13 ****
-  @ifinfo
-  @dircategory Software development
-  @direntry
-! * Cpplib: (cppinternals).      Cpplib internals.
-  @end direntry
-  @end ifinfo
-  
---- 7,13 ----
-  @ifinfo
-  @dircategory Software development
-  @direntry
-! * @value{fncppint}: (@value{fncppint}).      Cpplib internals.
-  @end direntry
-  @end ifinfo
-  
-Index: gcc/doc/extend.texi
-===================================================================
-*** gcc/doc/extend.texi.orig   2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/extend.texi        2012-02-21 14:34:15.000000000 +0100
-*************** want to write code that checks whether t
-*** 14788,14794 ****
-  test for the GNU compiler the same way as for C programs: check for a
-  predefined macro @code{__GNUC__}.  You can also use @code{__GNUG__} to
-  test specifically for GNU C++ (@pxref{Common Predefined Macros,,
-! Predefined Macros,cpp,The GNU C Preprocessor}).
-  
-  @menu
-  * C++ Volatiles::       What constitutes an access to a volatile object.
---- 14788,14794 ----
-  test for the GNU compiler the same way as for C programs: check for a
-  predefined macro @code{__GNUC__}.  You can also use @code{__GNUG__} to
-  test specifically for GNU C++ (@pxref{Common Predefined Macros,,
-! Predefined Macros,@value{fncpp},The GNU C Preprocessor}).
-  
-  @menu
-  * C++ Volatiles::       What constitutes an access to a volatile object.
-Index: gcc/doc/gcc.texi
-===================================================================
-*** gcc/doc/gcc.texi.orig      2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/gcc.texi   2012-02-21 14:34:15.000000000 +0100
-*************** Texts being (a) (see below), and with th
-*** 65,72 ****
-  @ifnottex
-  @dircategory Software development
-  @direntry
-! * gcc: (gcc).                  The GNU Compiler Collection.
-! * g++: (gcc).                  The GNU C++ compiler.
-  @end direntry
-  This file documents the use of the GNU compilers.
-  @sp 1
---- 65,72 ----
-  @ifnottex
-  @dircategory Software development
-  @direntry
-! * @value{fngcc}: (@value{fngcc}).                  The GNU Compiler Collection.
-! * @value{fngxx}: (@value{fngcc}).                  The GNU C++ compiler.
-  @end direntry
-  This file documents the use of the GNU compilers.
-  @sp 1
-*************** version @value{version-GCC}.
-*** 126,132 ****
-  The internals of the GNU compilers, including how to port them to new
-  targets and some information about how to write front ends for new
-  languages, are documented in a separate manual.  @xref{Top,,
-! Introduction, gccint, GNU Compiler Collection (GCC) Internals}.
-  
-  @menu
-  * G++ and GCC::     You can compile C or C++ programs.
---- 126,132 ----
-  The internals of the GNU compilers, including how to port them to new
-  targets and some information about how to write front ends for new
-  languages, are documented in a separate manual.  @xref{Top,,
-! Introduction, @value{fngccint}, GNU Compiler Collection (GCC) Internals}.
-  
-  @menu
-  * G++ and GCC::     You can compile C or C++ programs.
-Index: gcc/doc/gccint.texi
-===================================================================
-*** gcc/doc/gccint.texi.orig   2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/gccint.texi        2012-02-21 14:34:15.000000000 +0100
-*************** Texts being (a) (see below), and with th
-*** 51,57 ****
-  @ifnottex
-  @dircategory Software development
-  @direntry
-! * gccint: (gccint).            Internals of the GNU Compiler Collection.
-  @end direntry
-  This file documents the internals of the GNU compilers.
-  @sp 1
---- 51,57 ----
-  @ifnottex
-  @dircategory Software development
-  @direntry
-! * @value{fngccint}: (@value{fngccint}).            Internals of the GNU Compiler Collection.
-  @end direntry
-  This file documents the internals of the GNU compilers.
-  @sp 1
-*************** write front ends for new languages.  It
-*** 83,89 ****
-  @value{VERSION_PACKAGE}
-  @end ifset
-  version @value{version-GCC}.  The use of the GNU compilers is documented in a
-! separate manual.  @xref{Top,, Introduction, gcc, Using the GNU
-  Compiler Collection (GCC)}.
-  
-  This manual is mainly a reference manual rather than a tutorial.  It
---- 83,89 ----
-  @value{VERSION_PACKAGE}
-  @end ifset
-  version @value{version-GCC}.  The use of the GNU compilers is documented in a
-! separate manual.  @xref{Top,, Introduction, @value{fngcc}, Using the GNU
-  Compiler Collection (GCC)}.
-  
-  This manual is mainly a reference manual rather than a tutorial.  It
-Index: gcc/doc/invoke.texi
-===================================================================
-*** gcc/doc/invoke.texi.orig   2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/invoke.texi        2012-02-21 14:34:15.000000000 +0100
-*************** One of the standard libraries bypassed b
-*** 9434,9440 ****
-  @option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
-  which GCC uses to overcome shortcomings of particular machines, or special
-  needs for some languages.
-! (@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
-  Collection (GCC) Internals},
-  for more discussion of @file{libgcc.a}.)
-  In most cases, you need @file{libgcc.a} even when you want to avoid
---- 9434,9440 ----
-  @option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
-  which GCC uses to overcome shortcomings of particular machines, or special
-  needs for some languages.
-! (@xref{Interface,,Interfacing to GCC Output,@value{fngccint},GNU Compiler
-  Collection (GCC) Internals},
-  for more discussion of @file{libgcc.a}.)
-  In most cases, you need @file{libgcc.a} even when you want to avoid
-*************** other standard libraries.  In other word
-*** 9442,9448 ****
-  or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
-  This ensures that you have no unresolved references to internal GCC
-  library subroutines.  (For example, @samp{__main}, used to ensure C++
-! constructors will be called; @pxref{Collect2,,@code{collect2}, gccint,
-  GNU Compiler Collection (GCC) Internals}.)
-  
-  @item -pie
---- 9442,9448 ----
-  or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
-  This ensures that you have no unresolved references to internal GCC
-  library subroutines.  (For example, @samp{__main}, used to ensure C++
-! constructors will be called; @pxref{Collect2,,@code{collect2}, @value{fngccint},
-  GNU Compiler Collection (GCC) Internals}.)
-  
-  @item -pie
-*************** Note that you can also specify places to
-*** 19435,19441 ****
-  @option{-B}, @option{-I} and @option{-L} (@pxref{Directory Options}).  These
-  take precedence over places specified using environment variables, which
-  in turn take precedence over those specified by the configuration of GCC@.
-! @xref{Driver,, Controlling the Compilation Driver @file{gcc}, gccint,
-  GNU Compiler Collection (GCC) Internals}.
-  
-  @table @env
---- 19435,19441 ----
-  @option{-B}, @option{-I} and @option{-L} (@pxref{Directory Options}).  These
-  take precedence over places specified using environment variables, which
-  in turn take precedence over those specified by the configuration of GCC@.
-! @xref{Driver,, Controlling the Compilation Driver @file{gcc}, @value{fngccint},
-  GNU Compiler Collection (GCC) Internals}.
-  
-  @table @env
-*************** the headers it contains change.
-*** 19596,19602 ****
-  
-  A precompiled header file will be searched for when @code{#include} is
-  seen in the compilation.  As it searches for the included file
-! (@pxref{Search Path,,Search Path,cpp,The C Preprocessor}) the
-  compiler looks for a precompiled header in each directory just before it
-  looks for the include file in that directory.  The name searched for is
-  the name specified in the @code{#include} with @samp{.gch} appended.  If
---- 19596,19602 ----
-  
-  A precompiled header file will be searched for when @code{#include} is
-  seen in the compilation.  As it searches for the included file
-! (@pxref{Search Path,,Search Path,@value{fncpp},The C Preprocessor}) the
-  compiler looks for a precompiled header in each directory just before it
-  looks for the include file in that directory.  The name searched for is
-  the name specified in the @code{#include} with @samp{.gch} appended.  If
-Index: gcc/doc/libgcc.texi
-===================================================================
-*** gcc/doc/libgcc.texi.orig   2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/libgcc.texi        2012-02-21 14:34:15.000000000 +0100
-*************** that needs them.
-*** 25,31 ****
-  GCC will also generate calls to C library routines, such as
-  @code{memcpy} and @code{memset}, in some cases.  The set of routines
-  that GCC may possibly use is documented in @ref{Other
-! Builtins,,,gcc, Using the GNU Compiler Collection (GCC)}.
-  
-  These routines take arguments and return values of a specific machine
-  mode, not a specific C type.  @xref{Machine Modes}, for an explanation
---- 25,31 ----
-  GCC will also generate calls to C library routines, such as
-  @code{memcpy} and @code{memset}, in some cases.  The set of routines
-  that GCC may possibly use is documented in @ref{Other
-! Builtins,,,@value{fngcc}, Using the GNU Compiler Collection (GCC)}.
-  
-  These routines take arguments and return values of a specific machine
-  mode, not a specific C type.  @xref{Machine Modes}, for an explanation
-Index: gcc/doc/makefile.texi
-===================================================================
-*** gcc/doc/makefile.texi.orig 2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/makefile.texi      2012-02-21 14:34:15.000000000 +0100
-*************** regardless of how it itself was compiled
-*** 140,146 ****
-  Builds a compiler with profiling feedback information.  In this case,
-  the second and third stages are named @samp{profile} and @samp{feedback},
-  respectively.  For more information, see
-! @ref{Building,,Building with profile feedback,gccinstall,Installing GCC}.
-  
-  @item restrap
-  Restart a bootstrap, so that everything that was not built with
---- 140,146 ----
-  Builds a compiler with profiling feedback information.  In this case,
-  the second and third stages are named @samp{profile} and @samp{feedback},
-  respectively.  For more information, see
-! @ref{Building,,Building with profile feedback,@value{fngccinstall},Installing GCC}.
-  
-  @item restrap
-  Restart a bootstrap, so that everything that was not built with
-Index: gcc/doc/passes.texi
-===================================================================
-*** gcc/doc/passes.texi.orig   2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/passes.texi        2012-02-21 14:34:15.000000000 +0100
-*************** rid of it.  This pass is located in @fil
-*** 199,205 ****
-  @item Mudflap declaration registration
-  
-  If mudflap (@pxref{Optimize Options,,-fmudflap -fmudflapth
-! -fmudflapir,gcc,Using the GNU Compiler Collection (GCC)}) is
-  enabled, we generate code to register some variable declarations with
-  the mudflap runtime.  Specifically, the runtime tracks the lifetimes of
-  those variable declarations that have their addresses taken, or whose
---- 199,205 ----
-  @item Mudflap declaration registration
-  
-  If mudflap (@pxref{Optimize Options,,-fmudflap -fmudflapth
-! -fmudflapir,@value{fngcc},Using the GNU Compiler Collection (GCC)}) is
-  enabled, we generate code to register some variable declarations with
-  the mudflap runtime.  Specifically, the runtime tracks the lifetimes of
-  those variable declarations that have their addresses taken, or whose
-Index: gcc/doc/standards.texi
-===================================================================
-*** gcc/doc/standards.texi.orig        2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/standards.texi     2012-02-21 14:34:15.000000000 +0100
-*************** date that the release was frozen.
-*** 295,302 ****
-  GNAT Reference Manual}, for information on standard
-  conformance and compatibility of the Ada compiler.
-  
-! @xref{Standards,,Standards, gfortran, The GNU Fortran Compiler}, for details
-  of standards supported by GNU Fortran.
-  
-! @xref{Compatibility,,Compatibility with the Java Platform, gcj, GNU gcj},
-  for details of compatibility between @command{gcj} and the Java Platform.
---- 295,302 ----
-  GNAT Reference Manual}, for information on standard
-  conformance and compatibility of the Ada compiler.
-  
-! @xref{Standards,,Standards, @value{fngfortran}, The GNU Fortran Compiler}, for details
-  of standards supported by GNU Fortran.
-  
-! @xref{Compatibility,,Compatibility with the Java Platform, @value{fngcj}, GNU gcj},
-  for details of compatibility between @command{gcj} and the Java Platform.
-Index: gcc/java/Make-lang.in
-===================================================================
-*** gcc/java/Make-lang.in.orig 2012-02-21 14:33:54.000000000 +0100
---- gcc/java/Make-lang.in      2012-02-21 14:34:15.000000000 +0100
-*************** java.tags: force
-*** 127,137 ****
-       etags --include TAGS.sub --include ../TAGS.sub
-  
-  
-! java.info: doc/gcj.info
-  
-! java.srcinfo: doc/gcj.info
-       -cp -p $^ $(srcdir)/doc
-  
-  java.dvi: doc/gcj.dvi
-  
-  JAVA_PDFFILES = doc/gcj.pdf
---- 127,149 ----
-       etags --include TAGS.sub --include ../TAGS.sub
-  
-  
-! TEXI_GCJ_FILES = java/gcj.texi \
-!               $(gcc_docdir)/include/gpl.texi $(gcc_docdir)/include/funding.texi \
-!               $(gcc_docdir)/include/fdl.texi $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
-! INFO_GCJ_NAME = $(shell echo gcj|sed '$(program_transform_name)')
-  
-! java.info: doc/$(INFO_GCJ_NAME).info
-! 
-! java.srcinfo: doc/$(INFO_GCJ_NAME).info
-       -cp -p $^ $(srcdir)/doc
-  
-+ doc/$(INFO_GCJ_NAME).info: $(TEXI_GCJ_FILES)
-+      if test "x$(BUILD_INFO)" = xinfo; then \
-+        rm -f $(@)*; \
-+        $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) \
-+          -I$(gcc_docdir)/include -I$(srcdir)/f -o$@ $<; \
-+      fi
-+ 
-  java.dvi: doc/gcj.dvi
-  
-  JAVA_PDFFILES = doc/gcj.pdf
-*************** java.uninstall:
-*** 194,201 ****
-       -rm -rf $(DESTDIR)$(man1dir)/gcj-dbtool$(man1ext)
-       -rm -rf $(DESTDIR)$(man1dir)/aot-compile$(man1ext)
-       -rm -rf $(DESTDIR)$(man1dir)/rebuild-gcj-db$(man1ext)
-  
-! java.install-info: $(DESTDIR)$(infodir)/gcj.info
-  
-  java.install-pdf: $(JAVA_PDFFILES)
-       @$(NORMAL_INSTALL)
---- 206,214 ----
-       -rm -rf $(DESTDIR)$(man1dir)/gcj-dbtool$(man1ext)
-       -rm -rf $(DESTDIR)$(man1dir)/aot-compile$(man1ext)
-       -rm -rf $(DESTDIR)$(man1dir)/rebuild-gcj-db$(man1ext)
-+      -rm -f $(DESTDIR)$(infodir)/$(INFO_GCJ_NAME).info*
-  
-! java.install-info: $(DESTDIR)$(infodir)/$(INFO_GCJ_NAME).info
-  
-  java.install-pdf: $(JAVA_PDFFILES)
-       @$(NORMAL_INSTALL)
-Index: gcc/java/gcj.texi
-===================================================================
-*** gcc/java/gcj.texi.orig     2012-02-21 14:33:54.000000000 +0100
---- gcc/java/gcj.texi  2012-02-21 14:34:15.000000000 +0100
-*************** man page gfdl(7).
-*** 55,75 ****
-  @format
-  @dircategory Software development
-  @direntry
-! * Gcj: (gcj).               Ahead-of-time compiler for the Java language
-  @end direntry
-  
-  @dircategory Individual utilities
-  @direntry
-! * jcf-dump: (gcj)Invoking jcf-dump.
-                              Print information about Java class files
-! * gij: (gcj)Invoking gij.   GNU interpreter for Java bytecode
-! * gcj-dbtool: (gcj)Invoking gcj-dbtool.
-                              Tool for manipulating class file databases.
-! * jv-convert: (gcj)Invoking jv-convert.
-                              Convert file from one encoding to another
-! * grmic: (gcj)Invoking grmic.
-                              Generate stubs for Remote Method Invocation.
-! * gc-analyze: (gcj)Invoking gc-analyze.
-                              Analyze Garbage Collector (GC) memory dumps.
-  * aot-compile: (gcj)Invoking aot-compile.
-                              Compile bytecode to native and generate databases.
---- 55,75 ----
-  @format
-  @dircategory Software development
-  @direntry
-! * @value{fngcj}: (@value{fngcj}).               Ahead-of-time compiler for the Java language
-  @end direntry
-  
-  @dircategory Individual utilities
-  @direntry
-! * jcf-dump: (@value{fngcj}) Invoking jcf-dump.
-                              Print information about Java class files
-! * gij: (@value{fngcj}) Invoking gij.   GNU interpreter for Java bytecode
-! * gcj-dbtool: (@value{fngcj}) Invoking gcj-dbtool.
-                              Tool for manipulating class file databases.
-! * jv-convert: (@value{fngcj}) Invoking jv-convert.
-                              Convert file from one encoding to another
-! * grmic: (@value{fngcj}) Invoking grmic.
-                              Generate stubs for Remote Method Invocation.
-! * gc-analyze: (@value{fngcj}) Invoking gc-analyze.
-                              Analyze Garbage Collector (GC) memory dumps.
-  * aot-compile: (gcj)Invoking aot-compile.
-                              Compile bytecode to native and generate databases.
-*************** and the Info entries for @file{gcj} and
-*** 159,165 ****
-  
-  As @command{gcj} is just another front end to @command{gcc}, it supports many
-  of the same options as gcc.  @xref{Option Summary, , Option Summary,
-! gcc, Using the GNU Compiler Collection (GCC)}.  This manual only documents the
-  options specific to @command{gcj}.
-  
-  @c man end
---- 159,165 ----
-  
-  As @command{gcj} is just another front end to @command{gcc}, it supports many
-  of the same options as gcc.  @xref{Option Summary, , Option Summary,
-! @value{fngcc}, Using the GNU Compiler Collection (GCC)}.  This manual only documents the
-  options specific to @command{gcj}.
-  
-  @c man end
-Index: gcc/fortran/Make-lang.in
-===================================================================
-*** gcc/fortran/Make-lang.in.orig      2012-02-21 14:33:54.000000000 +0100
---- gcc/fortran/Make-lang.in   2012-02-21 14:34:15.000000000 +0100
-*************** fortran.tags: force
-*** 118,124 ****
-       cd $(srcdir)/fortran; etags -o TAGS.sub *.c *.h; \
-       etags --include TAGS.sub --include ../TAGS.sub
-  
-! fortran.info: doc/gfortran.info doc/gfc-internals.info
-  fortran.dvi: doc/gfortran.dvi doc/gfc-internals.dvi
-  
-  F95_HTMLFILES = $(build_htmldir)/gfortran
---- 118,125 ----
-       cd $(srcdir)/fortran; etags -o TAGS.sub *.c *.h; \
-       etags --include TAGS.sub --include ../TAGS.sub
-  
-! INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)')
-! fortran.info: doc/$(INFO_FORTRAN_NAME).info
-  fortran.dvi: doc/gfortran.dvi doc/gfc-internals.dvi
-  
-  F95_HTMLFILES = $(build_htmldir)/gfortran
-*************** GFORTRAN_TEXI = \
-*** 190,199 ****
-    $(srcdir)/doc/include/gcc-common.texi \
-    gcc-vers.texi
-  
-! doc/gfortran.info: $(GFORTRAN_TEXI)
-       if [ x$(BUILD_INFO) = xinfo ]; then \
-         rm -f doc/gfortran.info-*; \
-!        $(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
-           -o $@ $<; \
-       else true; fi
-  
---- 191,200 ----
-    $(srcdir)/doc/include/gcc-common.texi \
-    gcc-vers.texi
-  
-! doc/$(INFO_FORTRAN_NAME).info: $(GFORTRAN_TEXI)
-       if [ x$(BUILD_INFO) = xinfo ]; then \
-         rm -f doc/gfortran.info-*; \
-!        $(MAKEINFO) $(MAKEINFODEFS) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
-           -o $@ $<; \
-       else true; fi
-  
-*************** fortran.install-common: install-finclude
-*** 261,267 ****
-  
-  fortran.install-plugin:
-  
-! fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info
-  
-  fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext)
-  
---- 262,268 ----
-  
-  fortran.install-plugin:
-  
-! fortran.install-info: $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info
-  
-  fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext)
-  
-*************** fortran.uninstall:
-*** 279,285 ****
-       rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
-       rm -rf $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext); \
-       rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
-!      rm -rf $(DESTDIR)$(infodir)/gfortran.info*
-  
-  #\f
-  # Clean hooks:
---- 280,286 ----
-       rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
-       rm -rf $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext); \
-       rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
-!      rm -rf $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info*
-  
-  #\f
-  # Clean hooks:
-Index: gcc/fortran/gfortran.texi
-===================================================================
-*** gcc/fortran/gfortran.texi.orig     2012-02-21 14:33:54.000000000 +0100
---- gcc/fortran/gfortran.texi  2012-02-21 14:34:15.000000000 +0100
-*************** Texts being (a) (see below), and with th
-*** 101,107 ****
-  @ifinfo
-  @dircategory Software development
-  @direntry
-! * gfortran: (gfortran).                  The GNU Fortran Compiler.
-  @end direntry
-  This file documents the use and the internals of
-  the GNU Fortran compiler, (@command{gfortran}).
---- 101,107 ----
-  @ifinfo
-  @dircategory Software development
-  @direntry
-! * @value{fngfortran}: (@value{fngfortran}).                  The GNU Fortran Compiler.
-  @end direntry
-  This file documents the use and the internals of
-  the GNU Fortran compiler, (@command{gfortran}).
-Index: gcc/Makefile.in
-===================================================================
-*** gcc/Makefile.in.orig       2012-02-21 14:34:13.000000000 +0100
---- gcc/Makefile.in    2012-02-21 14:34:15.000000000 +0100
-*************** stmp-fixinc: gsyslimits.h macro_list fix
-*** 4200,4207 ****
-  
-  doc: $(BUILD_INFO) $(GENERATED_MANPAGES)
-  
-! INFOFILES = doc/cpp.info doc/gcc.info doc/gccint.info \
-!             doc/gccinstall.info doc/cppinternals.info
-  
-  info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo
-  
---- 4200,4226 ----
-  
-  doc: $(BUILD_INFO) $(GENERATED_MANPAGES)
-  
-! INFO_CPP_NAME = $(shell echo cpp|sed '$(program_transform_name)')
-! INFO_GCC_NAME = $(shell echo gcc|sed '$(program_transform_name)')
-! INFO_GXX_NAME = $(shell echo g++|sed '$(program_transform_name)')
-! INFO_GCCINT_NAME = $(shell echo gccint|sed '$(program_transform_name)')
-! INFO_GCCINSTALL_NAME = $(shell echo gccinstall|sed '$(program_transform_name)')
-! INFO_CPPINT_NAME = $(shell echo cppinternals|sed '$(program_transform_name)')
-! 
-! INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)')
-! INFO_GCJ_NAME = $(shell echo gcj|sed '$(program_transform_name)')
-! 
-! INFOFILES = doc/$(INFO_CPP_NAME).info doc/$(INFO_GCC_NAME).info \
-!             doc/$(INFO_GCCINT_NAME).info \
-!             doc/$(INFO_GCCINSTALL_NAME).info doc/$(INFO_CPPINT_NAME).info
-! 
-! MAKEINFODEFS = -D 'fncpp $(INFO_CPP_NAME)' -D 'fngcc $(INFO_GCC_NAME)' \
-!                -D 'fngxx $(INFO_GXX_NAME)' \
-!                -D 'fngccint $(INFO_GCCINT_NAME)' \
-!                -D 'fngccinstall $(INFO_GCCINSTALL_NAME)' \
-!                -D 'fncppint $(INFO_CPPINT_NAME)' \
-!                -D 'fngfortran $(INFO_FORTRAN_NAME)' \
-!                -D 'fngcj $(INFO_GCJ_NAME)'
-  
-  info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo
-  
-*************** gcc-vers.texi: $(BASEVER) $(DEVPHASE)
-*** 4255,4275 ****
-  # patterns.  To use them, put each of the specific targets with its
-  # specific dependencies but no build commands.
-  
-! doc/cpp.info: $(TEXI_CPP_FILES)
-! doc/gcc.info: $(TEXI_GCC_FILES)
-! doc/gccint.info: $(TEXI_GCCINT_FILES)
-! doc/cppinternals.info: $(TEXI_CPPINT_FILES)
-! 
-  doc/%.info: %.texi
-       if [ x$(BUILD_INFO) = xinfo ]; then \
-               $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
-                       -I $(gcc_docdir)/include -o $@ $<; \
-       fi
-  
-  # Duplicate entry to handle renaming of gccinstall.info
-! doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
-       if [ x$(BUILD_INFO) = xinfo ]; then \
-!              $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
-                       -I $(gcc_docdir)/include -o $@ $<; \
-       fi
-  
---- 4274,4314 ----
-  # patterns.  To use them, put each of the specific targets with its
-  # specific dependencies but no build commands.
-  
-! # Generic entry to handle info files, which are not renamed (currently Ada)
-  doc/%.info: %.texi
-       if [ x$(BUILD_INFO) = xinfo ]; then \
-               $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
-                       -I $(gcc_docdir)/include -o $@ $<; \
-       fi
-  
-+ doc/$(INFO_CPP_NAME).info: $(TEXI_CPP_FILES)
-+      if [ x$(BUILD_INFO) = xinfo ]; then \
-+              $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
-+                      -I $(gcc_docdir)/include -o $@ $<; \
-+      fi
-+ 
-+ doc/$(INFO_GCC_NAME).info: $(TEXI_GCC_FILES)
-+      if [ x$(BUILD_INFO) = xinfo ]; then \
-+              $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
-+                      -I $(gcc_docdir)/include -o $@ $<; \
-+      fi
-+ 
-+ doc/$(INFO_GCCINT_NAME).info: $(TEXI_GCCINT_FILES)
-+      if [ x$(BUILD_INFO) = xinfo ]; then \
-+              $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
-+                      -I $(gcc_docdir)/include -o $@ $<; \
-+      fi
-+ 
-+ doc/$(INFO_CPPINT_NAME).info: $(TEXI_CPPINT_FILES)
-+      if [ x$(BUILD_INFO) = xinfo ]; then \
-+              $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
-+                      -I $(gcc_docdir)/include -o $@ $<; \
-+      fi
-+ 
-  # Duplicate entry to handle renaming of gccinstall.info
-! doc/$(INFO_GCCINSTALL_NAME).info: $(TEXI_GCCINSTALL_FILES)
-       if [ x$(BUILD_INFO) = xinfo ]; then \
-!              $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
-                       -I $(gcc_docdir)/include -o $@ $<; \
-       fi
-  
-*************** install-driver: installdirs xgcc$(exeext
-*** 4630,4640 ****
-  # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
-  # to do the install.
-  install-info:: doc installdirs \
-!      $(DESTDIR)$(infodir)/cpp.info \
-!      $(DESTDIR)$(infodir)/gcc.info \
-!      $(DESTDIR)$(infodir)/cppinternals.info \
-!      $(DESTDIR)$(infodir)/gccinstall.info \
-!      $(DESTDIR)$(infodir)/gccint.info \
-       lang.install-info
-  
-  $(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
---- 4669,4679 ----
-  # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
-  # to do the install.
-  install-info:: doc installdirs \
-!      $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info \
-!      $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info \
-!      $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info \
-!      $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info \
-!      $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info \
-       lang.install-info
-  
-  $(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
-*************** uninstall: lang.uninstall
-*** 4843,4850 ****
-       -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
-       -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
-       -rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
-!      -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
-!      -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
-       for i in ar nm ranlib ; do \
-         install_name=`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ;\
-         target_install_name=$(target_noncanonical)-`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ; \
---- 4882,4892 ----
-       -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
-       -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
-       -rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
-!      -rm -f $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info*
-!      -rm -f $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info*
-!      -rm -f $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info*
-!      -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info*
-!      -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info*
-       for i in ar nm ranlib ; do \
-         install_name=`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ;\
-         target_install_name=$(target_noncanonical)-`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ; \
-Index: gcc/doc/install.texi
-===================================================================
-*** gcc/doc/install.texi.orig  2012-02-21 14:33:54.000000000 +0100
---- gcc/doc/install.texi       2012-02-21 14:34:15.000000000 +0100
-*************** Free Documentation License}''.
-*** 98,104 ****
-  @end ifinfo
-  @dircategory Software development
-  @direntry
-! * gccinstall: (gccinstall).    Installing the GNU Compiler Collection.
-  @end direntry
-  
-  @c Part 3 Titlepage and Copyright
---- 98,104 ----
-  @end ifinfo
-  @dircategory Software development
-  @direntry
-! * @value{fngccinstall}: (@value{fngccinstall}).    Installing the GNU Compiler Collection.
-  @end direntry
-  
-  @c Part 3 Titlepage and Copyright
-Index: gcc/ada/gnat-style.texi
-===================================================================
-*** gcc/ada/gnat-style.texi.orig       2012-02-21 14:33:54.000000000 +0100
---- gcc/ada/gnat-style.texi    2012-02-21 14:34:15.000000000 +0100
-*************** Texts.  A copy of the license is include
-*** 31,37 ****
-  
-  @dircategory Software development
-  @direntry
-! * gnat-style: (gnat-style).      GNAT Coding Style
-  @end direntry
-  
-  @macro syntax{element}
---- 31,37 ----
-  
-  @dircategory Software development
-  @direntry
-! * gnat-style: (gnat-style-4.7).      GNAT Coding Style
-  @end direntry
-  
-  @macro syntax{element}
-Index: gcc/ada/gnat_rm.texi
-===================================================================
-*** gcc/ada/gnat_rm.texi.orig  2012-02-21 14:33:54.000000000 +0100
---- gcc/ada/gnat_rm.texi       2012-02-21 14:34:15.000000000 +0100
-*************** included in the section entitled ``GNU F
-*** 38,44 ****
-  
-  @dircategory GNU Ada tools
-  @direntry
-! * GNAT Reference Manual: (gnat_rm).  Reference Manual for GNU Ada tools.
-  @end direntry
-  
-  @titlepage
---- 38,44 ----
-  
-  @dircategory GNU Ada tools
-  @direntry
-! * GNAT Reference Manual: (gnat_rm-4.7).  Reference Manual for GNU Ada tools.
-  @end direntry
-  
-  @titlepage
diff --git a/packaging/gcc44-textdomain.patch b/packaging/gcc44-textdomain.patch
deleted file mode 100644 (file)
index 8746788..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#! /bin/sh -e
-
-# DP: Set gettext's domain and textdomain to the versioned package name.
-
-dir=
-if [ $# -eq 3 -a "$2" = '-d' ]; then
-    pdir="-d $3"
-    dir="$3/"
-elif [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-case "$1" in
-    -patch)
-        patch $pdir -f --no-backup-if-mismatch -p0 < $0
-        ;;
-    -unpatch)
-        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
-        ;;
-    *)
-        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-        exit 1
-esac
-exit 0
-
-
-Index: gcc/Makefile.in
-===================================================================
---- gcc/Makefile.in.orig       2011-11-08 17:43:16.000000000 +0100
-+++ gcc/Makefile.in    2011-11-08 17:43:23.000000000 +0100
-@@ -5209,8 +5209,8 @@ install-po:
-         dir=$(localedir)/$$lang/LC_MESSAGES; \
-         echo $(mkinstalldirs) $(DESTDIR)$$dir; \
-         $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
--        echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
--        $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
-+        echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.7.mo; \
-+        $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.7.mo; \
-       done
- # Rule for regenerating the message template (gcc.pot).
-Index: gcc/intl.c
-===================================================================
---- gcc/intl.c.orig    2010-12-06 12:01:18.000000000 +0100
-+++ gcc/intl.c 2011-11-08 17:43:23.000000000 +0100
-@@ -56,8 +56,8 @@ gcc_init_libintl (void)
-   setlocale (LC_ALL, "");
- #endif
--  (void) bindtextdomain ("gcc", LOCALEDIR);
--  (void) textdomain ("gcc");
-+  (void) bindtextdomain ("gcc-4.7", LOCALEDIR);
-+  (void) textdomain ("gcc-4.7");
-   /* Opening quotation mark.  */
-   open_quote = _("`");
-Index: libcpp/Makefile.in
-===================================================================
---- libcpp/Makefile.in.orig    2011-11-08 16:24:10.000000000 +0100
-+++ libcpp/Makefile.in 2011-11-08 17:44:28.000000000 +0100
-@@ -49,6 +49,7 @@ LDFLAGS = @LDFLAGS@
- LIBICONV = @LIBICONV@
- LIBINTL = @LIBINTL@
- PACKAGE = @PACKAGE@
-+PACKAGE_SUFFIX = -4.7
- RANLIB = @RANLIB@
- SHELL = @SHELL@
- USED_CATALOGS = @USED_CATALOGS@
-@@ -73,8 +74,10 @@ INCLUDES = -I$(srcdir) -I. -I$(srcdir)/.
-       -I$(srcdir)/include
- ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
-+ALL_CFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\"
- ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \
-       $(CPPFLAGS)
-+ALL_CXXFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\"
- # The name of the compiler to use.
- ENABLE_BUILD_WITH_CXX = @ENABLE_BUILD_WITH_CXX@
-@@ -170,8 +173,8 @@ install-strip install: all installdirs
-         else continue; \
-         fi; \
-         dir=$(localedir)/$$lang/LC_MESSAGES; \
--        echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
--        $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
-+        echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
-+        $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
-       done
- mostlyclean:
-Index: libcpp/system.h
-===================================================================
---- libcpp/system.h.orig       2011-11-03 16:30:43.000000000 +0100
-+++ libcpp/system.h    2011-11-08 17:43:23.000000000 +0100
-@@ -273,7 +273,7 @@ extern int errno;
- #endif
- #ifndef _
--# define _(msgid) dgettext (PACKAGE, msgid)
-+# define _(msgid) dgettext (PACKAGE PACKAGE_SUFFIX, msgid)
- #endif
- #ifndef N_
-Index: libcpp/init.c
-===================================================================
---- libcpp/init.c.orig 2011-11-03 16:30:43.000000000 +0100
-+++ libcpp/init.c      2011-11-08 17:43:23.000000000 +0100
-@@ -140,7 +140,7 @@ init_library (void)
-       init_trigraph_map ();
- #ifdef ENABLE_NLS
--       (void) bindtextdomain (PACKAGE, LOCALEDIR);
-+       (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR);
- #endif
-     }
- }
diff --git a/packaging/gcc47-rpmlintrc b/packaging/gcc47-rpmlintrc
new file mode 100644 (file)
index 0000000..c041151
--- /dev/null
@@ -0,0 +1,12 @@
+# This line is mandatory to access the configuration functions
+from Config import *
+
+addFilter ("libgomp.*shlib-policy-name-error")
+addFilter ("libgcc.*shlib-policy-name-error")
+addFilter ("libgfortran.*shlib-policy-name-error")
+addFilter ("libquadmath.*shlib-policy-name-error")
+addFilter ("libobjc.*shlib-policy-name-error")
+addFilter ("libstdc.*shlib-policy-name-error")
+addFilter ("gcc47.*devel-dependency glibc-devel")
+addFilter ("gcc47-c.*devel-dependency libstdc")
+
diff --git a/packaging/gcc47-testresults.spec b/packaging/gcc47-testresults.spec
new file mode 100644 (file)
index 0000000..55424c8
--- /dev/null
@@ -0,0 +1,588 @@
+%define building_testsuite 1
+%define run_tests 1
+%define fast_build 1
+
+# Ada currently fails to build on a few platforms, enable it only
+# on those that work
+# Note that AdaCore only supports %ix86, x86_64 and ia64
+%ifarch %ix86 x86_64
+%define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
+%else
+%define build_ada 0
+%endif
+
+%define quadmath_arch %ix86 x86_64 ia64
+
+# We don't want to build java
+%ifarch mips
+%define build_java 0
+%define build_libjava 0
+%else
+%define build_java 1
+%define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+%endif
+
+%define build_cp 1
+%define build_fortran 1
+%define build_objc 1
+%define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
+%define build_with_mudflap 0
+
+%if %{build_objcp}
+%define build_cp 1
+%define build_objc 1
+%endif
+
+%if %{build_libjava}
+%define build_cp 1
+%endif
+
+# For optional compilers only build C, C++ and Fortran
+##%if 0%{?build_optional_compiler:1}%{?build_optional_compiler_languages:1}
+%if 0%{!?building_libffi:1}
+%define build_ada 0
+%define build_java 0
+%define build_libjava 0
+%define build_objc 1
+%define build_objcp 1
+%endif
+
+
+Name: gcc47-testresults
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-tools
+BuildRequires: makeinfo
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: texinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64 %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%if %{build_ada}
+%define hostsuffix -4.7
+BuildRequires: gcc47-ada
+%endif
+%if 0%{?building_libjava:1}%{?building_testsuite:1}
+BuildRequires: fastjar
+BuildRequires: unzip
+%endif
+%if 0%{?building_libffi:1}
+BuildRequires: pkg-config
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+%if 0%{?run_tests:1}
+BuildRequires: dejagnu
+BuildRequires: expect
+BuildRequires: gdb
+%endif
+
+# Define version number of libgcc_s
+%ifarch hppa
+%define libgcc_s 4
+%else
+%define libgcc_s 1
+%endif
+%ifarch ppc
+# We support building the nof libraries, but don't want this in the
+# regular rpms
+%define build_nof 0
+%else
+%define build_nof 0
+%endif
+
+%define separate_bi32 0
+%define separate_bi64 0
+%ifarch x86_64 
+%define separate_bi32 1
+%endif
+
+# Define two macros to trigger -32bit or -64bit package variants
+%define separate_biarch 0
+%if %{separate_bi32}
+%define separate_biarch 1
+%define separate_biarch_suffix -32bit
+%endif
+%if %{separate_bi64}
+%define separate_biarch 1
+%define separate_biarch_suffix -64bit
+%endif
+
+%ifarch x86_64
+# 64-bit is primary build target
+%define build_primary_64bit 1
+%else
+%define build_primary_64bit 0
+%endif
+
+%define biarch_libjava 0
+
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+
+%if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+Requires: binutils glibc-devel
+Requires: cpp47 = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgcc%{libgcc_s} >= %{version}-%{release}
+Requires: libgomp1 >= %{version}-%{release}
+%if %{build_with_mudflap}
+Requires: libmudflap0 >= %{version}-%{release}
+Requires: libmudflapth0 >= %{version}-%{release}
+%endif
+%else
+Requires: libgcc47 = %{version}-%{release}
+Requires: libgomp47 = %{version}-%{release}
+%endif
+%endif
+
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+Summary:      Testsuite results
+License:       SUSE-Public-Domain
+Group:        Development/Languages/C and C++
+
+%description 
+Results from running the gcc and target library testsuites.
+
+
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+
+# Versionspecific directories
+%define versmainlibdir %{libsubdir}
+%define versmainlibdirbi32 %{libsubdir}/32
+%define versmainlibdirbi64 %{libsubdir}/64
+%if %{build_primary_64bit}
+%define versmainlibdirbi %{versmainlibdirbi32}
+%else
+%define versmainlibdirbi %{versmainlibdirbi64}
+%endif
+
+%if 0%{?build_optional_compiler:1}
+%define mainlibdir %{versmainlibdir}
+%define mainlibdirbi32 %{versmainlibdirbi32}
+%define mainlibdirbi64 %{versmainlibdirbi64}
+%define noflibdir %{versnoflibdir}
+%define mainlibdirbi %{versmainlibdirbi}
+%else
+%define mainlibdir %{_libdir}
+%define mainlibdirbi32 %{_prefix}/lib
+%define mainlibdirbi64 %{_prefix}/lib64
+%define noflibdir %{_prefix}/lib/nof
+%if %{build_primary_64bit}
+%define mainlibdirbi %{mainlibdirbi32}
+%else
+%define mainlibdirbi %{mainlibdirbi64}
+%endif
+%endif
+
+
+# Now define a few macros that make it easy to package libs and
+# related files just to the right package, without caring for the
+# exact path the files are in.
+#   %mainlib  package X from all dirs that belong to the main package
+#   %biarchlib   package X from all dirs that belong to the -32/64bit package
+# by default, nof libs go where the 32bit libs go.
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%endif
+%define biarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define biarchlib() %{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%else
+%define biarchlib() %{mainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%endif
+%define versbiarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%else
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+
+%if 0%{?building_libffi:1}
+make stage1-bubble $PARALLEL
+make all-target-libffi $PARALLEL
+%else
+# Only run profiled bootstrap on archs where it works
+#%ifarch %ix86 x86_64 ppc ppc64 ia64
+#make profiledbootstrap-lean STAGE1_CFLAGS="-O -g" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%else
+%ifarch %arm
+STAGE1_FLAGS="-O0"
+%else
+STAGE1_FLAGS="-O -g"
+%endif
+#make bootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%endif
+#make -C gcc proto
+make info
+%if 0%{?run_tests:1}
+echo "Run testsuite"
+(make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
+make -k check $PARALLEL || true
+mkdir ../testresults
+../contrib/test_summary | tee ../testresults/test_summary.txt
+%endif
+%endif
+
+%install
+export NO_BRP_CHECK_BYTECODE_VERSION=true
+cd obj-%{GCCDIST}
+%if 0%{?run_tests:1} 
+cp `find . -name "*.sum"` ../testresults/
+cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
+chmod 644 ../testresults/*
+%endif
+
+%if 0%{?run_tests:1}
+%files 
+%defattr(-,root,root)
+%doc testresults/test_summary.txt
+%doc testresults/*.sum
+%doc testresults/*.log
+%endif
+
+
+%changelog
diff --git a/packaging/gcc47.spec b/packaging/gcc47.spec
new file mode 100644 (file)
index 0000000..d81a1c0
--- /dev/null
@@ -0,0 +1,2755 @@
+%define fast_build 1
+
+# Ada currently fails to build on a few platforms, enable it only
+# on those that work
+# Note that AdaCore only supports %ix86, x86_64 and ia64
+%ifarch %ix86 x86_64
+%define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
+%else
+%define build_ada 0
+%endif
+
+%define quadmath_arch %ix86 x86_64 ia64
+
+# We don't want to build java
+%ifarch mips
+%define build_java 0
+%define build_libjava 0
+%else
+%define build_java 1
+%define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+%endif
+
+%define build_cp 1
+%define build_fortran 1
+%define build_objc 1
+%define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
+%define build_with_mudflap 0
+
+%if %{build_objcp}
+%define build_cp 1
+%define build_objc 1
+%endif
+
+%if %{build_libjava}
+%define build_cp 1
+%endif
+
+# For optional compilers only build C, C++ and Fortran
+##%if 0%{?build_optional_compiler:1}%{?build_optional_compiler_languages:1}
+%if 0%{!?building_libffi:1}
+%define build_ada 0
+%define build_java 0
+%define build_libjava 0
+%define build_objc 1
+%define build_objcp 1
+%endif
+
+
+Name:         gcc47
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-tools
+BuildRequires: makeinfo
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: texinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64 %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%if %{build_ada}
+%define hostsuffix -4.7
+BuildRequires: gcc47-ada
+%endif
+%if 0%{?building_libjava:1}%{?building_testsuite:1}
+BuildRequires: fastjar
+BuildRequires: unzip
+%endif
+%if 0%{?building_libffi:1}
+BuildRequires: pkg-config
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+%if 0%{?run_tests:1}
+BuildRequires: dejagnu
+BuildRequires: expect
+BuildRequires: gdb
+%endif
+
+# Define version number of libgcc_s
+%ifarch hppa
+%define libgcc_s 4
+%else
+%define libgcc_s 1
+%endif
+%ifarch ppc
+# We support building the nof libraries, but don't want this in the
+# regular rpms
+%define build_nof 0
+%else
+%define build_nof 0
+%endif
+
+%define separate_bi32 0
+%define separate_bi64 0
+%ifarch x86_64 
+%define separate_bi32 1
+%endif
+
+# Define two macros to trigger -32bit or -64bit package variants
+%define separate_biarch 0
+%if %{separate_bi32}
+%define separate_biarch 1
+%define separate_biarch_suffix -32bit
+%endif
+%if %{separate_bi64}
+%define separate_biarch 1
+%define separate_biarch_suffix -64bit
+%endif
+
+%ifarch x86_64
+# 64-bit is primary build target
+%define build_primary_64bit 1
+%else
+%define build_primary_64bit 0
+%endif
+
+%define biarch_libjava 0
+
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+
+%if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+Requires: binutils glibc-devel
+Requires: cpp47 = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgcc%{libgcc_s} >= %{version}-%{release}
+Requires: libgomp1 >= %{version}-%{release}
+%if %{build_with_mudflap}
+Requires: libmudflap0 >= %{version}-%{release}
+Requires: libmudflapth0 >= %{version}-%{release}
+%endif
+%else
+Requires: libgcc47 = %{version}-%{release}
+Requires: libgomp47 = %{version}-%{release}
+%endif
+%endif
+
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+# LIBJAVA-DELETE-BEGIN
+Group:         Development/Languages/C and C++
+Summary:       The GNU C Compiler and Support Files
+License:        GPL-3.0+
+
+%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++.
+
+
+
+# COMMON-END
+%package -n gcc47-32bit
+Summary:      The GNU C Compiler 32bit support
+Group:        Development/Languages/C and C++
+Requires: gcc47 = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgcc%{libgcc_s}-32bit >= %{version}-%{release}
+Requires: libgomp1-32bit >= %{version}-%{release}
+%if %{build_with_mudflap}
+Requires: libmudflap0-32bit >= %{version}-%{release}
+Requires: libmudflapth0-32bit >= %{version}-%{release}
+%endif
+%else
+Requires: libgcc47-32bit = %{version}-%{release}
+Requires: libgomp47-32bit = %{version}-%{release}
+%endif
+Requires: glibc-devel-32bit
+
+%description -n gcc47-32bit
+This package contains 32bit support for the GNU Compiler Collection.
+
+%package -n gcc47-64bit
+Summary:      The GNU C Compiler 64bit support
+Group:        Development/Languages/C and C++
+Requires: gcc47 = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgcc%{libgcc_s}-64bit >= %{version}-%{release}
+Requires: libgomp1-64bit >= %{version}-%{release}
+%if %{build_with_mudflap}
+Requires: libmudflap0-64bit >= %{version}-%{release}
+Requires: libmudflapth0-64bit >= %{version}-%{release}
+%endif
+%else
+Requires: libgcc47-64bit = %{version}-%{release}
+Requires: libgomp47-64bit = %{version}-%{release}
+%endif
+Requires: glibc-devel-64bit
+
+%description -n gcc47-64bit
+This package contains 64bit support for the GNU Compiler Collection.
+
+
+%package locale
+Summary:      Locale Data for the GNU Compiler Collection
+License:        GPL-3.0+
+Group:        Development/Languages/C and C++
+Requires: gcc47 = %{version}-%{release}
+
+%description locale
+Locale data for the GNU Compiler Collection (GCC) to give error message
+in the current locale.
+
+
+%package c++
+Summary:      The GNU C++ Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/C and C++
+Requires: gcc47 = %{version}-%{release}
+Requires: libstdc++47-devel = %{version}-%{release}
+
+%description c++
+This package contains the GNU compiler for C++.
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libstdc++47-devel
+Summary:      Include Files and Libraries mandatory for Development
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/C and C++
+%if 0%{!?build_optional_compiler:1}
+Requires: libstdc++6 >= %{version}-%{release}
+%else
+Requires: libstdc++47 = %{version}-%{release}
+%endif
+Requires: glibc-devel
+%ifarch ia64
+Requires: libunwind-devel
+%endif
+
+%description -n libstdc++47-devel
+This package contains all the headers and libraries of the standard C++
+library. It is needed for compiling C++ code.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libstdc++47-devel-32bit
+Summary:      Include Files and Libraries mandatory for Development
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/C and C++
+%if 0%{!?build_optional_compiler:1}
+Requires: libstdc++6-32bit >= %{version}-%{release}
+%else
+Requires: libstdc++47-32bit = %{version}-%{release}
+%endif
+Requires: glibc-devel-32bit
+%ifarch ia64
+Requires: libunwind-devel
+%endif
+
+%description -n libstdc++47-devel-32bit
+This package contains all the headers and libraries of the standard C++
+library. It is needed for compiling C++ code.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libstdc++47-devel-64bit
+Summary:      Include Files and Libraries mandatory for Development
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/C and C++
+%if 0%{!?build_optional_compiler:1}
+Requires: libstdc++6-64bit >= %{version}-%{release}
+%else
+Requires: libstdc++47-64bit = %{version}-%{release}
+%endif
+Requires: glibc-devel-64bit
+%ifarch ia64
+Requires: libunwind-devel
+%endif
+
+%description -n libstdc++47-devel-64bit
+This package contains all the headers and libraries of the standard C++
+library. It is needed for compiling C++ code.
+# PACKAGE-END
+
+%package -n libstdc++47-doc
+Summary:      Documentation for the GNU C++ standard library
+License:        GPL-3.0+
+Group:        Documentation/HTML
+BuildArch:    noarch
+
+%description -n libstdc++47-doc
+Extensive HTML documentation for the GNU C++ standard library.
+
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libgcc47
+Summary:      C compiler runtime library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Base
+%if 0%{!?build_optional_compiler:1}
+Provides: libgcc%{libgcc_s} = %{version}-%{release}
+Conflicts: libgcc%{libgcc_s} < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libgcc47
+Libgcc is needed for dynamically linked C programs.
+
+%post -n libgcc47
+/sbin/ldconfig
+
+%postun -n libgcc47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libgcc47-32bit
+Summary:      C compiler runtime library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Base
+%if 0%{!?build_optional_compiler:1}
+Provides: libgcc%{libgcc_s}-32bit = %{version}-%{release}
+Conflicts: libgcc%{libgcc_s}-32bit < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libgcc47-32bit
+Libgcc is needed for dynamically linked C programs.
+
+%post -n libgcc47-32bit
+/sbin/ldconfig
+
+%postun -n libgcc47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libgcc47-64bit
+Summary:      C compiler runtime library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Base
+%if 0%{!?build_optional_compiler:1}
+Provides: libgcc%{libgcc_s}-64bit = %{version}-%{release}
+Conflicts: libgcc%{libgcc_s}-64bit < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libgcc47-64bit
+Libgcc is needed for dynamically linked C programs.
+
+%post -n libgcc47-64bit
+/sbin/ldconfig
+
+%postun -n libgcc47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libgomp47
+Summary:      The GNU compiler collection OpenMP runtime library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Base
+%if 0%{!?build_optional_compiler:1}
+Provides: libgomp1 = %{version}-%{release}
+Conflicts: libgomp1 < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libgomp47
+This is the OpenMP runtime library needed by OpenMP enabled programs
+that were built with the -fopenmp compiler option and by programs that
+were auto-parallelized via the -ftree-parallelize-loops compiler
+option.
+
+
+%post -n libgomp47
+/sbin/ldconfig
+
+%postun -n libgomp47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libgomp47-32bit
+Summary:      The GNU compiler collection OpenMP runtime library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Base
+%if 0%{!?build_optional_compiler:1}
+Provides: libgomp1-32bit = %{version}-%{release}
+Conflicts: libgomp1-32bit < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libgomp47-32bit
+This is the OpenMP runtime library needed by OpenMP enabled programs
+that were built with the -fopenmp compiler option and by programs that
+were auto-parallelized via the -ftree-parallelize-loops compiler
+option.
+
+
+%post -n libgomp47-32bit
+/sbin/ldconfig
+
+%postun -n libgomp47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libgomp47-64bit
+Summary:      The GNU compiler collection OpenMP runtime library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Base
+%if 0%{!?build_optional_compiler:1}
+Provides: libgomp1-64bit = %{version}-%{release}
+Conflicts: libgomp1-64bit < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libgomp47-64bit
+This is the OpenMP runtime library needed by OpenMP enabled programs
+that were built with the -fopenmp compiler option and by programs that
+were auto-parallelized via the -ftree-parallelize-loops compiler
+option.
+
+
+%post -n libgomp47-64bit
+/sbin/ldconfig
+
+%postun -n libgomp47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libstdc++47
+Summary:      The standard C++ shared library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Libraries
+%if 0%{!?build_optional_compiler:1}
+Provides: libstdc++6 = %{version}-%{release}
+Conflicts: libstdc++6 < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libstdc++47
+The standard C++ library, needed for dynamically linked C++ programs.
+
+
+%post -n libstdc++47
+/sbin/ldconfig
+
+%postun -n libstdc++47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libstdc++47-32bit
+Summary:      The standard C++ shared library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Libraries
+%if 0%{!?build_optional_compiler:1}
+Provides: libstdc++6-32bit = %{version}-%{release}
+Conflicts: libstdc++6-32bit < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libstdc++47-32bit
+The standard C++ library, needed for dynamically linked C++ programs.
+
+
+%post -n libstdc++47-32bit
+/sbin/ldconfig
+
+%postun -n libstdc++47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libstdc++47-64bit
+Summary:      The standard C++ shared library
+License:        GPL-3.0-with-GCC-exception
+Group:        System/Libraries
+%if 0%{!?build_optional_compiler:1}
+Provides: libstdc++6-64bit = %{version}-%{release}
+Conflicts: libstdc++6-64bit < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libstdc++47-64bit
+The standard C++ library, needed for dynamically linked C++ programs.
+
+
+%post -n libstdc++47-64bit
+/sbin/ldconfig
+
+%postun -n libstdc++47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+
+%package info
+Summary:      Documentation for the GNU compiler collection
+License:      GFDL-1.2
+Group:        Documentation/Other
+BuildArch:    noarch
+
+%description info
+GNU info-pages for the GNU compiler collection covering both user-level
+and internals documentation.
+
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package objc
+Summary:      GNU Objective C Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc47 = %{version}-%{release}
+Requires: libobjc2 >= %{version}-%{release}
+
+%description objc
+This package contains the GNU Objective C compiler. Objective C is an
+object oriented language, created by Next Inc. and used in their
+Nextstep OS. The source code is available in the gcc package.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package objc-32bit
+Summary:      GNU Objective C Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc47 = %{version}-%{release}
+Requires: libobjc2-32bit >= %{version}-%{release}
+
+%description objc-32bit
+This package contains the GNU Objective C compiler. Objective C is an
+object oriented language, created by Next Inc. and used in their
+Nextstep OS. The source code is available in the gcc package.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package objc-64bit
+Summary:      GNU Objective C Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc47 = %{version}-%{release}
+Requires: libobjc2-64bit >= %{version}-%{release}
+
+%description objc-64bit
+This package contains the GNU Objective C compiler. Objective C is an
+object oriented language, created by Next Inc. and used in their
+Nextstep OS. The source code is available in the gcc package.
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libobjc47
+Summary:      Library for the GNU Objective C Compiler
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Libraries/Other
+Provides: libobjc2 = %{version}-%{release}
+Conflicts: libobjc2 < %{version}-%{release}
+
+%description -n libobjc47
+The library for the GNU Objective C compiler.
+
+%post -n libobjc47
+/sbin/ldconfig
+
+%postun -n libobjc47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libobjc47-32bit
+Summary:      Library for the GNU Objective C Compiler
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Libraries/Other
+Provides: libobjc2-32bit = %{version}-%{release}
+Conflicts: libobjc2-32bit < %{version}-%{release}
+
+%description -n libobjc47-32bit
+The library for the GNU Objective C compiler.
+
+%post -n libobjc47-32bit
+/sbin/ldconfig
+
+%postun -n libobjc47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libobjc47-64bit
+Summary:      Library for the GNU Objective C Compiler
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Libraries/Other
+Provides: libobjc2-64bit = %{version}-%{release}
+Conflicts: libobjc2-64bit < %{version}-%{release}
+
+%description -n libobjc47-64bit
+The library for the GNU Objective C compiler.
+
+%post -n libobjc47-64bit
+/sbin/ldconfig
+
+%postun -n libobjc47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+%package obj-c++
+Summary:      GNU Objective C++ Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc47-objc = %{version}-%{release}
+Requires: gcc47-c++ = %{version}-%{release}
+
+%description obj-c++
+This package contains the GNU Objective C++ compiler. Objective C++ is an
+object oriented language, created by Next Inc. and used in their
+Nextstep OS. The source code is available in the gcc package.
+
+
+%package -n cpp47
+Summary:      The GCC Preprocessor
+License:        GPL-3.0+
+Group:        Development/Languages/C and C++
+
+%description -n cpp47
+This Package contains just the preprocessor that is used by the X11
+packages.
+
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package ada
+Summary:      GNU Ada95 Compiler Based on GCC (GNAT)
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc47 = %{version}-%{release}
+Requires: libada47 = %{version}-%{release}
+
+%description ada
+This package contains an Ada95 compiler and associated development
+tools based on the GNU GCC technology. Ada95 is the object oriented
+successor of the Ada83 language. To build this package from source you
+must have installed a binary version to bootstrap the compiler.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package ada-32bit
+Summary:      GNU Ada95 Compiler Based on GCC (GNAT)
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc47-32bit = %{version}-%{release}
+Requires: libada47-32bit = %{version}-%{release}
+
+%description ada-32bit
+This package contains an Ada95 compiler and associated development
+tools based on the GNU GCC technology. Ada95 is the object oriented
+successor of the Ada83 language. To build this package from source you
+must have installed a binary version to bootstrap the compiler.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package ada-64bit
+Summary:      GNU Ada95 Compiler Based on GCC (GNAT)
+License:        GPL-3.0+
+Group:        Development/Languages/Other
+Requires: gcc47-64bit = %{version}-%{release}
+Requires: libada47-64bit = %{version}-%{release}
+
+%description ada-64bit
+This package contains an Ada95 compiler and associated development
+tools based on the GNU GCC technology. Ada95 is the object oriented
+successor of the Ada83 language. To build this package from source you
+must have installed a binary version to bootstrap the compiler.
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libada47
+Summary:      GNU Ada Runtime Libraries
+License:      GPL-3.0-with-GCC-exception
+Group:        System/Libraries
+Provides: libgnarl-4_7 = %{version}-%{release}
+Conflicts: libgnarl-4_7 < %{version}-%{release}
+Provides: libgnat-4_7 = %{version}-%{release}
+Conflicts: libgnat-4_7 < %{version}-%{release}
+
+%description -n libada47
+This package contains the shared libraries required to run programs
+compiled with the GNU Ada compiler (GNAT) if they are compiled to use
+shared libraries. It also contains the shared libraries for the
+Implementation of the Ada Semantic Interface Specification (ASIS), the
+implementation of Distributed Systems Programming (GLADE) and the Posix
+1003.5 Binding (Florist).
+
+%post -n libada47
+/sbin/ldconfig
+
+%postun -n libada47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libada47-32bit
+Summary:      GNU Ada Runtime Libraries
+License:      GPL-3.0-with-GCC-exception
+Group:        System/Libraries
+Provides: libgnarl-4_7-32bit = %{version}-%{release}
+Conflicts: libgnarl-4_7-32bit < %{version}-%{release}
+Provides: libgnat-4_7-32bit = %{version}-%{release}
+Conflicts: libgnat-4_7-32bit < %{version}-%{release}
+
+%description -n libada47-32bit
+This package contains the shared libraries required to run programs
+compiled with the GNU Ada compiler (GNAT) if they are compiled to use
+shared libraries. It also contains the shared libraries for the
+Implementation of the Ada Semantic Interface Specification (ASIS), the
+implementation of Distributed Systems Programming (GLADE) and the Posix
+1003.5 Binding (Florist).
+
+%post -n libada47-32bit
+/sbin/ldconfig
+
+%postun -n libada47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libada47-64bit
+Summary:      GNU Ada Runtime Libraries
+License:      GPL-3.0-with-GCC-exception
+Group:        System/Libraries
+Provides: libgnarl-4_7-64bit = %{version}-%{release}
+Conflicts: libgnarl-4_7-64bit < %{version}-%{release}
+Provides: libgnat-4_7-64bit = %{version}-%{release}
+Conflicts: libgnat-4_7-64bit < %{version}-%{release}
+
+%description -n libada47-64bit
+This package contains the shared libraries required to run programs
+compiled with the GNU Ada compiler (GNAT) if they are compiled to use
+shared libraries. It also contains the shared libraries for the
+Implementation of the Ada Semantic Interface Specification (ASIS), the
+implementation of Distributed Systems Programming (GLADE) and the Posix
+1003.5 Binding (Florist).
+
+%post -n libada47-64bit
+/sbin/ldconfig
+
+%postun -n libada47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package fortran
+Summary:      The GNU Fortran Compiler and Support Files
+License:        GPL-3.0+
+Group:        Development/Languages/Fortran
+Requires: gcc47 = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgfortran3 >= %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath0 >= %{version}-%{release}
+%endif
+%else
+Requires: libgfortran47 = %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath47 = %{version}-%{release}
+%endif
+%endif
+
+%description fortran
+This is the Fortran compiler of the GNU Compiler Collection (GCC).
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package fortran-32bit
+Summary:      The GNU Fortran Compiler and Support Files
+License:        GPL-3.0+
+Group:        Development/Languages/Fortran
+Requires: gcc47 = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgfortran3-32bit >= %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath0-32bit >= %{version}-%{release}
+%endif
+%else
+Requires: libgfortran47-32bit = %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath47-32bit = %{version}-%{release}
+%endif
+%endif
+
+%description fortran-32bit
+This is the Fortran compiler of the GNU Compiler Collection (GCC).
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package fortran-64bit
+Summary:      The GNU Fortran Compiler and Support Files
+License:        GPL-3.0+
+Group:        Development/Languages/Fortran
+Requires: gcc47 = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgfortran3-64bit >= %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath0-64bit >= %{version}-%{release}
+%endif
+%else
+Requires: libgfortran47-64bit = %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath47-64bit = %{version}-%{release}
+%endif
+%endif
+
+%description fortran-64bit
+This is the Fortran compiler of the GNU Compiler Collection (GCC).
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libgfortran47
+Summary:      The GNU Fortran Compiler Runtime Library
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/Fortran
+%if 0%{!?build_optional_compiler:1}
+Provides: libgfortran3 = %{version}-%{release}
+Conflicts: libgfortran3 < %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath0 >= %{version}-%{release}
+%endif
+%else
+%ifarch %quadmath_arch
+Requires: libquadmath47 = %{version}-%{release}
+%endif
+Autoprov: no
+%endif
+
+%description -n libgfortran47
+The runtime library needed to run programs compiled with the Fortran compiler
+of the GNU Compiler Collection (GCC).
+
+%post -n libgfortran47
+/sbin/ldconfig
+
+%postun -n libgfortran47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libgfortran47-32bit
+Summary:      The GNU Fortran Compiler Runtime Library
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/Fortran
+%if 0%{!?build_optional_compiler:1}
+Provides: libgfortran3-32bit = %{version}-%{release}
+Conflicts: libgfortran3-32bit < %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath0-32bit >= %{version}-%{release}
+%endif
+%else
+%ifarch %quadmath_arch
+Requires: libquadmath47-32bit = %{version}-%{release}
+%endif
+Autoprov: no
+%endif
+
+%description -n libgfortran47-32bit
+The runtime library needed to run programs compiled with the Fortran compiler
+of the GNU Compiler Collection (GCC).
+
+%post -n libgfortran47-32bit
+/sbin/ldconfig
+
+%postun -n libgfortran47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libgfortran47-64bit
+Summary:      The GNU Fortran Compiler Runtime Library
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/Fortran
+%if 0%{!?build_optional_compiler:1}
+Provides: libgfortran3-64bit = %{version}-%{release}
+Conflicts: libgfortran3-64bit < %{version}-%{release}
+%ifarch %quadmath_arch
+Requires: libquadmath0-64bit >= %{version}-%{release}
+%endif
+%else
+%ifarch %quadmath_arch
+Requires: libquadmath47-64bit = %{version}-%{release}
+%endif
+Autoprov: no
+%endif
+
+%description -n libgfortran47-64bit
+The runtime library needed to run programs compiled with the Fortran compiler
+of the GNU Compiler Collection (GCC).
+
+%post -n libgfortran47-64bit
+/sbin/ldconfig
+
+%postun -n libgfortran47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libquadmath47
+Summary:      The GNU Fortran Compiler Quadmath Runtime Library
+License:        LGPL-2.1
+Group:        Development/Languages/Fortran
+%if 0%{!?build_optional_compiler:1}
+Provides: libquadmath0 = %{version}-%{release}
+Conflicts: libquadmath0 < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libquadmath47
+The runtime library needed to run programs compiled with the Fortran compiler
+of the GNU Compiler Collection (GCC) and quadruple precision floating point
+operations.
+
+%post -n libquadmath47
+/sbin/ldconfig
+
+%postun -n libquadmath47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libquadmath47-32bit
+Summary:      The GNU Fortran Compiler Quadmath Runtime Library
+License:        LGPL-2.1
+Group:        Development/Languages/Fortran
+%if 0%{!?build_optional_compiler:1}
+Provides: libquadmath0-32bit = %{version}-%{release}
+Conflicts: libquadmath0-32bit < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libquadmath47-32bit
+The runtime library needed to run programs compiled with the Fortran compiler
+of the GNU Compiler Collection (GCC) and quadruple precision floating point
+operations.
+
+%post -n libquadmath47-32bit
+/sbin/ldconfig
+
+%postun -n libquadmath47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libquadmath47-64bit
+Summary:      The GNU Fortran Compiler Quadmath Runtime Library
+License:        LGPL-2.1
+Group:        Development/Languages/Fortran
+%if 0%{!?build_optional_compiler:1}
+Provides: libquadmath0-64bit = %{version}-%{release}
+Conflicts: libquadmath0-64bit < %{version}-%{release}
+%else
+Autoprov: no
+%endif
+
+%description -n libquadmath47-64bit
+The runtime library needed to run programs compiled with the Fortran compiler
+of the GNU Compiler Collection (GCC) and quadruple precision floating point
+operations.
+
+%post -n libquadmath47-64bit
+/sbin/ldconfig
+
+%postun -n libquadmath47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libmudflap47
+Summary:      The Mudflap Extension Runtime Library
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/C and C++
+Provides: libmudflap0 = %{version}-%{release}
+Conflicts: libmudflap0 < %{version}-%{release}
+Provides: libmudflapth0 = %{version}-%{release}
+Conflicts: libmudflapth0 < %{version}-%{release}
+
+%description -n libmudflap47
+This is the Mudflap Extension Runtime Library.
+
+%post -n libmudflap47
+/sbin/ldconfig
+
+%postun -n libmudflap47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libmudflap47-32bit
+Summary:      The Mudflap Extension Runtime Library
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/C and C++
+Provides: libmudflap0-32bit = %{version}-%{release}
+Conflicts: libmudflap0-32bit < %{version}-%{release}
+Provides: libmudflapth0-32bit = %{version}-%{release}
+Conflicts: libmudflapth0-32bit < %{version}-%{release}
+
+%description -n libmudflap47-32bit
+This is the Mudflap Extension Runtime Library.
+
+%post -n libmudflap47-32bit
+/sbin/ldconfig
+
+%postun -n libmudflap47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libmudflap47-64bit
+Summary:      The Mudflap Extension Runtime Library
+License:        GPL-3.0-with-GCC-exception
+Group:        Development/Languages/C and C++
+Provides: libmudflap0-64bit = %{version}-%{release}
+Conflicts: libmudflap0-64bit < %{version}-%{release}
+Provides: libmudflapth0-64bit = %{version}-%{release}
+Conflicts: libmudflapth0-64bit < %{version}-%{release}
+
+%description -n libmudflap47-64bit
+This is the Mudflap Extension Runtime Library.
+
+%post -n libmudflap47-64bit
+/sbin/ldconfig
+
+%postun -n libmudflap47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+
+%package -n libgcj47
+# LIBJAVA-DELETE-END
+Summary:      Java Runtime Library for gcc
+License:      GPL-2.0-with-classpath-exception
+Group:        System/Libraries
+%define gcj_sover 13
+Provides: libgcj%{gcj_sover} = %{version}-%{release}
+Conflicts: libgcj%{gcj_sover} < %{version}-%{release}
+Provides: libgij%{gcj_sover} = %{version}-%{release}
+Conflicts: libgij%{gcj_sover} < %{version}-%{release}
+Provides: libgcj-tools%{gcj_sover} = %{version}-%{release}
+Conflicts: libgcj-tools%{gcj_sover} < %{version}-%{release}
+
+%description -n libgcj47
+This library is needed if you want to use the GNU Java compiler, gcj.
+Source code for this package is in gcc.
+
+%post -n libgcj47
+/sbin/ldconfig
+
+%postun -n libgcj47
+/sbin/ldconfig
+
+
+%package -n gcc47-java
+Summary:      The GNU Java Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/Java
+Requires: gcc47 = %{version}
+Requires: libgcj47-devel = %{version}-%{release}
+
+%description -n gcc47-java
+The Java compiler from the GCC-tools-suite.
+
+
+%package -n libgcj_bc47
+Summary:      Fake library for BC-ABI compatibility.
+License:        GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+Provides: libgcj_bc1 = %{version}-%{release}
+Conflicts: libgcj_bc1 < %{version}-%{release}
+# libgcj_bc is special in that it just contains a symlink to
+# a proper libgcj version.  So require that library and add
+# provides for the shlib version as created at link time
+Requires: libgcj%{gcj_sover}
+%ifarch x86_64 
+Provides: libgcj_bc.so.1()(64bit)
+%else
+Provides: libgcj_bc.so.1
+%endif
+
+
+%description -n libgcj_bc47
+A fake library that is used at link time only. It ensures that
+binaries built with the BC-ABI link against a constant SONAME.
+This way, BC-ABI binaries continue to work if the SONAME underlying
+libgcj.so changes.
+
+
+%package -n libgcj47-jar
+Summary:      Java runtime library (jar files).
+License:        GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+
+%description -n libgcj47-jar
+These are the jar files that go along with the gcj front end to gcc.
+
+
+%package -n libgcj47-devel
+Summary:      Include Files and Libraries mandatory for Development.
+License:        GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+Requires: libstdc++47-devel = %{version}
+Requires: libgcj%{gcj_sover} >= %{version}-%{release}
+Requires: libgcj_bc1 >= %{version}-%{release}
+Requires: libgcj47-jar = %{version}-%{release}
+Requires: gtk2-devel
+Requires: libart_lgpl-devel
+Requires: glibc-devel
+Requires: zlib-devel
+%ifarch ia64
+Requires: libunwind-devel
+%endif
+
+%description -n libgcj47-devel
+This package contains all necessary include files and libraries needed
+to develop applications that require these.
+
+
+%package -n gcc47-gij
+Summary:      Java Bytecode Interpreter for gcc
+License:      GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+Requires: libgcj%{gcj_sover} >= %{version}-%{release}
+
+%description -n gcc47-gij
+This package contains the java bytecode interpreter gij and related tools.
+
+# LIBFFI-DELETE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4 = %{version}-%{release}
+Conflicts: libffi4 < %{version}-%{release}
+
+%description -n libffi47
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post -n libffi47
+/sbin/ldconfig
+
+%postun -n libffi47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-32bit
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4-32bit = %{version}-%{release}
+Conflicts: libffi4-32bit < %{version}-%{release}
+
+%description -n libffi47-32bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post -n libffi47-32bit
+/sbin/ldconfig
+
+%postun -n libffi47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-64bit
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4-64bit = %{version}-%{release}
+Conflicts: libffi4-64bit < %{version}-%{release}
+
+%description -n libffi47-64bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post -n libffi47-64bit
+/sbin/ldconfig
+
+%postun -n libffi47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-devel
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4 >= %{version}-%{release}
+Provides: libffi-devel = %{version}-%{release}
+Conflicts: libffi-devel < %{version}-%{release}
+
+%description -n libffi47-devel
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-devel-32bit
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4-32bit >= %{version}-%{release}
+Provides: libffi-devel-32bit = %{version}-%{release}
+Conflicts: libffi-devel-32bit < %{version}-%{release}
+
+%description -n libffi47-devel-32bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-devel-64bit
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4-64bit >= %{version}-%{release}
+Provides: libffi-devel-64bit = %{version}-%{release}
+Conflicts: libffi-devel-64bit < %{version}-%{release}
+
+%description -n libffi47-devel-64bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+
+%package -n gcc47-testresults
+# GCC-TESTSUITE-DELETE-END
+Summary:      Testsuite results
+License:       SUSE-Public-Domain
+Group:        Development/Languages/C and C++
+
+%description -n gcc47-testresults
+Results from running the gcc and target library testsuites.
+
+
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+
+# Versionspecific directories
+%define versmainlibdir %{libsubdir}
+%define versmainlibdirbi32 %{libsubdir}/32
+%define versmainlibdirbi64 %{libsubdir}/64
+%if %{build_primary_64bit}
+%define versmainlibdirbi %{versmainlibdirbi32}
+%else
+%define versmainlibdirbi %{versmainlibdirbi64}
+%endif
+
+%if 0%{?build_optional_compiler:1}
+%define mainlibdir %{versmainlibdir}
+%define mainlibdirbi32 %{versmainlibdirbi32}
+%define mainlibdirbi64 %{versmainlibdirbi64}
+%define noflibdir %{versnoflibdir}
+%define mainlibdirbi %{versmainlibdirbi}
+%else
+%define mainlibdir %{_libdir}
+%define mainlibdirbi32 %{_prefix}/lib
+%define mainlibdirbi64 %{_prefix}/lib64
+%define noflibdir %{_prefix}/lib/nof
+%if %{build_primary_64bit}
+%define mainlibdirbi %{mainlibdirbi32}
+%else
+%define mainlibdirbi %{mainlibdirbi64}
+%endif
+%endif
+
+
+# Now define a few macros that make it easy to package libs and
+# related files just to the right package, without caring for the
+# exact path the files are in.
+#   %mainlib  package X from all dirs that belong to the main package
+#   %biarchlib   package X from all dirs that belong to the -32/64bit package
+# by default, nof libs go where the 32bit libs go.
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%endif
+%define biarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define biarchlib() %{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%else
+%define biarchlib() %{mainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%endif
+%define versbiarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%else
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+
+%if 0%{?building_libffi:1}
+make stage1-bubble $PARALLEL
+make all-target-libffi $PARALLEL
+%else
+# Only run profiled bootstrap on archs where it works
+#%ifarch %ix86 x86_64 ppc ppc64 ia64
+#make profiledbootstrap-lean STAGE1_CFLAGS="-O -g" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%else
+%ifarch %arm
+STAGE1_FLAGS="-O0"
+%else
+STAGE1_FLAGS="-O -g"
+%endif
+#make bootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%endif
+#make -C gcc proto
+make info
+%if 0%{?run_tests:1}
+echo "Run testsuite"
+(make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
+make -k check $PARALLEL || true
+mkdir ../testresults
+../contrib/test_summary | tee ../testresults/test_summary.txt
+%endif
+%endif
+
+%install
+export NO_BRP_CHECK_BYTECODE_VERSION=true
+cd obj-%{GCCDIST}
+# GCC-TESTSUITE-DELETE-BEGIN
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
+%if 0%{?building_libffi:1}
+make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
+%else
+%if 0%{?building_libjava:1}
+make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
+make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
+# install-common also installs collect2, gcov and the g++ and gfortran driver
+%if %{build_cp}
+rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
+%endif
+%if %{build_fortran}
+rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
+%endif
+rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
+rm $RPM_BUILD_ROOT%{libsubdir}/collect2
+%else
+make install DESTDIR=$RPM_BUILD_ROOT
+%if %{build_java}
+make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
+rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
+rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{libsubdir}/jc1
+rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
+%endif
+%endif
+%endif
+
+# Remove libffi installed files if we did not want to build it
+%if !0%{?building_libffi:1}
+rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
+%if %{biarch}
+  rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
+%endif
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
+%endif
+
+# Remove some useless .la files
+for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
+    libmudflap libmudflapth libgomp libstdc++ libsupc++ libgcj-tools libgij; do
+  rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
+%if %{biarch}
+  rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
+%endif
+done
+
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
+%if %{biarch}
+%if %{build_primary_64bit}
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
+%else
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
+%endif
+%endif
+
+# LIBFFI-DELETE-BEGIN
+# LIBJAVA-DELETE-BEGIN
+%if %{build_cp}
+# Merge multilib c++config.h to allow omitting the duplicate and
+# identical other arch specific headers
+dir_ml=
+cxxconfig="`find %{GCCDIST}/libstdc++-v3/include -name c++config.h`"
+for i in `find %{GCCDIST}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do
+  if ! diff -up $cxxconfig $i; then
+    file_32=x
+    file_64=x
+    case $i in
+      %{GCCDIST}/32/*)
+        file_32=$i
+        file_64=$cxxconfig
+        dir_ml=32
+       ;;
+      %{GCCDIST}/64/*)
+        file_32=$cxxconfig
+       file_64=$i
+        dir_ml=64
+       ;;
+    esac
+    if ! ( test -f "$file_32" && test -f "$file_64" ); then
+      echo "Urgs?"
+      exit 1
+    fi
+    
+    cat > $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF
+#ifndef _CPP_CPPCONFIG_WRAPPER
+#define _CPP_CPPCONFIG_WRAPPER 1
+#include <bits/wordsize.h>
+#if __WORDSIZE == 32
+`cat $file_32`
+#else
+`cat $file_64`
+#endif
+#endif
+EOF
+    break
+  fi
+done
+rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]*
+if ! test -z "$dir_ml"; then
+  ln -s . $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml
+fi
+%endif
+# LIBJAVA-DELETE-END
+
+%if 0%{!?build_optional_compiler:1}
+# move shared libs from versionspecific dir to main libdir
+for libname in \
+%if 0%{?building_libjava:1}
+  libgcj libgij libgcj-tools \
+%else
+%if %{build_fortran}
+  libgfortran \
+%ifarch %quadmath_arch
+  libquadmath \
+%endif
+%endif
+%if %{build_objc}
+  libobjc \
+%endif
+%if %{build_cp}
+  libstdc++ \
+%endif
+  libgomp \
+%if %{build_with_mudflap}
+  libmudflap libmudflapth \
+%endif
+%endif
+    ; do
+  for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do
+    mv $lib $RPM_BUILD_ROOT%{mainlibdir}/
+  done
+  ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
+         $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so
+%if %{biarch}
+  if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
+    for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do
+      mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/
+    done
+    ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
+         $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so
+  fi
+%endif
+done
+%if %{build_cp}
+%if !0%{?building_libjava:1}
+# And we want to move the shlib gdb pretty printers to a more sane
+# place so ldconfig does not complain
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}
+mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/
+sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py
+%if %{biarch}
+  if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
+    mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}
+    mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/
+    sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py
+  fi
+%endif
+%endif
+%endif
+%if 0%{?building_libjava:1}
+# libgcj_bc is special as the .so file is actually a different
+# library as the library refered to by the SONAME which should
+# be a simple link to our libgcj.
+for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name libgcj_bc.so.*`; do
+  rm $lib
+done
+ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdir}/libgcj_bc.so.1
+%if %{biarch_libjava}
+for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name libgcj_bc.so.*`; do
+  rm $lib
+done
+ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdirbi}/libgcj_bc.so.1
+%endif
+%endif
+%endif
+
+# LIBJAVA-DELETE-BEGIN
+%if 0%{!?build_optional_compiler:1}
+# Move libgcc_s around
+if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so
+  ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/
+fi
+chmod a+x $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s}
+%if %{biarch}
+%if %{build_primary_64bit}
+if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so
+  ln -sf /lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/
+fi
+ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so
+chmod a+x $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s}
+%else
+# 32-bit biarch systems
+if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so
+  ln -sf /lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/
+fi
+ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so
+chmod a+x $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+%else
+# Move libgcc_s around
+mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/
+if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so
+  ln -sf %{versmainlibdir}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/
+fi
+chmod a+x $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so.%{libgcc_s}
+%if %{biarch}
+%if %{build_primary_64bit}
+mv $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/
+if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so
+  ln -sf %{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/
+fi
+ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so
+chmod a+x $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s}
+%else
+# 32-bit biarch systems
+mv $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/
+if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then
+  rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so
+  ln -sf %{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so
+else
+  mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/
+fi
+ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so
+chmod a+x $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+%endif
+
+# Provide a defaults.spec file which adds a proper rpath
+%if 0%{?build_optional_compiler:1}
+cat > $RPM_BUILD_ROOT%{libsubdir}/defaults.spec << EOF
+*link:
++ %%{!m32:%%{!m64:-rpath=%{libsubdir}}} %%{m32:-rpath=%{libsubdir}/32} %%{m64:-rpath=%{libsubdir}/64}
+EOF
+%endif
+# LIBJAVA-DELETE-END
+# LIBFFI-DELETE-END
+
+%if %{build_ada}
+mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
+ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
+ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
+chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
+%if %{biarch}
+mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
+ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
+ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
+chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
+%endif
+%endif
+
+rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
+
+# Remove some crap from the .la files:
+for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
+  echo "changing $l"
+# -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
+  sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
+      -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
+      -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
+      -e '/^dependency_libs/s|-L[^ ]* ||g' \
+%if %{biarch}
+%if %{build_primary_64bit}
+      -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
+      -e '/^libdir/s|lib64/\.\./||' \
+%else
+      -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
+%endif
+%endif
+      < $l  > $l.new
+  mv $l.new $l
+done
+
+# GCC-TESTSUITE-DELETE-END
+%if 0%{?run_tests:1} 
+cp `find . -name "*.sum"` ../testresults/
+cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
+chmod 644 ../testresults/*
+%endif
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+%if %{build_cp}
+# Find C++ and Java headers
+find $RPM_BUILD_ROOT%{_prefix}/include/c++ \
+  -regex ".*/\(org\|gcj\|gnu\|java\|javax\)" -prune \
+  -o \( -type d -printf "%%%%dir " , \
+        -printf "%{_prefix}/include/c++/%%P\n" \) > ../c++-headers
+%endif
+# LIBFFI-DELETE-END
+# Remove files that we do not need to clean up filelist
+rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
+#rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/root
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/curses.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-*
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sound
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/features.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/ncurses.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/stdio.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/X11
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/obstack.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/spe.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/tgmath.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys
+# no plugins
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
+rm -f  $RPM_BUILD_ROOT%{_infodir}/dir
+rm -f  $RPM_BUILD_ROOT%{_prefix}/bin/gccbug%{binsuffix}
+
+%if !0%{?building_libjava:1}%{?building_libffi:1}
+# delete compile flag tracking from crt files
+crt_list=$RPM_BUILD_ROOT%{versmainlibdir}/crt*.o
+%if %{biarch}
+%if %{build_primary_64bit}
+crt32_list=$RPM_BUILD_ROOT%{versmainlibdirbi32}/crt*.o
+%else
+crt64_list=$RPM_BUILD_ROOT%{versmainlibdirbi64}/crt*.o
+%endif
+%endif
+for o in $crt_list $crt32_list $crt64_list; do
+  objcopy -R ".comment.SUSE.OPTs" $o
+done
+%endif
+
+%if 0%{?building_libjava:1}
+# gcj -static doesn't work properly anyway, unless using --whole-archive
+# let's save the space instead.
+find $RPM_BUILD_ROOT -name libgcj.a \
+       -o -name libgcj-tools.a \
+       -o -name libgij.a \
+       -o -name libjvm.a \
+       -o -name libgcj_bc.a \
+  | xargs rm -f
+
+find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
+  sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
+
+# security files have broken install locations, also they cause conflicts
+# between libgcj versions.  Simply delete them here, libgcj will use its
+# defaults in this case (which is what these files contain anyway).
+rm $RPM_BUILD_ROOT%{_libdir}/logging.properties
+rm -r $RPM_BUILD_ROOT%{_libdir}/security
+%endif
+
+%if 0%{?building_libffi:1}
+# Move libffi headers, remove empty libffi libtool file
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
+mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
+mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
+rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
+%if %{biarch}
+rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
+%endif
+# Generate a simple pkg-config file
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
+echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
+%endif
+
+%if %{build_java}
+%if !%{build_libjava}
+rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
+%endif
+rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
+rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
+%endif
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+%if %{build_nof}
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/nof/libiberty.a
+%endif
+%if %{biarch}
+%if %{build_primary_64bit}
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
+%else
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
+%endif
+%endif
+rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
+rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
+
+# LIBFFI-DELETE-BEGIN
+%if 0%{?building_libjava:1}
+# For building libjava only we need to delete other info docs
+rm $RPM_BUILD_ROOT%{_infodir}/cp-tools.info*
+# Remove stale manpages for binaries we do not build
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gjdoc%{binsuffix}.1
+# For building the java frontend we need to copy the ecj jar
+mkdir -p $RPM_BUILD_ROOT%{libsubdir}
+cp $RPM_SOURCE_DIR/ecj.jar $RPM_BUILD_ROOT%{libsubdir}
+%else
+# For regular build, some info files do not get renamed properly.
+# Do so here.
+mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info
+%if %{build_fortran} 
+%ifarch %quadmath_arch
+mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
+%endif
+%endif
+%if %{build_ada}
+mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info
+mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info
+mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info
+%endif
+%endif
+
+# LIBJAVA-DELETE-BEGIN
+cd ..
+%find_lang gcc47-locale --all-name
+
+%post info
+%install_info --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
+%if %{build_fortran} 
+%install_info --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
+%ifarch %quadmath_arch
+%install_info --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
+%endif
+%endif
+%if %{build_java}
+%install_info --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
+%endif
+%if %{build_ada}
+%install_info --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
+%install_info --info-dir=%{_infodir} --section="GNU Ada tools" --entry="* GNAT User's Guide: (gnat_ugn). GNAT User's Guide for Unix Platforms" %{_infodir}/gnat_ugn%{binsuffix}.info.gz
+%endif
+
+%postun info
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
+%if %{build_fortran}
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
+%ifarch %quadmath_arch
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
+%endif
+%endif
+%if %{build_java}
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
+%endif
+%if %{build_ada}
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_ugn%{binsuffix}.info.gz
+%endif
+
+
+%files
+%defattr(-,root,root)
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%dir %{libsubdir}/include
+%dir %{libsubdir}/include-fixed
+%if %{biarch}
+%if %{build_primary_64bit}
+%dir %{libsubdir}/32
+%else
+%dir %{libsubdir}/64
+%endif
+%endif
+%if %{build_nof}
+%dir %{libsubdir}/nof
+%endif
+%{_prefix}/bin/gcc%{binsuffix}
+%{_prefix}/bin/gcov%{binsuffix}
+%{_prefix}/bin/gcc-ar%{binsuffix}
+%{_prefix}/bin/gcc-nm%{binsuffix}
+%{_prefix}/bin/gcc-ranlib%{binsuffix}
+%{libsubdir}/collect2
+%{libsubdir}/lto1
+%{libsubdir}/lto-wrapper
+%{libsubdir}/liblto_plugin.so*
+%{libsubdir}/include-fixed/README
+%{libsubdir}/include-fixed/limits.h
+%{libsubdir}/include-fixed/syslimits.h
+%{libsubdir}/include/omp.h
+%{libsubdir}/include/float.h
+%{libsubdir}/include/iso646.h
+%{libsubdir}/include/stdarg.h
+%{libsubdir}/include/stdbool.h
+%{libsubdir}/include/stdfix.h
+%{libsubdir}/include/stddef.h
+%{libsubdir}/include/uchar.h
+%{libsubdir}/include/unwind.h
+%{libsubdir}/include/varargs.h
+%{libsubdir}/include/stdint.h
+%{libsubdir}/include/stdint-gcc.h
+%{libsubdir}/include/stdnoreturn.h
+%{libsubdir}/include/stdalign.h
+%ifarch %arm
+%{libsubdir}/include/mmintrin.h
+%{libsubdir}/include/arm_neon.h
+%{libsubdir}/include/unwind-arm-common.h
+%endif
+%ifarch %ix86 x86_64
+%{libsubdir}/include/cross-stdarg.h
+%{libsubdir}/include/cpuid.h
+%{libsubdir}/include/mm3dnow.h
+%{libsubdir}/include/mmintrin.h
+%{libsubdir}/include/ammintrin.h
+%{libsubdir}/include/bmmintrin.h
+%{libsubdir}/include/emmintrin.h
+%{libsubdir}/include/immintrin.h
+%{libsubdir}/include/avxintrin.h
+%{libsubdir}/include/pmmintrin.h
+%{libsubdir}/include/xmmintrin.h
+%{libsubdir}/include/tmmintrin.h
+%{libsubdir}/include/nmmintrin.h
+%{libsubdir}/include/smmintrin.h
+%{libsubdir}/include/wmmintrin.h
+%{libsubdir}/include/x86intrin.h
+%{libsubdir}/include/ia32intrin.h
+%{libsubdir}/include/mm_malloc.h
+%{libsubdir}/include/fma4intrin.h
+%{libsubdir}/include/xopintrin.h
+%{libsubdir}/include/lwpintrin.h
+%{libsubdir}/include/popcntintrin.h
+%{libsubdir}/include/bmiintrin.h
+%{libsubdir}/include/tbmintrin.h
+%{libsubdir}/include/avx2intrin.h
+%{libsubdir}/include/bmi2intrin.h
+%{libsubdir}/include/fmaintrin.h
+%{libsubdir}/include/lzcntintrin.h
+%{libsubdir}/include/f16cintrin.h
+%endif
+%if %{build_with_mudflap}
+%{libsubdir}/include/mf-runtime.h
+%endif
+%versmainlib *crt*.o
+%versmainlib libgcc*.a
+%versmainlib libgcov.a
+%versmainlib libgcc_s*.so
+%if %{build_with_mudflap}
+%versmainlib libmudflap.a
+%versmainlib libmudflap.so
+%versmainlib libmudflapth.a
+%versmainlib libmudflapth.so
+%endif
+%versmainlib libgomp.so
+%versmainlib libgomp.a
+%versmainlib libgomp.spec
+%doc %{_mandir}/man1/gcc%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gcov%{binsuffix}.1.gz
+%if 0%{?build_optional_compiler:1}
+%{libsubdir}/defaults.spec
+%endif
+
+%if %{separate_biarch}
+%files -n gcc47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%versbiarchlib *crt*.o
+%versbiarchlib libgcc*.a
+%versbiarchlib libgcov.a
+%versbiarchlib libgcc_s*.so
+%if %{build_with_mudflap}
+%versbiarchlib libmudflap.a
+%versbiarchlib libmudflap.so
+%versbiarchlib libmudflapth.a
+%versbiarchlib libmudflapth.so
+%endif
+%versbiarchlib libgomp.so
+%versbiarchlib libgomp.a
+%versbiarchlib libgomp.spec
+%endif
+
+%files locale -f gcc47-locale.lang
+
+%if %{build_cp}
+%files c++
+%defattr(-,root,root)
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%{_prefix}/bin/g++%{binsuffix}
+%doc %{_mandir}/man1/g++%{binsuffix}.1.gz
+%{libsubdir}/cc1plus
+
+%files -n libstdc++47
+%defattr(-,root,root)
+%if %{build_nof}
+%dir %{noflibdir}
+%endif
+%mainlib libstdc++.so.*
+
+%if %{separate_biarch}
+%files -n libstdc++47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libstdc++.so.*
+%endif
+
+%files -n libstdc++47-devel -f c++-headers
+%defattr(-,root,root)
+%versmainlib libstdc++.a
+%versmainlib libstdc++.so
+%versmainlib libsupc++.a
+%dir %{_datadir}/gdb
+%dir %{_datadir}/gdb/auto-load
+%dir %{_datadir}/gdb/auto-load%{_prefix}
+%dir %{_datadir}/gdb/auto-load/%{mainlibdir}
+%{_datadir}/gdb/auto-load/%{mainlibdir}/libstdc++.so.*-gdb.py
+%{_datadir}/gcc%{binsuffix}
+
+%if %{separate_biarch}
+%files -n libstdc++47-devel%{separate_biarch_suffix}
+%defattr(-,root,root)
+%versbiarchlib libstdc++.a
+%versbiarchlib libstdc++.so
+%versbiarchlib libsupc++.a
+%dir %{_datadir}/gdb/auto-load/%{mainlibdirbi}
+%{_datadir}/gdb/auto-load/%{mainlibdirbi}/libstdc++.so.*-gdb.py
+%endif
+
+%files -n libstdc++47-doc
+%defattr(-,root,root)
+%doc libstdc++-v3/doc/html
+%endif
+
+%files -n libgcc47
+%defattr(-,root,root)
+%if 0%{!?build_optional_compiler:1}
+/%{_lib}/libgcc_s.so.%{libgcc_s}
+%if %{build_nof}
+%dir /lib/nof
+/lib/nof/libgcc_s.so.%{libgcc_s}
+%endif
+%if %{biarch}
+%if %{build_primary_64bit}
+%if !%{separate_bi32}
+/lib/libgcc_s.so.%{libgcc_s}
+%endif
+%else
+%if !%{separate_bi64}
+/lib64/libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+%endif
+%else
+%versmainlib libgcc_s.so.%{libgcc_s}
+%endif
+
+%if %{separate_bi64}
+%files -n libgcc47-64bit
+%defattr(-,root,root)
+%if 0%{!?build_optional_compiler:1}
+/lib64/libgcc_s.so.%{libgcc_s}
+%else
+%versbiarchlib libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+
+%if %{separate_bi32}
+%files -n libgcc47-32bit
+%defattr(-,root,root)
+%if 0%{!?build_optional_compiler:1}
+/lib/libgcc_s.so.%{libgcc_s}
+%else
+%versbiarchlib libgcc_s.so.%{libgcc_s}
+%endif
+%endif
+
+
+%files -n libgomp47
+%defattr(-,root,root)
+%mainlib libgomp.so.1*
+
+%if %{separate_biarch}
+%files -n libgomp47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libgomp.so.1*
+%endif
+
+
+%if %{build_fortran}
+%files fortran
+%defattr(-,root,root)
+%dir %{libsubdir}/finclude
+%{_prefix}/bin/gfortran%{binsuffix}
+%{libsubdir}/f951
+%{libsubdir}/finclude/*
+%versmainlib libgfortran.a
+%versmainlib libgfortran.so
+%versmainlib libgfortran.spec
+%versmainlib libgfortranbegin.a
+%versmainlib libcaf_single.a
+%ifarch %quadmath_arch
+%{libsubdir}/include/quadmath.h
+%{libsubdir}/include/quadmath_weak.h
+%versmainlib libquadmath.a
+%versmainlib libquadmath.so
+%endif
+%doc %{_mandir}/man1/gfortran%{binsuffix}.1.gz
+
+%if %{separate_biarch}
+%files fortran%{separate_biarch_suffix}
+%defattr(-,root,root)
+%versbiarchlib libgfortran.a
+%versbiarchlib libgfortran.so
+%versbiarchlib libgfortran.spec
+%versbiarchlib libgfortranbegin.a
+%versbiarchlib libcaf_single.a
+%ifarch %quadmath_arch
+%versbiarchlib libquadmath.a
+%versbiarchlib libquadmath.so
+%endif
+%endif
+
+%files -n libgfortran47
+%defattr(-,root,root)
+%mainlib libgfortran.so.*
+
+%if %{separate_biarch}
+%files -n libgfortran47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libgfortran.so.*
+%endif
+
+%ifarch %quadmath_arch
+%files -n libquadmath47
+%defattr(-,root,root)
+%mainlib libquadmath.so.*
+
+%if %{separate_biarch}
+%files -n libquadmath47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libquadmath.so.*
+%endif
+%endif
+%endif
+
+%if %{build_with_mudflap}
+%files -n libmudflap47
+%defattr(-,root,root)
+%mainlib libmudflap.so.0*
+%mainlib libmudflapth.so.0*
+
+%if %{separate_biarch}
+%files -n libmudflap47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libmudflap.so.0*
+%biarchlib libmudflapth.so.0*
+%endif
+%endif
+
+%files info
+%defattr(-,root,root)
+%doc %{_infodir}/cpp%{binsuffix}.info*.gz
+%doc %{_infodir}/cppinternals%{binsuffix}.info*.gz
+%doc %{_infodir}/gcc%{binsuffix}.info*.gz
+%doc %{_infodir}/gccint%{binsuffix}.info*.gz
+%doc %{_infodir}/gccinstall%{binsuffix}.info*.gz
+%doc %{_infodir}/libgomp%{binsuffix}.info*.gz
+%if %{build_fortran}
+%doc %{_infodir}/gfortran%{binsuffix}.info*.gz
+%ifarch %quadmath_arch
+%doc %{_infodir}/libquadmath%{binsuffix}.info*.gz
+%endif
+%endif
+%if %{build_java}
+%doc %{_infodir}/gcj%{binsuffix}.info*.gz
+%endif
+%if %{build_ada}
+%doc %{_infodir}/gnat-style%{binsuffix}.info*gz
+%doc %{_infodir}/gnat_rm%{binsuffix}.info*gz
+%doc %{_infodir}/gnat_ugn%{binsuffix}.info*gz
+%endif
+
+%files -n cpp47
+%defattr(-,root,root)
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%{_prefix}/bin/cpp%{binsuffix}
+%{libsubdir}/cc1
+#%{libsubdir}/specs
+%doc %{_mandir}/man1/cpp%{binsuffix}.1.gz
+
+%if %{build_objc}
+%files objc
+%defattr(-,root,root)
+%{libsubdir}/cc1obj
+%{libsubdir}/include/objc
+%versmainlib libobjc.a
+%versmainlib libobjc.so
+
+%if %{separate_biarch}
+%files objc%{separate_biarch_suffix}
+%defattr(-,root,root)
+%versbiarchlib libobjc.a
+%versbiarchlib libobjc.so
+%endif
+
+%files -n libobjc47
+%defattr(-,root,root)
+%mainlib libobjc.so.*
+
+%if %{separate_biarch}
+%files -n libobjc47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libobjc.so.*
+%endif
+%endif
+
+
+%if %{build_objcp}
+%files obj-c++
+%defattr(-,root,root)
+%{libsubdir}/cc1objplus
+%endif
+
+
+%if %{build_ada}
+%files ada
+%defattr(-,root,root)
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%{_prefix}/bin/gnat*
+%dir %{versmainlibdir}/adainclude
+%dir %{versmainlibdir}/adalib
+%{versmainlibdir}/adainclude
+%{versmainlibdir}/adalib/*.ali
+%{versmainlibdir}/adalib/*.a
+%{versmainlibdir}/adalib/libgnarl.so
+%{versmainlibdir}/adalib/libgnat.so
+%{versmainlibdir}/gnat1
+
+%if %{separate_biarch}
+%files ada%{separate_biarch_suffix}
+%defattr(-,root,root)
+%dir %{versmainlibdirbi}/adainclude
+%dir %{versmainlibdirbi}/adalib
+%{versmainlibdirbi}/adainclude
+%{versmainlibdirbi}/adalib/*.ali
+%{versmainlibdirbi}/adalib/*.a
+%{versmainlibdirbi}/adalib/libgnarl.so
+%{versmainlibdirbi}/adalib/libgnat.so
+%endif
+
+%files -n libada47
+%defattr(-,root,root)
+%mainlib libgnarl-*.so
+%mainlib libgnat-*.so
+
+%if %{separate_biarch}
+%files -n libada47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libgnarl-*.so
+%biarchlib libgnat-*.so
+%endif
+%endif
+# LIBJAVA-DELETE-END
+
+
+%if %{build_java}
+%if 0%{?building_libjava:1}
+%files -n gcc47-java
+%defattr(-,root,root)
+%{_prefix}/bin/gcj%{binsuffix}
+%{_prefix}/bin/gcjh%{binsuffix}
+%{_prefix}/bin/gcj-dbtool%{binsuffix}
+%{_prefix}/bin/jcf-dump%{binsuffix}
+%{_prefix}/bin/jv-convert%{binsuffix}
+%{_prefix}/bin/gc-analyze%{binsuffix}
+%{_prefix}/bin/aot-compile%{binsuffix}
+%{_prefix}/bin/rebuild-gcj-db%{binsuffix}
+%{libsubdir}/jc1
+%{libsubdir}/jvgenmain
+%{libsubdir}/ecj.jar
+%{libsubdir}/ecj1
+%doc %{_mandir}/man1/gcj%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gcjh%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gcj-dbtool%{binsuffix}.1.gz
+%doc %{_mandir}/man1/jcf-dump%{binsuffix}.1.gz
+%doc %{_mandir}/man1/jv-convert%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gc-analyze%{binsuffix}.1.gz
+%doc %{_mandir}/man1/aot-compile%{binsuffix}.1.gz
+%doc %{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1.gz
+%endif
+%endif
+
+%if %{build_java}
+%if %{build_libjava}
+%files -n libgcj47
+%defattr(-,root,root)
+%dir %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/classmap.db
+# We usually do not multilib libjava
+%if %{biarch_libjava}
+%versbiarchlib libgcj.la
+%biarchlib libgcj.so.*
+%biarchlib libgij.so.*
+%biarchlib libgcj-tools.so.*
+%else
+%versmainlib libgcj.la
+%mainlib libgcj.so.*
+%mainlib libgij.so.*
+%mainlib libgcj-tools.so.*
+%endif
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.la
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.so
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.la
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.so
+
+%files -n libgcj_bc47
+%defattr(-,root,root)
+%if %{biarch_libjava}
+%biarchlib libgcj_bc.so.*
+%else
+%mainlib libgcj_bc.so.*
+%endif
+
+%files -n libgcj47-jar
+%defattr(-,root,root)
+%{_prefix}/share/java/libgcj-%{gcc_dir_version}.jar
+%{_prefix}/share/java/libgcj-tools-%{gcc_dir_version}.jar
+
+%files -n libgcj47-devel
+%defattr(-,root,root)
+%dir %{_prefix}/include/c++
+%dir %{libsubdir}
+%dir %{libsubdir}/include
+%dir %{gxxinclude}
+%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
+%{libsubdir}/include/jawt.h
+%{libsubdir}/include/jawt_md.h
+%{libsubdir}/include/jni.h
+%{libsubdir}/include/jni_md.h
+%{libsubdir}/include/jvmpi.h
+%{gxxinclude}/gnu
+%{gxxinclude}/gcj
+%{gxxinclude}/java
+%{gxxinclude}/javax
+%{gxxinclude}/org
+%{gxxinclude}/sun
+%{libsubdir}/include/gcj
+%if %{biarch_libjava}
+%versbiarchlib libgcj.so
+%versbiarchlib libgcj.spec
+%versbiarchlib libgcj-tools.so
+%versbiarchlib libgij.so
+%versbiarchlib libgcj_bc.so
+%else
+%versmainlib libgcj.so
+%versmainlib libgcj.spec
+%versmainlib libgcj-tools.so
+%versmainlib libgij.so
+%versmainlib libgcj_bc.so
+%endif
+
+%files -n gcc47-gij
+%defattr(-,root,root)
+%{_prefix}/bin/gij%{binsuffix}
+%{_prefix}/bin/gappletviewer%{binsuffix}
+%{_prefix}/bin/gjar%{binsuffix}
+%{_prefix}/bin/gjarsigner%{binsuffix}
+%{_prefix}/bin/gjavah%{binsuffix}
+%{_prefix}/bin/gkeytool%{binsuffix}
+%{_prefix}/bin/gnative2ascii%{binsuffix}
+%{_prefix}/bin/gorbd%{binsuffix}
+%{_prefix}/bin/grmic%{binsuffix}
+%{_prefix}/bin/grmid%{binsuffix}
+%{_prefix}/bin/grmiregistry%{binsuffix}
+%{_prefix}/bin/gserialver%{binsuffix}
+%{_prefix}/bin/gtnameserv%{binsuffix}
+%doc %{_mandir}/man1/gij%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gappletviewer%{binsuffix}.1.gz
+%doc %{_mandir}/man1/grmic%{binsuffix}.1.gz
+%doc %{_mandir}/man1/grmid%{binsuffix}.1.gz
+%doc %{_mandir}/man1/grmiregistry%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gkeytool%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gjar%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gjarsigner%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gjavah%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gnative2ascii%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gorbd%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gserialver%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gtnameserv%{binsuffix}.1.gz
+%endif
+%endif
+# LIBFFI-DELETE-END
+
+%if %{build_java}
+%if 0%{?building_libffi:1}
+%files -n libffi47
+%defattr(-,root,root)
+%mainlib libffi.so.*
+
+%if %{separate_biarch}
+%files -n libffi47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libffi.so.*
+%endif
+
+%files -n libffi47-devel
+%defattr(-,root,root)
+%{_prefix}/include/ffi.h
+%{_prefix}/include/ffitarget.h
+%mainlib libffi.so
+%mainlib libffi.a
+%{_libdir}/pkgconfig/libffi.pc
+%doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
+%doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
+%doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
+
+%if %{separate_biarch}
+%files -n libffi47-devel%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libffi.so
+%biarchlib libffi.a
+%endif
+%endif
+%endif
+# GCC-TESTSUITE-DELETE-END
+
+%if 0%{?run_tests:1}
+%files -n gcc47-testresults
+%defattr(-,root,root)
+%doc testresults/test_summary.txt
+%doc testresults/*.sum
+%doc testresults/*.log
+%endif
+
+
+%changelog
diff --git a/packaging/libffi47.spec b/packaging/libffi47.spec
new file mode 100644 (file)
index 0000000..6b4d84b
--- /dev/null
@@ -0,0 +1,927 @@
+%define building_libffi 1
+%define fast_build 1
+
+# Ada currently fails to build on a few platforms, enable it only
+# on those that work
+# Note that AdaCore only supports %ix86, x86_64 and ia64
+%ifarch %ix86 x86_64
+%define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
+%else
+%define build_ada 0
+%endif
+
+%define quadmath_arch %ix86 x86_64 ia64
+
+# We don't want to build java
+%ifarch mips
+%define build_java 0
+%define build_libjava 0
+%else
+%define build_java 1
+%define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+%endif
+
+%define build_cp 1
+%define build_fortran 1
+%define build_objc 1
+%define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
+%define build_with_mudflap 0
+
+%if %{build_objcp}
+%define build_cp 1
+%define build_objc 1
+%endif
+
+%if %{build_libjava}
+%define build_cp 1
+%endif
+
+# For optional compilers only build C, C++ and Fortran
+##%if 0%{?build_optional_compiler:1}%{?build_optional_compiler_languages:1}
+%if 0%{!?building_libffi:1}
+%define build_ada 0
+%define build_java 0
+%define build_libjava 0
+%define build_objc 1
+%define build_objcp 1
+%endif
+
+
+Name: libffi47
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-tools
+BuildRequires: makeinfo
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: texinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64 %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%if %{build_ada}
+%define hostsuffix -4.7
+BuildRequires: gcc47-ada
+%endif
+%if 0%{?building_libjava:1}%{?building_testsuite:1}
+BuildRequires: fastjar
+BuildRequires: unzip
+%endif
+%if 0%{?building_libffi:1}
+BuildRequires: pkg-config
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+%if 0%{?run_tests:1}
+BuildRequires: dejagnu
+BuildRequires: expect
+BuildRequires: gdb
+%endif
+
+# Define version number of libgcc_s
+%ifarch hppa
+%define libgcc_s 4
+%else
+%define libgcc_s 1
+%endif
+%ifarch ppc
+# We support building the nof libraries, but don't want this in the
+# regular rpms
+%define build_nof 0
+%else
+%define build_nof 0
+%endif
+
+%define separate_bi32 0
+%define separate_bi64 0
+%ifarch x86_64 
+%define separate_bi32 1
+%endif
+
+# Define two macros to trigger -32bit or -64bit package variants
+%define separate_biarch 0
+%if %{separate_bi32}
+%define separate_biarch 1
+%define separate_biarch_suffix -32bit
+%endif
+%if %{separate_bi64}
+%define separate_biarch 1
+%define separate_biarch_suffix -64bit
+%endif
+
+%ifarch x86_64
+# 64-bit is primary build target
+%define build_primary_64bit 1
+%else
+%define build_primary_64bit 0
+%endif
+
+%define biarch_libjava 0
+
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+
+%if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+Requires: binutils glibc-devel
+Requires: cpp47 = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgcc%{libgcc_s} >= %{version}-%{release}
+Requires: libgomp1 >= %{version}-%{release}
+%if %{build_with_mudflap}
+Requires: libmudflap0 >= %{version}-%{release}
+Requires: libmudflapth0 >= %{version}-%{release}
+%endif
+%else
+Requires: libgcc47 = %{version}-%{release}
+Requires: libgomp47 = %{version}-%{release}
+%endif
+%endif
+
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+# GCC-TESTSUITE-DELETE-BEGIN
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4 = %{version}-%{release}
+Conflicts: libffi4 < %{version}-%{release}
+
+%description 
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post 
+/sbin/ldconfig
+
+%postun 
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-32bit
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4-32bit = %{version}-%{release}
+Conflicts: libffi4-32bit < %{version}-%{release}
+
+%description -n libffi47-32bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post -n libffi47-32bit
+/sbin/ldconfig
+
+%postun -n libffi47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-64bit
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4-64bit = %{version}-%{release}
+Conflicts: libffi4-64bit < %{version}-%{release}
+
+%description -n libffi47-64bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post -n libffi47-64bit
+/sbin/ldconfig
+
+%postun -n libffi47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-devel
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4 >= %{version}-%{release}
+Provides: libffi-devel = %{version}-%{release}
+Conflicts: libffi-devel < %{version}-%{release}
+
+%description -n libffi47-devel
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-devel-32bit
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4-32bit >= %{version}-%{release}
+Provides: libffi-devel-32bit = %{version}-%{release}
+Conflicts: libffi-devel-32bit < %{version}-%{release}
+
+%description -n libffi47-devel-32bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-devel-64bit
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4-64bit >= %{version}-%{release}
+Provides: libffi-devel-64bit = %{version}-%{release}
+Conflicts: libffi-devel-64bit < %{version}-%{release}
+
+%description -n libffi47-devel-64bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+
+%package -n gcc47-testresults
+# GCC-TESTSUITE-DELETE-END
+Summary:      Testsuite results
+License:       SUSE-Public-Domain
+Group:        Development/Languages/C and C++
+
+%description -n gcc47-testresults
+Results from running the gcc and target library testsuites.
+
+
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+
+# Versionspecific directories
+%define versmainlibdir %{libsubdir}
+%define versmainlibdirbi32 %{libsubdir}/32
+%define versmainlibdirbi64 %{libsubdir}/64
+%if %{build_primary_64bit}
+%define versmainlibdirbi %{versmainlibdirbi32}
+%else
+%define versmainlibdirbi %{versmainlibdirbi64}
+%endif
+
+%if 0%{?build_optional_compiler:1}
+%define mainlibdir %{versmainlibdir}
+%define mainlibdirbi32 %{versmainlibdirbi32}
+%define mainlibdirbi64 %{versmainlibdirbi64}
+%define noflibdir %{versnoflibdir}
+%define mainlibdirbi %{versmainlibdirbi}
+%else
+%define mainlibdir %{_libdir}
+%define mainlibdirbi32 %{_prefix}/lib
+%define mainlibdirbi64 %{_prefix}/lib64
+%define noflibdir %{_prefix}/lib/nof
+%if %{build_primary_64bit}
+%define mainlibdirbi %{mainlibdirbi32}
+%else
+%define mainlibdirbi %{mainlibdirbi64}
+%endif
+%endif
+
+
+# Now define a few macros that make it easy to package libs and
+# related files just to the right package, without caring for the
+# exact path the files are in.
+#   %mainlib  package X from all dirs that belong to the main package
+#   %biarchlib   package X from all dirs that belong to the -32/64bit package
+# by default, nof libs go where the 32bit libs go.
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%endif
+%define biarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define biarchlib() %{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%else
+%define biarchlib() %{mainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%endif
+%define versbiarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%else
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+
+%if 0%{?building_libffi:1}
+make stage1-bubble $PARALLEL
+make all-target-libffi $PARALLEL
+%else
+# Only run profiled bootstrap on archs where it works
+#%ifarch %ix86 x86_64 ppc ppc64 ia64
+#make profiledbootstrap-lean STAGE1_CFLAGS="-O -g" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%else
+%ifarch %arm
+STAGE1_FLAGS="-O0"
+%else
+STAGE1_FLAGS="-O -g"
+%endif
+#make bootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%endif
+#make -C gcc proto
+make info
+%if 0%{?run_tests:1}
+echo "Run testsuite"
+(make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
+make -k check $PARALLEL || true
+mkdir ../testresults
+../contrib/test_summary | tee ../testresults/test_summary.txt
+%endif
+%endif
+
+%install
+export NO_BRP_CHECK_BYTECODE_VERSION=true
+cd obj-%{GCCDIST}
+# GCC-TESTSUITE-DELETE-BEGIN
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
+%if 0%{?building_libffi:1}
+make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
+%else
+%if 0%{?building_libjava:1}
+make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
+make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
+# install-common also installs collect2, gcov and the g++ and gfortran driver
+%if %{build_cp}
+rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
+%endif
+%if %{build_fortran}
+rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
+%endif
+rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
+rm $RPM_BUILD_ROOT%{libsubdir}/collect2
+%else
+make install DESTDIR=$RPM_BUILD_ROOT
+%if %{build_java}
+make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
+rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
+rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{libsubdir}/jc1
+rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
+%endif
+%endif
+%endif
+
+# Remove libffi installed files if we did not want to build it
+%if !0%{?building_libffi:1}
+rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
+%if %{biarch}
+  rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
+%endif
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
+%endif
+
+# Remove some useless .la files
+for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
+    libmudflap libmudflapth libgomp libstdc++ libsupc++ libgcj-tools libgij; do
+  rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
+%if %{biarch}
+  rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
+%endif
+done
+
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
+%if %{biarch}
+%if %{build_primary_64bit}
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
+%else
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
+%endif
+%endif
+
+
+%if %{build_ada}
+mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
+ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
+ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
+chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
+%if %{biarch}
+mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
+ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
+ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
+chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
+%endif
+%endif
+
+rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
+
+# Remove some crap from the .la files:
+for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
+  echo "changing $l"
+# -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
+  sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
+      -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
+      -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
+      -e '/^dependency_libs/s|-L[^ ]* ||g' \
+%if %{biarch}
+%if %{build_primary_64bit}
+      -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
+      -e '/^libdir/s|lib64/\.\./||' \
+%else
+      -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
+%endif
+%endif
+      < $l  > $l.new
+  mv $l.new $l
+done
+
+# GCC-TESTSUITE-DELETE-END
+%if 0%{?run_tests:1} 
+cp `find . -name "*.sum"` ../testresults/
+cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
+chmod 644 ../testresults/*
+%endif
+# GCC-TESTSUITE-DELETE-BEGIN
+# Remove files that we do not need to clean up filelist
+rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
+#rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/root
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/curses.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-*
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sound
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/features.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/ncurses.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/stdio.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/X11
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/obstack.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/spe.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/tgmath.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys
+# no plugins
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
+rm -f  $RPM_BUILD_ROOT%{_infodir}/dir
+rm -f  $RPM_BUILD_ROOT%{_prefix}/bin/gccbug%{binsuffix}
+
+%if !0%{?building_libjava:1}%{?building_libffi:1}
+# delete compile flag tracking from crt files
+crt_list=$RPM_BUILD_ROOT%{versmainlibdir}/crt*.o
+%if %{biarch}
+%if %{build_primary_64bit}
+crt32_list=$RPM_BUILD_ROOT%{versmainlibdirbi32}/crt*.o
+%else
+crt64_list=$RPM_BUILD_ROOT%{versmainlibdirbi64}/crt*.o
+%endif
+%endif
+for o in $crt_list $crt32_list $crt64_list; do
+  objcopy -R ".comment.SUSE.OPTs" $o
+done
+%endif
+
+%if 0%{?building_libjava:1}
+# gcj -static doesn't work properly anyway, unless using --whole-archive
+# let's save the space instead.
+find $RPM_BUILD_ROOT -name libgcj.a \
+       -o -name libgcj-tools.a \
+       -o -name libgij.a \
+       -o -name libjvm.a \
+       -o -name libgcj_bc.a \
+  | xargs rm -f
+
+find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
+  sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
+
+# security files have broken install locations, also they cause conflicts
+# between libgcj versions.  Simply delete them here, libgcj will use its
+# defaults in this case (which is what these files contain anyway).
+rm $RPM_BUILD_ROOT%{_libdir}/logging.properties
+rm -r $RPM_BUILD_ROOT%{_libdir}/security
+%endif
+
+%if 0%{?building_libffi:1}
+# Move libffi headers, remove empty libffi libtool file
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
+mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
+mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
+rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
+%if %{biarch}
+rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
+%endif
+# Generate a simple pkg-config file
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
+echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
+%endif
+
+%if %{build_java}
+%if !%{build_libjava}
+rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
+%endif
+rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
+rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
+%endif
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+%if %{build_nof}
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/nof/libiberty.a
+%endif
+%if %{biarch}
+%if %{build_primary_64bit}
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
+%else
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
+%endif
+%endif
+rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
+rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
+
+
+%if %{build_java}
+%if 0%{?building_libffi:1}
+%files 
+%defattr(-,root,root)
+%mainlib libffi.so.*
+
+%if %{separate_biarch}
+%files -n libffi47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libffi.so.*
+%endif
+
+%files -n libffi47-devel
+%defattr(-,root,root)
+%{_prefix}/include/ffi.h
+%{_prefix}/include/ffitarget.h
+%mainlib libffi.so
+%mainlib libffi.a
+%{_libdir}/pkgconfig/libffi.pc
+%doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
+%doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
+%doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
+
+%if %{separate_biarch}
+%files -n libffi47-devel%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libffi.so
+%biarchlib libffi.a
+%endif
+%endif
+%endif
+# GCC-TESTSUITE-DELETE-END
+
+%if 0%{?run_tests:1}
+%files -n gcc47-testresults
+%defattr(-,root,root)
+%doc testresults/test_summary.txt
+%doc testresults/*.sum
+%doc testresults/*.log
+%endif
+
+
+%changelog
diff --git a/packaging/libgcj47-rpmlintrc b/packaging/libgcj47-rpmlintrc
new file mode 100644 (file)
index 0000000..5089f7e
--- /dev/null
@@ -0,0 +1,4 @@
+# This line is mandatory to access the configuration functions
+from Config import *
+
+addFilter ("libgcj_bc47.*shlib-policy-name-error")
diff --git a/packaging/libgcj47.spec b/packaging/libgcj47.spec
new file mode 100644 (file)
index 0000000..87a2336
--- /dev/null
@@ -0,0 +1,1267 @@
+%define building_libjava 1
+%define fast_build 1
+
+# Ada currently fails to build on a few platforms, enable it only
+# on those that work
+# Note that AdaCore only supports %ix86, x86_64 and ia64
+%ifarch %ix86 x86_64
+%define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
+%else
+%define build_ada 0
+%endif
+
+%define quadmath_arch %ix86 x86_64 ia64
+
+# We don't want to build java
+%ifarch mips
+%define build_java 0
+%define build_libjava 0
+%else
+%define build_java 1
+%define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+%endif
+
+%define build_cp 1
+%define build_fortran 1
+%define build_objc 1
+%define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
+%define build_with_mudflap 0
+
+%if %{build_objcp}
+%define build_cp 1
+%define build_objc 1
+%endif
+
+%if %{build_libjava}
+%define build_cp 1
+%endif
+
+# For optional compilers only build C, C++ and Fortran
+##%if 0%{?build_optional_compiler:1}%{?build_optional_compiler_languages:1}
+%if 0%{!?building_libffi:1}
+%define build_ada 0
+%define build_java 0
+%define build_libjava 0
+%define build_objc 1
+%define build_objcp 1
+%endif
+
+
+Name: libgcj47
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gettext-tools
+BuildRequires: makeinfo
+BuildRequires: glibc-devel-32bit
+BuildRequires: mpc-devel
+BuildRequires: mpfr-devel
+BuildRequires: perl
+BuildRequires: texinfo
+BuildRequires: zlib-devel
+%ifarch %ix86 x86_64 %arm
+BuildRequires: cloog-devel
+BuildRequires: ppl-devel
+%endif
+%if %{build_ada}
+%define hostsuffix -4.7
+BuildRequires: gcc47-ada
+%endif
+%if 0%{?building_libjava:1}%{?building_testsuite:1}
+BuildRequires: fastjar
+BuildRequires: unzip
+%endif
+%if 0%{?building_libffi:1}
+BuildRequires: pkg-config
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
+%if 0%{?run_tests:1}
+BuildRequires: dejagnu
+BuildRequires: expect
+BuildRequires: gdb
+%endif
+
+# Define version number of libgcc_s
+%ifarch hppa
+%define libgcc_s 4
+%else
+%define libgcc_s 1
+%endif
+%ifarch ppc
+# We support building the nof libraries, but don't want this in the
+# regular rpms
+%define build_nof 0
+%else
+%define build_nof 0
+%endif
+
+%define separate_bi32 0
+%define separate_bi64 0
+%ifarch x86_64 
+%define separate_bi32 1
+%endif
+
+# Define two macros to trigger -32bit or -64bit package variants
+%define separate_biarch 0
+%if %{separate_bi32}
+%define separate_biarch 1
+%define separate_biarch_suffix -32bit
+%endif
+%if %{separate_bi64}
+%define separate_biarch 1
+%define separate_biarch_suffix -64bit
+%endif
+
+%ifarch x86_64
+# 64-bit is primary build target
+%define build_primary_64bit 1
+%else
+%define build_primary_64bit 0
+%endif
+
+%define biarch_libjava 0
+
+# COMMON-BEGIN
+%define biarch_targets x86_64 
+
+URL:          http://gcc.gnu.org/
+Version: 4.7.2
+Release:      1
+%define gcc_version %(echo %version | sed 's/_.*//')
+%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
+%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define binsuffix -4.7
+# COMMON-END
+
+%if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
+Requires: binutils glibc-devel
+Requires: cpp47 = %{version}-%{release}
+%if 0%{!?build_optional_compiler:1}
+Requires: libgcc%{libgcc_s} >= %{version}-%{release}
+Requires: libgomp1 >= %{version}-%{release}
+%if %{build_with_mudflap}
+Requires: libmudflap0 >= %{version}-%{release}
+Requires: libmudflapth0 >= %{version}-%{release}
+%endif
+%else
+Requires: libgcc47 = %{version}-%{release}
+Requires: libgomp47 = %{version}-%{release}
+%endif
+%endif
+
+# COMMON-BEGIN
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
+Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source1:       change_spec
+Source2:       libgcj47-rpmlintrc
+Source3:       gcc47-rpmlintrc
+Source4:       ecj.jar
+Source5:       README.First-for.SuSE.packagers
+Source6:       baselibs.conf
+
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+Summary:      Java Runtime Library for gcc
+License:      GPL-2.0-with-classpath-exception
+Group:        System/Libraries
+%define gcj_sover 13
+Provides: libgcj%{gcj_sover} = %{version}-%{release}
+Conflicts: libgcj%{gcj_sover} < %{version}-%{release}
+Provides: libgij%{gcj_sover} = %{version}-%{release}
+Conflicts: libgij%{gcj_sover} < %{version}-%{release}
+Provides: libgcj-tools%{gcj_sover} = %{version}-%{release}
+Conflicts: libgcj-tools%{gcj_sover} < %{version}-%{release}
+
+%description 
+This library is needed if you want to use the GNU Java compiler, gcj.
+Source code for this package is in gcc.
+
+%post 
+/sbin/ldconfig
+
+%postun 
+/sbin/ldconfig
+
+
+%package -n gcc47-java
+Summary:      The GNU Java Compiler
+License:        GPL-3.0+
+Group:        Development/Languages/Java
+Requires: gcc47 = %{version}
+Requires: libgcj47-devel = %{version}-%{release}
+
+%description -n gcc47-java
+The Java compiler from the GCC-tools-suite.
+
+
+%package -n libgcj_bc47
+Summary:      Fake library for BC-ABI compatibility.
+License:        GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+Provides: libgcj_bc1 = %{version}-%{release}
+Conflicts: libgcj_bc1 < %{version}-%{release}
+# libgcj_bc is special in that it just contains a symlink to
+# a proper libgcj version.  So require that library and add
+# provides for the shlib version as created at link time
+Requires: libgcj%{gcj_sover}
+%ifarch x86_64 
+Provides: libgcj_bc.so.1()(64bit)
+%else
+Provides: libgcj_bc.so.1
+%endif
+
+
+%description -n libgcj_bc47
+A fake library that is used at link time only. It ensures that
+binaries built with the BC-ABI link against a constant SONAME.
+This way, BC-ABI binaries continue to work if the SONAME underlying
+libgcj.so changes.
+
+
+%package -n libgcj47-jar
+Summary:      Java runtime library (jar files).
+License:        GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+
+%description -n libgcj47-jar
+These are the jar files that go along with the gcj front end to gcc.
+
+
+%package -n libgcj47-devel
+Summary:      Include Files and Libraries mandatory for Development.
+License:        GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+Requires: libstdc++47-devel = %{version}
+Requires: libgcj%{gcj_sover} >= %{version}-%{release}
+Requires: libgcj_bc1 >= %{version}-%{release}
+Requires: libgcj47-jar = %{version}-%{release}
+Requires: gtk2-devel
+Requires: libart_lgpl-devel
+Requires: glibc-devel
+Requires: zlib-devel
+%ifarch ia64
+Requires: libunwind-devel
+%endif
+
+%description -n libgcj47-devel
+This package contains all necessary include files and libraries needed
+to develop applications that require these.
+
+
+%package -n gcc47-gij
+Summary:      Java Bytecode Interpreter for gcc
+License:      GPL-2.0-with-classpath-exception
+Group:        Development/Libraries/Java
+Requires: libgcj%{gcj_sover} >= %{version}-%{release}
+
+%description -n gcc47-gij
+This package contains the java bytecode interpreter gij and related tools.
+
+# LIBFFI-DELETE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4 = %{version}-%{release}
+Conflicts: libffi4 < %{version}-%{release}
+
+%description -n libffi47
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post -n libffi47
+/sbin/ldconfig
+
+%postun -n libffi47
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-32bit
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4-32bit = %{version}-%{release}
+Conflicts: libffi4-32bit < %{version}-%{release}
+
+%description -n libffi47-32bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post -n libffi47-32bit
+/sbin/ldconfig
+
+%postun -n libffi47-32bit
+/sbin/ldconfig
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-64bit
+Summary:      Foreign Function Interface library
+License:        BSD-3-Clause
+Group:        Development/Languages/C and C++
+Provides: g-wrap:/usr/lib/libffi.so.4
+Provides: libffi4-64bit = %{version}-%{release}
+Conflicts: libffi4-64bit < %{version}-%{release}
+
+%description -n libffi47-64bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+
+%post -n libffi47-64bit
+/sbin/ldconfig
+
+%postun -n libffi47-64bit
+/sbin/ldconfig
+# PACKAGE-END
+
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-devel
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4 >= %{version}-%{release}
+Provides: libffi-devel = %{version}-%{release}
+Conflicts: libffi-devel < %{version}-%{release}
+
+%description -n libffi47-devel
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-devel-32bit
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4-32bit >= %{version}-%{release}
+Provides: libffi-devel-32bit = %{version}-%{release}
+Conflicts: libffi-devel-32bit < %{version}-%{release}
+
+%description -n libffi47-devel-32bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+# PACKAGE-BEGIN
+# PACKAGE-BEGIN
+%package -n libffi47-devel-64bit
+Summary:      Foreign Function Interface library development files
+License:        BSD 3-Clause
+Group:        Development/Languages/C and C++
+Requires: libffi4-64bit >= %{version}-%{release}
+Provides: libffi-devel-64bit = %{version}-%{release}
+Conflicts: libffi-devel-64bit < %{version}-%{release}
+
+%description -n libffi47-devel-64bit
+A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
+# PACKAGE-END
+
+%package -n gcc47-testresults
+# GCC-TESTSUITE-DELETE-END
+Summary:      Testsuite results
+License:       SUSE-Public-Domain
+Group:        Development/Languages/C and C++
+
+%description -n gcc47-testresults
+Results from running the gcc and target library testsuites.
+
+
+# COMMON-BEGIN
+
+# Define the canonical target and host architecture
+#   %gcc_target_arch  is supposed to be the full target triple
+#   %TARGET_ARCH      is the canonicalized CPU part
+#   %CONFIGURE_TARGET is the target triple used for --target=
+%if 0%{?gcc_target_arch:1}
+%define CONFIGURE_TARGET %{gcc_target_arch}
+%define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
+%define CONFIGURE_TARGET i586-tizen-linux
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
+%define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
+%define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
+%define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
+%endif
+%if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
+%define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
+%endif
+%else
+%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+%endif
+%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
+
+%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+
+%ifarch %arm
+%define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
+%else
+%define GCCDIST %{HOST_ARCH}-tizen-linux
+%endif
+
+%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
+%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
+
+# COMMON-END
+
+# Versionspecific directories
+%define versmainlibdir %{libsubdir}
+%define versmainlibdirbi32 %{libsubdir}/32
+%define versmainlibdirbi64 %{libsubdir}/64
+%if %{build_primary_64bit}
+%define versmainlibdirbi %{versmainlibdirbi32}
+%else
+%define versmainlibdirbi %{versmainlibdirbi64}
+%endif
+
+%if 0%{?build_optional_compiler:1}
+%define mainlibdir %{versmainlibdir}
+%define mainlibdirbi32 %{versmainlibdirbi32}
+%define mainlibdirbi64 %{versmainlibdirbi64}
+%define noflibdir %{versnoflibdir}
+%define mainlibdirbi %{versmainlibdirbi}
+%else
+%define mainlibdir %{_libdir}
+%define mainlibdirbi32 %{_prefix}/lib
+%define mainlibdirbi64 %{_prefix}/lib64
+%define noflibdir %{_prefix}/lib/nof
+%if %{build_primary_64bit}
+%define mainlibdirbi %{mainlibdirbi32}
+%else
+%define mainlibdirbi %{mainlibdirbi64}
+%endif
+%endif
+
+
+# Now define a few macros that make it easy to package libs and
+# related files just to the right package, without caring for the
+# exact path the files are in.
+#   %mainlib  package X from all dirs that belong to the main package
+#   %biarchlib   package X from all dirs that belong to the -32/64bit package
+# by default, nof libs go where the 32bit libs go.
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%endif
+%define biarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%else
+%define mainlib() %{mainlibdir}/%1\
+%{mainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define biarchlib() %{mainlibdirbi}/%1\
+%{noflibdir}/%1\
+%{nil}
+%define mainlib() %{mainlibdir}/%1\
+%{nil}
+%else
+%define biarchlib() %{mainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%endif
+%define versbiarchlib() %{nil}
+%if %{biarch}
+%if !%{separate_biarch}
+%if %{build_nof}
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%else
+%define versmainlib() %{versmainlibdir}/%1\
+%{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%else
+%if %{build_nof}
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{versnoflibdir}/%1\
+%{nil}
+%define versmainlib() %{versmainlibdir}/%1\
+%{nil}
+%else
+%define versbiarchlib() %{versmainlibdirbi}/%1\
+%{nil}
+%endif
+%endif
+%endif
+
+
+# COMMON-BEGIN
+
+%prep
+%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+
+%build
+# Avoid rebuilding of generated files
+contrib/gcc_update --touch
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export LD_AS_NEEDED=0
+# Split version file into version used for directories (X.Y) and
+# version to report with --version (X.Y.Z).
+# See also gcc-dir-version.patch.
+# Also decrement the patchlevel version by one
+if test `cat gcc/DEV-PHASE` == "prerelease"; then
+  ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
+else
+  mv gcc/BASE-VER gcc/FULL-VER
+fi
+cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
+
+rm -rf obj-%{GCCDIST}
+mkdir obj-%{GCCDIST}
+cd obj-%{GCCDIST}
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
+%ifarch %ix86
+# -mcpu is superceded by -mtune but -mtune is not supported by
+# our bootstrap compiler.  -mcpu gives a warning that stops
+# the build process, so remove it for now.  Also remove all other
+# -march and -mtune flags.  They are superseeded by proper
+# default compiler settings now.
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
+%endif
+%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
+# Kill all -march/tune/cpu because that screws building the target libs
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
+%endif
+# Replace 2 spaces by one finally
+RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
+
+languages=c
+%if %{build_cp}
+languages=$languages,c++
+%endif
+%if %{build_objc}
+languages=$languages,objc
+%endif
+%if %{build_fortran}
+languages=$languages,fortran
+%endif
+%if %{build_objcp}
+languages=$languages,obj-c++
+%endif
+%if %{build_java}
+languages=$languages,java
+%endif
+%if %{build_ada}
+languages=$languages,ada
+%endif
+
+J=%{?jobs:%jobs}
+if test -z "$J"; then
+  J=$(getconf _NPROCESSORS_CONF)
+  JL=$(($J * 2))
+else
+  test 1 -gt "$J" && J=1
+  JL=$(($(getconf _NPROCESSORS_CONF)*2))
+fi
+if test "$J" == "0"; then
+  J=1
+fi
+if test "$JL" == "0"; then
+  JL=1
+fi
+PARALLEL="-j$J -l$JL"
+
+# we don't want some miscompiles in the testsuite, or some fault in
+# the compiler to kill the machine.  Hence we limit the amount of memory
+# by the physical RAM plus half of swap
+#MEM=$(free -m | awk '/^Mem:/ {print $2}')
+#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
+#ulimit -v $(((MEM + SWAP/2)*1024))
+
+# In general we want to ship release checking enabled compilers
+# and run BETA with checking enabled.
+#ENABLE_CHECKING="--enable-checking=yes"
+ENABLE_CHECKING="--enable-checking=release"
+
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+
+# configure tries to parse include/features.h to detect
+# if glibc supports SSP.  When cross compiling we would need
+# to install a cross glibc, which we don't, or make the whole
+# thing point to the native glibc, which is in /, hence the
+# --with-sysroot=/
+
+%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} && 0%{!?gcc_icecream:1}
+#%else
+#      --enable-threads=posix \
+#%endif
+#      --enable-shared \
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
+TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+       --prefix=%{_prefix} \
+       --infodir=%{_infodir} \
+       --mandir=%{_mandir} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libdir} \
+       --enable-languages=$languages \
+       $ENABLE_CHECKING \
+       --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
+       --enable-ssp \
+       --disable-libssp \
+       --disable-libitm \
+%if 0%{?fast_build}
+       --disable-bootstrap \
+%endif
+       --disable-plugin \
+       --with-bugurl="http://bugs.tizen.org/" \
+       --with-pkgversion="Tizen Linux" \
+%if !%{build_libjava}
+        --disable-libgcj \
+%else
+       --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
+       --with-ecj-jar=%{libsubdir}/ecj.jar \
+        --disable-java-awt \
+%if !%{biarch_libjava}
+        --disable-libjava-multilib \
+%endif
+%endif
+%if !%{build_with_mudflap}
+       --disable-libmudflap \
+%endif
+       --with-slibdir=/%{_lib} \
+       --with-system-zlib \
+       --enable-__cxa_atexit \
+       --enable-libstdcxx-allocator=new \
+       --disable-libstdcxx-pch \
+       --enable-version-specific-runtime-libs \
+       --enable-linker-build-id \
+%if 0%{?gcc_target_arch:1}
+%if 0%{?gcc_icecream:1}
+       --with-build-sysroot=/ \
+       --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
+       --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+       --enable-linux-futex \
+%endif
+%if 0%{?canonical_target:1}
+       --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
+%endif
+%if 0%{?build_static:1}
+       --disable-shared \
+%endif
+%if "%{TARGET_ARCH}" == "spu"
+       --with-sysroot=/usr/spu \
+       --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
+       --with-newlib \
+%endif
+       --disable-nls \
+       --target=%{CONFIGURE_TARGET} \
+%else
+       --program-suffix=%{binsuffix} \
+       --enable-linux-futex \
+%ifarch ia64
+       --with-system-libunwind \
+%else
+       --without-system-libunwind \
+%endif
+%endif
+%if "%{TARGET_ARCH}" == "armv5tel"
+       --with-arch=armv5te \
+       --with-float=soft \
+       --with-mode=arm \
+       --with-abi=aapcs-linux \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7el" 
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=soft \
+       --with-abi=softfp \
+       --with-fpu=vfpv3 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
+       --with-arch=armv7-a \
+       --with-tune=cortex-a9 \
+       --with-float=hard \
+       --with-abi=aapcs-linux \
+       --with-fpu=vfpv3-d16 \
+       --disable-sjlj-exceptions \
+%endif
+%if "%{TARGET_ARCH}" == "i586"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+%if "%{TARGET_ARCH}" == "x86_64"
+       --with-arch-32=i586 \
+       --with-tune=generic \
+%endif
+       --build=%{GCCDIST}
+
+# COMMON-END
+
+%if 0%{?building_libffi:1}
+make stage1-bubble $PARALLEL
+make all-target-libffi $PARALLEL
+%else
+# Only run profiled bootstrap on archs where it works
+#%ifarch %ix86 x86_64 ppc ppc64 ia64
+#make profiledbootstrap-lean STAGE1_CFLAGS="-O -g" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%else
+%ifarch %arm
+STAGE1_FLAGS="-O0"
+%else
+STAGE1_FLAGS="-O -g"
+%endif
+#make bootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+#%endif
+#make -C gcc proto
+make info
+%if 0%{?run_tests:1}
+echo "Run testsuite"
+(make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
+mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
+make -k check $PARALLEL || true
+mkdir ../testresults
+../contrib/test_summary | tee ../testresults/test_summary.txt
+%endif
+%endif
+
+%install
+export NO_BRP_CHECK_BYTECODE_VERSION=true
+cd obj-%{GCCDIST}
+# GCC-TESTSUITE-DELETE-BEGIN
+# Work around tail/head -1 changes
+export _POSIX2_VERSION=199209
+export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
+%if 0%{?building_libffi:1}
+make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
+%else
+%if 0%{?building_libjava:1}
+make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
+make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
+# install-common also installs collect2, gcov and the g++ and gfortran driver
+%if %{build_cp}
+rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
+%endif
+%if %{build_fortran}
+rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
+%endif
+rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
+rm $RPM_BUILD_ROOT%{libsubdir}/collect2
+%else
+make install DESTDIR=$RPM_BUILD_ROOT
+%if %{build_java}
+make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
+make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
+rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
+rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{libsubdir}/jc1
+rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
+%endif
+%endif
+%endif
+
+# Remove libffi installed files if we did not want to build it
+%if !0%{?building_libffi:1}
+rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
+%if %{biarch}
+  rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
+%endif
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
+%endif
+
+# Remove some useless .la files
+for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
+    libmudflap libmudflapth libgomp libstdc++ libsupc++ libgcj-tools libgij; do
+  rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
+%if %{biarch}
+  rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
+%endif
+done
+
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
+%if %{biarch}
+%if %{build_primary_64bit}
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
+%else
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
+%endif
+%endif
+
+# LIBFFI-DELETE-BEGIN
+
+%if 0%{!?build_optional_compiler:1}
+# move shared libs from versionspecific dir to main libdir
+for libname in \
+%if 0%{?building_libjava:1}
+  libgcj libgij libgcj-tools \
+%else
+%if %{build_fortran}
+  libgfortran \
+%ifarch %quadmath_arch
+  libquadmath \
+%endif
+%endif
+%if %{build_objc}
+  libobjc \
+%endif
+%if %{build_cp}
+  libstdc++ \
+%endif
+  libgomp \
+%if %{build_with_mudflap}
+  libmudflap libmudflapth \
+%endif
+%endif
+    ; do
+  for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do
+    mv $lib $RPM_BUILD_ROOT%{mainlibdir}/
+  done
+  ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
+         $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so
+%if %{biarch}
+  if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
+    for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do
+      mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/
+    done
+    ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
+         $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so
+  fi
+%endif
+done
+%if %{build_cp}
+%if !0%{?building_libjava:1}
+# And we want to move the shlib gdb pretty printers to a more sane
+# place so ldconfig does not complain
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}
+mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/
+sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py
+%if %{biarch}
+  if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
+    mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}
+    mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/
+    sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py
+  fi
+%endif
+%endif
+%endif
+%if 0%{?building_libjava:1}
+# libgcj_bc is special as the .so file is actually a different
+# library as the library refered to by the SONAME which should
+# be a simple link to our libgcj.
+for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name libgcj_bc.so.*`; do
+  rm $lib
+done
+ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdir}/libgcj_bc.so.1
+%if %{biarch_libjava}
+for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name libgcj_bc.so.*`; do
+  rm $lib
+done
+ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdirbi}/libgcj_bc.so.1
+%endif
+%endif
+%endif
+
+# LIBFFI-DELETE-END
+
+%if %{build_ada}
+mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
+ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
+ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
+chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
+%if %{biarch}
+mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
+ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
+ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
+chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
+%endif
+%endif
+
+rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
+
+# Remove some crap from the .la files:
+for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
+  echo "changing $l"
+# -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
+  sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
+      -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
+      -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
+      -e '/^dependency_libs/s|-L[^ ]* ||g' \
+%if %{biarch}
+%if %{build_primary_64bit}
+      -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
+      -e '/^libdir/s|lib64/\.\./||' \
+%else
+      -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
+%endif
+%endif
+      < $l  > $l.new
+  mv $l.new $l
+done
+
+# GCC-TESTSUITE-DELETE-END
+%if 0%{?run_tests:1} 
+cp `find . -name "*.sum"` ../testresults/
+cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
+chmod 644 ../testresults/*
+%endif
+# GCC-TESTSUITE-DELETE-BEGIN
+# LIBFFI-DELETE-BEGIN
+%if %{build_cp}
+# Find C++ and Java headers
+find $RPM_BUILD_ROOT%{_prefix}/include/c++ \
+  -regex ".*/\(org\|gcj\|gnu\|java\|javax\)" -prune \
+  -o \( -type d -printf "%%%%dir " , \
+        -printf "%{_prefix}/include/c++/%%P\n" \) > ../c++-headers
+%endif
+# LIBFFI-DELETE-END
+# Remove files that we do not need to clean up filelist
+rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
+#rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/root
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/curses.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-*
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sound
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/features.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/ncurses.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/stdio.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/X11
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/obstack.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/spe.h
+rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/tgmath.h
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys
+# no plugins
+rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
+rm -f  $RPM_BUILD_ROOT%{_infodir}/dir
+rm -f  $RPM_BUILD_ROOT%{_prefix}/bin/gccbug%{binsuffix}
+
+%if !0%{?building_libjava:1}%{?building_libffi:1}
+# delete compile flag tracking from crt files
+crt_list=$RPM_BUILD_ROOT%{versmainlibdir}/crt*.o
+%if %{biarch}
+%if %{build_primary_64bit}
+crt32_list=$RPM_BUILD_ROOT%{versmainlibdirbi32}/crt*.o
+%else
+crt64_list=$RPM_BUILD_ROOT%{versmainlibdirbi64}/crt*.o
+%endif
+%endif
+for o in $crt_list $crt32_list $crt64_list; do
+  objcopy -R ".comment.SUSE.OPTs" $o
+done
+%endif
+
+%if 0%{?building_libjava:1}
+# gcj -static doesn't work properly anyway, unless using --whole-archive
+# let's save the space instead.
+find $RPM_BUILD_ROOT -name libgcj.a \
+       -o -name libgcj-tools.a \
+       -o -name libgij.a \
+       -o -name libjvm.a \
+       -o -name libgcj_bc.a \
+  | xargs rm -f
+
+find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
+  sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
+
+# security files have broken install locations, also they cause conflicts
+# between libgcj versions.  Simply delete them here, libgcj will use its
+# defaults in this case (which is what these files contain anyway).
+rm $RPM_BUILD_ROOT%{_libdir}/logging.properties
+rm -r $RPM_BUILD_ROOT%{_libdir}/security
+%endif
+
+%if 0%{?building_libffi:1}
+# Move libffi headers, remove empty libffi libtool file
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
+mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
+mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
+rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
+%if %{biarch}
+rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
+%endif
+# Generate a simple pkg-config file
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
+echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
+%endif
+
+%if %{build_java}
+%if !%{build_libjava}
+rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
+rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
+%endif
+rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
+rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
+%endif
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+%if %{build_nof}
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/nof/libiberty.a
+%endif
+%if %{biarch}
+%if %{build_primary_64bit}
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
+%else
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
+%endif
+%endif
+rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
+rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
+
+# LIBFFI-DELETE-BEGIN
+%if 0%{?building_libjava:1}
+# For building libjava only we need to delete other info docs
+rm $RPM_BUILD_ROOT%{_infodir}/cp-tools.info*
+# Remove stale manpages for binaries we do not build
+rm $RPM_BUILD_ROOT%{_mandir}/man1/gjdoc%{binsuffix}.1
+# For building the java frontend we need to copy the ecj jar
+mkdir -p $RPM_BUILD_ROOT%{libsubdir}
+cp $RPM_SOURCE_DIR/ecj.jar $RPM_BUILD_ROOT%{libsubdir}
+%else
+# For regular build, some info files do not get renamed properly.
+# Do so here.
+mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info
+%if %{build_fortran} 
+%ifarch %quadmath_arch
+mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
+%endif
+%endif
+%if %{build_ada}
+mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info
+mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info
+mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info
+%endif
+%endif
+
+
+
+%if %{build_java}
+%if 0%{?building_libjava:1}
+%files -n gcc47-java
+%defattr(-,root,root)
+%{_prefix}/bin/gcj%{binsuffix}
+%{_prefix}/bin/gcjh%{binsuffix}
+%{_prefix}/bin/gcj-dbtool%{binsuffix}
+%{_prefix}/bin/jcf-dump%{binsuffix}
+%{_prefix}/bin/jv-convert%{binsuffix}
+%{_prefix}/bin/gc-analyze%{binsuffix}
+%{_prefix}/bin/aot-compile%{binsuffix}
+%{_prefix}/bin/rebuild-gcj-db%{binsuffix}
+%{libsubdir}/jc1
+%{libsubdir}/jvgenmain
+%{libsubdir}/ecj.jar
+%{libsubdir}/ecj1
+%doc %{_mandir}/man1/gcj%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gcjh%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gcj-dbtool%{binsuffix}.1.gz
+%doc %{_mandir}/man1/jcf-dump%{binsuffix}.1.gz
+%doc %{_mandir}/man1/jv-convert%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gc-analyze%{binsuffix}.1.gz
+%doc %{_mandir}/man1/aot-compile%{binsuffix}.1.gz
+%doc %{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1.gz
+%endif
+%endif
+
+%if %{build_java}
+%if %{build_libjava}
+%files 
+%defattr(-,root,root)
+%dir %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}
+%dir %{_libdir}/gcc
+%dir %{_libdir}/gcc/%{GCCDIST}
+%dir %{libsubdir}
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/classmap.db
+# We usually do not multilib libjava
+%if %{biarch_libjava}
+%versbiarchlib libgcj.la
+%biarchlib libgcj.so.*
+%biarchlib libgij.so.*
+%biarchlib libgcj-tools.so.*
+%else
+%versmainlib libgcj.la
+%mainlib libgcj.so.*
+%mainlib libgij.so.*
+%mainlib libgcj-tools.so.*
+%endif
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.la
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.so
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.la
+%{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.so
+
+%files -n libgcj_bc47
+%defattr(-,root,root)
+%if %{biarch_libjava}
+%biarchlib libgcj_bc.so.*
+%else
+%mainlib libgcj_bc.so.*
+%endif
+
+%files -n libgcj47-jar
+%defattr(-,root,root)
+%{_prefix}/share/java/libgcj-%{gcc_dir_version}.jar
+%{_prefix}/share/java/libgcj-tools-%{gcc_dir_version}.jar
+
+%files -n libgcj47-devel
+%defattr(-,root,root)
+%dir %{_prefix}/include/c++
+%dir %{libsubdir}
+%dir %{libsubdir}/include
+%dir %{gxxinclude}
+%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
+%{libsubdir}/include/jawt.h
+%{libsubdir}/include/jawt_md.h
+%{libsubdir}/include/jni.h
+%{libsubdir}/include/jni_md.h
+%{libsubdir}/include/jvmpi.h
+%{gxxinclude}/gnu
+%{gxxinclude}/gcj
+%{gxxinclude}/java
+%{gxxinclude}/javax
+%{gxxinclude}/org
+%{gxxinclude}/sun
+%{libsubdir}/include/gcj
+%if %{biarch_libjava}
+%versbiarchlib libgcj.so
+%versbiarchlib libgcj.spec
+%versbiarchlib libgcj-tools.so
+%versbiarchlib libgij.so
+%versbiarchlib libgcj_bc.so
+%else
+%versmainlib libgcj.so
+%versmainlib libgcj.spec
+%versmainlib libgcj-tools.so
+%versmainlib libgij.so
+%versmainlib libgcj_bc.so
+%endif
+
+%files -n gcc47-gij
+%defattr(-,root,root)
+%{_prefix}/bin/gij%{binsuffix}
+%{_prefix}/bin/gappletviewer%{binsuffix}
+%{_prefix}/bin/gjar%{binsuffix}
+%{_prefix}/bin/gjarsigner%{binsuffix}
+%{_prefix}/bin/gjavah%{binsuffix}
+%{_prefix}/bin/gkeytool%{binsuffix}
+%{_prefix}/bin/gnative2ascii%{binsuffix}
+%{_prefix}/bin/gorbd%{binsuffix}
+%{_prefix}/bin/grmic%{binsuffix}
+%{_prefix}/bin/grmid%{binsuffix}
+%{_prefix}/bin/grmiregistry%{binsuffix}
+%{_prefix}/bin/gserialver%{binsuffix}
+%{_prefix}/bin/gtnameserv%{binsuffix}
+%doc %{_mandir}/man1/gij%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gappletviewer%{binsuffix}.1.gz
+%doc %{_mandir}/man1/grmic%{binsuffix}.1.gz
+%doc %{_mandir}/man1/grmid%{binsuffix}.1.gz
+%doc %{_mandir}/man1/grmiregistry%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gkeytool%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gjar%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gjarsigner%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gjavah%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gnative2ascii%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gorbd%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gserialver%{binsuffix}.1.gz
+%doc %{_mandir}/man1/gtnameserv%{binsuffix}.1.gz
+%endif
+%endif
+# LIBFFI-DELETE-END
+
+%if %{build_java}
+%if 0%{?building_libffi:1}
+%files -n libffi47
+%defattr(-,root,root)
+%mainlib libffi.so.*
+
+%if %{separate_biarch}
+%files -n libffi47%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libffi.so.*
+%endif
+
+%files -n libffi47-devel
+%defattr(-,root,root)
+%{_prefix}/include/ffi.h
+%{_prefix}/include/ffitarget.h
+%mainlib libffi.so
+%mainlib libffi.a
+%{_libdir}/pkgconfig/libffi.pc
+%doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
+%doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
+%doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
+
+%if %{separate_biarch}
+%files -n libffi47-devel%{separate_biarch_suffix}
+%defattr(-,root,root)
+%biarchlib libffi.so
+%biarchlib libffi.a
+%endif
+%endif
+%endif
+# GCC-TESTSUITE-DELETE-END
+
+%if 0%{?run_tests:1}
+%files -n gcc47-testresults
+%defattr(-,root,root)
+%doc testresults/test_summary.txt
+%doc testresults/*.sum
+%doc testresults/*.log
+%endif
+
+
+%changelog
diff --git a/packaging/libjava-no-multilib.diff b/packaging/libjava-no-multilib.diff
deleted file mode 100644 (file)
index 3ec0b48..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-Index: libjava/configure
-===================================================================
---- libjava/configure.orig     2011-11-03 16:31:17.000000000 +0100
-+++ libjava/configure  2011-11-03 17:08:27.000000000 +0100
-@@ -3364,6 +3364,26 @@ else
- fi
-+# Default to --enable-libjava-multilib
-+# Check whether --enable-libjava-multilib or --disable-libjava-multilib was given.
-+if test "${enable_libjava_multilib+set}" = set; then
-+  enableval="$enable_libjava_multilib"
-+  case "${enableval}" in
-+  yes) multilib=yes ;;
-+  no)  multilib=no ;;
-+  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for libjava-multilib option" >&5
-+echo "$as_me: error: bad value ${enableval} for libjava-multilib option" >&2;}
-+   { (exit 1); exit 1; }; } ;;
-+ esac
-+else
-+ multilib=yes
-+fi;
-+if test "$multilib" = no; then
-+# Reset also --enable-multilib state, as that is what is looked at
-+# by config-ml.in
-+ ac_configure_args="$ac_configure_args --disable-multilib"
-+fi
-+
- # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
diff --git a/packaging/pr33763.diff b/packaging/pr33763.diff
deleted file mode 100644 (file)
index f0b63c7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: gcc/tree-inline.c
-===================================================================
-*** gcc/tree-inline.c.orig     2011-11-03 16:27:43.000000000 +0100
---- gcc/tree-inline.c  2011-11-04 11:37:21.000000000 +0100
-*************** expand_call_inline (basic_block bb, gimp
-*** 3775,3780 ****
---- 3775,3786 ----
-       goto egress;
-  
-        if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
-+        /* For extern inline functions that get redefined we always
-+           silently ignored alway_inline flag.  Better behaviour would
-+           be to be able to keep both bodies and use extern inline body
-+           for inlining, but we can't do that because frontends overwrite
-+           the body.  */
-+        && !cg_edge->callee->local.redefined_extern_inline
-         /* Avoid warnings during early inline pass. */
-         && cgraph_global_info_ready
-         /* PR 20090218-1_0.c. Body can be provided by another module. */
diff --git a/packaging/pr49484.diff b/packaging/pr49484.diff
deleted file mode 100644 (file)
index 893b978..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-2012-01-18  Richard Guenther  <rguenther@suse.de>
-
-       * gthr.h (__GTHREAD_MUTEX_INIT_FUNCTION): Adjust specification.
-       * gthr-posix.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.
-       (__gthread_mutex_init_function): New function.
-       * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.
-
-       PR gcov/49484
-       * libgcov.c: Include gthr.h.
-       (__gcov_flush_mx): New global variable.
-       (init_mx, init_mx_once): New functions.
-       (__gcov_flush): Protect self with a mutex.
-       (__gcov_fork): Re-initialize mutex after forking.
-       * unwind-dw2-fde.c: Change condition under which to use
-       __GTHREAD_MUTEX_INIT_FUNCTION.
-
-Index: libgcc/libgcov.c
-===================================================================
-*** libgcc/libgcov.c.orig      2012-03-02 12:02:35.000000000 +0100
---- libgcc/libgcov.c   2012-03-14 13:01:34.000000000 +0100
-*************** see the files COPYING3 and COPYING.RUNTI
-*** 30,35 ****
---- 30,36 ----
-  #include "coretypes.h"
-  #include "tm.h"
-  #include "libgcc_tm.h"
-+ #include "gthr.h"
-  
-  #if defined(inhibit_libc)
-  #define IN_LIBGCOV (-1)
-*************** __gcov_init (struct gcov_info *info)
-*** 705,710 ****
---- 706,730 ----
-    info->version = 0;
-  }
-  
-+ #ifdef __GTHREAD_MUTEX_INIT
-+ ATTRIBUTE_HIDDEN __gthread_mutex_t __gcov_flush_mx = __GTHREAD_MUTEX_INIT;
-+ #define init_mx_once()
-+ #else
-+ __gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
-+ 
-+ static void
-+ init_mx (void)
-+ {
-+   __GTHREAD_MUTEX_INIT_FUNCTION (&mx);
-+ }
-+ static void
-+ init_mx_once (void)
-+ {
-+   static __gthread_once_t once = __GTHREAD_ONCE_INIT;
-+   __gthread_once (&once, init_mx);
-+ }
-+ #endif
-+ 
-  /* Called before fork or exec - write out profile information gathered so
-     far and reset it to zero.  This avoids duplication or loss of the
-     profile information gathered so far.  */
-*************** __gcov_flush (void)
-*** 714,719 ****
---- 734,742 ----
-  {
-    const struct gcov_info *gi_ptr;
-  
-+   init_mx_once ();
-+   __gthread_mutex_lock (&__gcov_flush_mx);
-+ 
-    gcov_exit ();
-    for (gi_ptr = gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
-      {
-*************** __gcov_flush (void)
-*** 737,742 ****
---- 760,767 ----
-           }
-       }
-      }
-+ 
-+   __gthread_mutex_unlock (&__gcov_flush_mx);
-  }
-  
-  #endif /* L_gcov */
-*************** __gcov_ior_profiler (gcov_type *counters
-*** 975,982 ****
-  pid_t
-  __gcov_fork (void)
-  {
-    __gcov_flush ();
-!   return fork ();
-  }
-  #endif
-  
---- 1000,1012 ----
-  pid_t
-  __gcov_fork (void)
-  {
-+   pid_t pid;
-+   extern __gthread_mutex_t __gcov_flush_mx;
-    __gcov_flush ();
-!   pid = fork ();
-!   if (pid == 0)
-!     __GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_flush_mx);
-!   return pid;
-  }
-  #endif
-  
-Index: libgcc/unwind-dw2-fde.c
-===================================================================
-*** libgcc/unwind-dw2-fde.c.orig       2012-03-02 12:02:35.000000000 +0100
---- libgcc/unwind-dw2-fde.c    2012-03-14 13:01:34.000000000 +0100
-*************** static struct object *seen_objects;
-*** 47,57 ****
-  
-  #ifdef __GTHREAD_MUTEX_INIT
-  static __gthread_mutex_t object_mutex = __GTHREAD_MUTEX_INIT;
-  #else
-  static __gthread_mutex_t object_mutex;
-- #endif
-  
-- #ifdef __GTHREAD_MUTEX_INIT_FUNCTION
-  static void
-  init_object_mutex (void)
-  {
---- 47,56 ----
-  
-  #ifdef __GTHREAD_MUTEX_INIT
-  static __gthread_mutex_t object_mutex = __GTHREAD_MUTEX_INIT;
-+ #define init_object_mutex_once()
-  #else
-  static __gthread_mutex_t object_mutex;
-  
-  static void
-  init_object_mutex (void)
-  {
-*************** init_object_mutex_once (void)
-*** 64,71 ****
-    static __gthread_once_t once = __GTHREAD_ONCE_INIT;
-    __gthread_once (&once, init_object_mutex);
-  }
-- #else
-- #define init_object_mutex_once()
-  #endif
-  
-  /* Called from crtbegin.o to register the unwind info for an object.  */
---- 63,68 ----
-Index: libgcc/gthr-posix.h
-===================================================================
-*** libgcc/gthr-posix.h.orig   2012-03-02 12:02:35.000000000 +0100
---- libgcc/gthr-posix.h        2012-03-14 13:02:09.000000000 +0100
-*************** typedef struct timespec __gthread_time_t
-*** 63,68 ****
---- 63,69 ----
-  #define __GTHREAD_HAS_COND   1
-  
-  #define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
-+ #define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function
-  #define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
-  #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
-  #define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
-*************** typedef struct timespec __gthread_time_t
-*** 76,82 ****
-  
-  #ifdef _GTHREAD_USE_MUTEX_INIT_FUNC
-  # undef __GTHREAD_MUTEX_INIT
-- # define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function
-  #endif
-  #ifdef _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
-  # undef __GTHREAD_RECURSIVE_MUTEX_INIT
---- 77,82 ----
-*************** __gthread_setspecific (__gthread_key_t _
-*** 744,757 ****
-    return __gthrw_(pthread_setspecific) (__key, __ptr);
-  }
-  
-- #ifdef _GTHREAD_USE_MUTEX_INIT_FUNC
-  static inline void
-  __gthread_mutex_init_function (__gthread_mutex_t *__mutex)
-  {
-    if (__gthread_active_p ())
-      __gthrw_(pthread_mutex_init) (__mutex, NULL);
-  }
-- #endif
-  
-  static inline int
-  __gthread_mutex_destroy (__gthread_mutex_t *__mutex)
---- 744,755 ----
-Index: libgcc/gthr-single.h
-===================================================================
-*** libgcc/gthr-single.h.orig  2012-03-02 12:02:35.000000000 +0100
---- libgcc/gthr-single.h       2012-03-14 13:01:34.000000000 +0100
-*************** typedef int __gthread_recursive_mutex_t;
-*** 36,41 ****
---- 36,42 ----
-  
-  #define __GTHREAD_ONCE_INIT 0
-  #define __GTHREAD_MUTEX_INIT 0
-+ #define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
-  #define __GTHREAD_RECURSIVE_MUTEX_INIT 0
-  
-  #define UNUSED __attribute__((unused))
-Index: libgcc/gthr.h
-===================================================================
-*** libgcc/gthr.h.orig 2012-03-02 12:02:35.000000000 +0100
---- libgcc/gthr.h      2012-03-14 13:01:34.000000000 +0100
-*************** see the files COPYING3 and COPYING.RUNTI
-*** 52,62 ****
-                       to initialize __gthread_mutex_t to get a fast
-               non-recursive mutex.
-       __GTHREAD_MUTEX_INIT_FUNCTION
-!                      some systems can't initialize a mutex without a
-!              function call.  On such systems, define this to a
-!              function which looks like this:
-                 void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
-!              Don't define __GTHREAD_MUTEX_INIT in this case
-       __GTHREAD_RECURSIVE_MUTEX_INIT
-       __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
-                       as above, but for a recursive mutex.
---- 52,63 ----
-                       to initialize __gthread_mutex_t to get a fast
-               non-recursive mutex.
-       __GTHREAD_MUTEX_INIT_FUNCTION
-!              to initialize __gthread_mutex_t to get a fast
-!              non-recursive mutex.
-!              Define this to a function which looks like this:
-                 void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
-!                      Some systems can't initialize a mutex without a
-!              function call.  Don't define __GTHREAD_MUTEX_INIT in this case.
-       __GTHREAD_RECURSIVE_MUTEX_INIT
-       __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
-                       as above, but for a recursive mutex.
diff --git a/packaging/pre_checkin.sh b/packaging/pre_checkin.sh
new file mode 100644 (file)
index 0000000..aa77f62
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+# This script is called automatically during autobuild checkin.
+
+case $0 in
+  \./*)
+    here=$PWD
+    ;;
+  */*)
+    here=${0%/*}
+    ;;
+  *)
+    here=$PWD
+    ;;
+esac
+case ${here##*/} in
+  gcc-*)
+    suffix=${here##*/}
+    set ${suffix#*-}-
+    ;;
+  gcc[0-9]*)
+    suffix=${here##*/}
+    set ${suffix#gcc}
+    ;;
+esac
+. ${here}/change_spec
diff --git a/packaging/program-transform-name.diff b/packaging/program-transform-name.diff
deleted file mode 100644 (file)
index 6f821d0..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-Index: gcc/ada/gcc-interface/Make-lang.in
-===================================================================
---- gcc/ada/gcc-interface/Make-lang.in.orig    2011-11-03 16:26:46.000000000 +0100
-+++ gcc/ada/gcc-interface/Make-lang.in 2011-11-03 17:08:13.000000000 +0100
-@@ -758,6 +758,21 @@ doc/gnat-style.pdf: ada/gnat-style.texi
- # likewise for gnatf, gnatchop, and gnatlink, gnatkr, gnatmake, gnat,
- # gnatprep, gnatls, gnatxref, gnatfind, gnatname, gnatclean,
- # gnatsym
-+GNATBIND_INSTALL_NAME := $(shell echo gnatbind|sed '$(program_transform_name)')
-+GNATCHOP_INSTALL_NAME := $(shell echo gnatchop|sed '$(program_transform_name)')
-+GNAT_INSTALL_NAME := $(shell echo gnat|sed '$(program_transform_name)')
-+GNATKR_INSTALL_NAME := $(shell echo gnatkr|sed '$(program_transform_name)')
-+GNATLINK_INSTALL_NAME := $(shell echo gnatlink|sed '$(program_transform_name)')
-+GNATLS_INSTALL_NAME := $(shell echo gnatls|sed '$(program_transform_name)')
-+GNATMAKE_INSTALL_NAME := $(shell echo gnatmake|sed '$(program_transform_name)')
-+GNATNAME_INSTALL_NAME := $(shell echo gnatname|sed '$(program_transform_name)')
-+GNATPREP_INSTALL_NAME := $(shell echo gnatprep|sed '$(program_transform_name)')
-+GNATXREF_INSTALL_NAME := $(shell echo gnatxref|sed '$(program_transform_name)')
-+GNATFIND_INSTALL_NAME := $(shell echo gnatfind|sed '$(program_transform_name)')
-+GNATCLEAN_INSTALL_NAME := $(shell echo gnatclean|sed '$(program_transform_name)')
-+GNATSYM_INSTALL_NAME := $(shell echo gnatsym|sed '$(program_transform_name)')
-+GNATDLL_INSTALL_NAME := $(shell echo gnatdll|sed '$(program_transform_name)')
-+VXADDR2LINE_INSTALL_NAME := $(shell echo vxaddr2line|sed '$(program_transform_name)')
- ada.install-common:
-       $(MKDIR) $(DESTDIR)$(bindir)
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -771,8 +786,8 @@ ada.install-common:
-             $(INSTALL_PROGRAM) gnatbind-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnatbind$(exeext); \
-           fi; \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatbind$(exeext); \
--          $(INSTALL_PROGRAM) gnatbind$(exeext) $(DESTDIR)$(bindir)/gnatbind$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATBIND_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatbind$(exeext) $(DESTDIR)$(bindir)/$(GNATBIND_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -786,8 +801,8 @@ ada.install-common:
-              $(INSTALL_PROGRAM) gnatchop-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnatchop$(exeext); \
-           fi ; \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatchop$(exeext); \
--          $(INSTALL_PROGRAM) gnatchop$(exeext) $(DESTDIR)$(bindir)/gnatchop$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATCHOP_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatchop$(exeext) $(DESTDIR)$(bindir)/$(GNATCHOP_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -801,8 +816,8 @@ ada.install-common:
-              $(INSTALL_PROGRAM) gnat-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnat$(exeext); \
-           fi; \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnat$(exeext); \
--          $(INSTALL_PROGRAM) gnat$(exeext) $(DESTDIR)$(bindir)/gnat$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNAT_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnat$(exeext) $(DESTDIR)$(bindir)/$(GNAT_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -816,8 +831,8 @@ ada.install-common:
-              $(INSTALL_PROGRAM) gnatkr-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnatkr$(exeext); \
-           fi; \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatkr$(exeext); \
--          $(INSTALL_PROGRAM) gnatkr$(exeext) $(DESTDIR)$(bindir)/gnatkr$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATKR_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatkr$(exeext) $(DESTDIR)$(bindir)/$(GNATKR_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -831,8 +846,8 @@ ada.install-common:
-              $(INSTALL_PROGRAM) gnatlink-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnatlink$(exeext); \
-           fi; \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatlink$(exeext); \
--          $(INSTALL_PROGRAM) gnatlink$(exeext) $(DESTDIR)$(bindir)/gnatlink$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATLINK_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatlink$(exeext) $(DESTDIR)$(bindir)/$(GNATLINK_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -846,8 +861,8 @@ ada.install-common:
-              $(INSTALL_PROGRAM) gnatls-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnatls$(exeext); \
-           fi; \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatls$(exeext); \
--          $(INSTALL_PROGRAM) gnatls$(exeext) $(DESTDIR)$(bindir)/gnatls$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATLS_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatls$(exeext) $(DESTDIR)$(bindir)/$(GNATLS_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -861,8 +876,8 @@ ada.install-common:
-              $(INSTALL_PROGRAM) gnatmake-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnatmake$(exeext); \
-           fi; \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatmake$(exeext); \
--          $(INSTALL_PROGRAM) gnatmake$(exeext) $(DESTDIR)$(bindir)/gnatmake$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATMAKE_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatmake$(exeext) $(DESTDIR)$(bindir)/$(GNATMAKE_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -872,8 +887,8 @@ ada.install-common:
-           $(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatname$(exeext); \
-           $(INSTALL_PROGRAM) gnatname-cross$(exeext) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatname$(exeext); \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatname$(exeext); \
--          $(INSTALL_PROGRAM) gnatname$(exeext) $(DESTDIR)$(bindir)/gnatname$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATNAME_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatname$(exeext) $(DESTDIR)$(bindir)/$(GNATNAME_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -887,8 +902,8 @@ ada.install-common:
-              $(INSTALL_PROGRAM) gnatprep-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnatprep$(exeext); \
-           fi; \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatprep$(exeext); \
--          $(INSTALL_PROGRAM) gnatprep$(exeext) $(DESTDIR)$(bindir)/gnatprep$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATPREP_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatprep$(exeext) $(DESTDIR)$(bindir)/$(GNATPREP_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -898,8 +913,8 @@ ada.install-common:
-           $(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatxref$(exeext); \
-           $(INSTALL_PROGRAM) gnatxref-cross$(exeext) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatxref$(exeext); \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatxref$(exeext); \
--          $(INSTALL_PROGRAM) gnatxref$(exeext) $(DESTDIR)$(bindir)/gnatxref$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATXREF_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatxref$(exeext) $(DESTDIR)$(bindir)/$(GNATXREF_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -909,8 +924,8 @@ ada.install-common:
-           $(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatfind$(exeext); \
-           $(INSTALL_PROGRAM) gnatfind-cross$(exeext) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatfind$(exeext); \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatfind$(exeext); \
--          $(INSTALL_PROGRAM) gnatfind$(exeext) $(DESTDIR)$(bindir)/gnatfind$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATFIND_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatfind$(exeext) $(DESTDIR)$(bindir)/$(GNATFIND_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-       -if [ -f gnat1$(exeext) ] ; \
-@@ -920,8 +935,8 @@ ada.install-common:
-           $(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatclean$(exeext); \
-           $(INSTALL_PROGRAM) gnatclean-cross$(exeext) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatclean$(exeext); \
-         else \
--          $(RM) $(DESTDIR)$(bindir)/gnatclean$(exeext); \
--          $(INSTALL_PROGRAM) gnatclean$(exeext) $(DESTDIR)$(bindir)/gnatclean$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATCLEAN_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatclean$(exeext) $(DESTDIR)$(bindir)/$(GNATCLEAN_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
- #
-@@ -935,7 +950,7 @@ ada.install-common:
-           $(INSTALL_PROGRAM) gnatsym-cross$(exeext) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatsym$(exeext); \
-         else \
-           $(RM) $(DESTDIR)$(bindir)/gnatsym$(exeext); \
--          $(INSTALL_PROGRAM) gnatsym$(exeext) $(DESTDIR)$(bindir)/gnatsym$(exeext); \
-+          $(INSTALL_PROGRAM) gnatsym$(exeext) $(DESTDIR)$(bindir)/$(GNATSYM_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
- #
-@@ -943,8 +958,8 @@ ada.install-common:
- #
-       -if [ -f gnat1$(exeext) ] ; \
-       then \
--          $(RM) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
--          $(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(GNATDLL_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/$(GNATDLL_INSTALL_NAME)$(exeext); \
-       fi
- #
- # vxaddr2line is only used for cross ports (it calls the underlying cross
-@@ -954,8 +969,8 @@ ada.install-common:
-       then \
-         if [ -f vxaddr2line$(exeext) ] ; \
-         then \
--          $(RM) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
--          $(INSTALL_PROGRAM) vxaddr2line$(exeext) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
-+          $(RM) $(DESTDIR)$(bindir)/$(VXADDR2LINE_INSTALL_NAME)$(exeext); \
-+          $(INSTALL_PROGRAM) vxaddr2line$(exeext) $(DESTDIR)$(bindir)/$(VXADDR2LINE_INSTALL_NAME)$(exeext); \
-         fi ; \
-       fi
-@@ -1019,8 +1034,6 @@ ada.uninstall:
-       -$(RM) $(DESTDIR)$(tooldir)/bin/gnatxref$(exeext)
-       -$(RM) $(DESTDIR)$(tooldir)/bin/gnatclean$(exeext)
-       -$(RM) $(DESTDIR)$(tooldir)/bin/gnatsym$(exeext)
--# Gnatchop is only used on VMS
--      -$(RM) $(DESTDIR)$(bindir)/gnatchop$(exeext)
- # Clean hooks:
- # A lot of the ancillary files are deleted by the main makefile.
diff --git a/packaging/sap303956-uchar.diff b/packaging/sap303956-uchar.diff
deleted file mode 100644 (file)
index f9c896c..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-Index: gcc/ginclude/uchar.h
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gcc/ginclude/uchar.h       2011-11-09 12:00:01.000000000 +0100
-@@ -0,0 +1,38 @@
-+/* Copyright (C) 2008 Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2, or (at your option)
-+any later version.
-+
-+GCC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GCC; see the file COPYING.  If not, write to
-+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+Boston, MA 02110-1301, USA.  */
-+
-+/* As a special exception, if you include this header file into source
-+   files compiled by GCC, this header file does not by itself cause
-+   the resulting executable to be covered by the GNU General Public
-+   License.  This exception does not however invalidate any other
-+   reasons why the executable file might be covered by the GNU General
-+   Public License.  */
-+
-+/*
-+ * template header so that char16_t and char32_t are available
-+ * in C (not only in C++).  This is not a full implementation of <uchar.h>
-+ */
-+
-+#ifndef _UCHAR_H___
-+#define _UCHAR_H___
-+#ifndef __cplusplus
-+typedef __CHAR16_TYPE__ char16_t;
-+typedef __CHAR32_TYPE__ char32_t;
-+#endif
-+#endif
-Index: gcc/Makefile.in
-===================================================================
---- gcc/Makefile.in.orig       2011-11-09 11:59:58.000000000 +0100
-+++ gcc/Makefile.in    2011-11-09 12:00:01.000000000 +0100
-@@ -375,6 +375,7 @@ USER_H = $(srcdir)/ginclude/float.h \
-        $(srcdir)/ginclude/stddef.h \
-        $(srcdir)/ginclude/varargs.h \
-        $(srcdir)/ginclude/stdfix.h \
-+       $(srcdir)/ginclude/uchar.h \
-        $(srcdir)/ginclude/stdnoreturn.h \
-        $(srcdir)/ginclude/stdalign.h \
-        $(EXTRA_HEADERS)
diff --git a/packaging/suse-record-gcc-opts.diff b/packaging/suse-record-gcc-opts.diff
deleted file mode 100644 (file)
index 6e864d2..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-Index: gcc/varasm.c
-===================================================================
---- gcc/varasm.c.orig  2011-11-03 16:27:43.000000000 +0100
-+++ gcc/varasm.c       2011-11-03 17:07:57.000000000 +0100
-@@ -6979,6 +6979,35 @@ file_end_indicate_split_stack (void)
-     }
- }
-+/* This is a generic routine emitting a SUSE specific section for
-+   QA check marks. */
-+
-+void
-+suse_file_end_indicate_optflags (void)
-+{
-+  unsigned int flags = SECTION_DEBUG | SECTION_STRINGS | SECTION_MERGE | (SECTION_ENTSIZE & 1);
-+
-+  /*
-+     o/O: optimize was off/on
-+     s/S: size optimisation was off/on
-+     p/P: stack-protector was off/on
-+     w/W: warnings were off/on
-+     g/G: debug was off/on
-+     */
-+
-+  char opts_buffer[6];
-+
-+  opts_buffer[0] = (optimize >= 2) ? 'O' : 'o';
-+  opts_buffer[1] = (optimize >= 1 && optimize_size) ? 'S' : 's';
-+  opts_buffer[2] = (flag_stack_protect >= 1) ? 'P' : 'p';
-+  opts_buffer[3] = (warn_uninitialized >= 1 && warn_sequence_point >= 1) ? 'W' : 'w';
-+  opts_buffer[4] = (debug_info_level > DINFO_LEVEL_NONE) ? 'G' : 'g';
-+  opts_buffer[5] = '\0';
-+
-+  switch_to_section (get_section (".comment.SUSE.OPTs", flags, NULL));
-+  ASM_OUTPUT_ASCII (asm_out_file, opts_buffer, strlen (opts_buffer) + 1);
-+}
-+
- /* Output DIRECTIVE (a C string) followed by a newline.  This is used as
-    a get_unnamed_section callback.  */
-Index: gcc/output.h
-===================================================================
---- gcc/output.h.orig  2011-11-03 16:27:43.000000000 +0100
-+++ gcc/output.h       2011-11-03 17:07:57.000000000 +0100
-@@ -652,6 +652,7 @@ extern void default_asm_declare_constant
- extern void default_file_start (void);
- extern void file_end_indicate_exec_stack (void);
- extern void file_end_indicate_split_stack (void);
-+extern void suse_file_end_indicate_optflags (void);
- extern void default_elf_asm_output_external (FILE *file, tree,
-                                            const char *);
-Index: gcc/toplev.c
-===================================================================
---- gcc/toplev.c.orig  2011-11-03 16:27:43.000000000 +0100
-+++ gcc/toplev.c       2011-11-03 17:07:57.000000000 +0100
-@@ -682,6 +682,8 @@ compile_file (void)
-   /* Invoke registered plugin callbacks.  */
-   invoke_plugin_callbacks (PLUGIN_FINISH_UNIT, NULL);
-+  suse_file_end_indicate_optflags ();
-+
-   /* This must be at the end.  Some target ports emit end of file directives
-      into the assembly file here, and hence we can not output anything to the
-      assembly file after this point.  */
diff --git a/packaging/tls-no-direct.diff b/packaging/tls-no-direct.diff
deleted file mode 100644 (file)
index 547a91b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: gcc/config/i386/gnu-user.h
-===================================================================
---- gcc/config/i386/gnu-user.h.orig    2011-05-09 17:58:22.000000000 +0200
-+++ gcc/config/i386/gnu-user.h 2011-11-03 17:12:38.000000000 +0100
-@@ -30,8 +30,12 @@ along with GCC; see the file COPYING3.
- #define DEFAULT_PCC_STRUCT_RETURN 1
- /* We arrange for the whole %gs segment to map the tls area.  */
-+/* This slows down Xen, so take a very small general performance hit
-+   for not accessing the %gs segment with negative offsets by making
-+   GCC not emit direct accesses to %gs at all.
- #undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
- #define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
-+ */
- #undef ASM_COMMENT_START
- #define ASM_COMMENT_START "#"