commit gcc48 for openSUSE:Factory
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
Hello community, here is the log from the commit of package gcc48 for openSUSE:Factory checked in at 2013-03-25 20:17:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcc48 (Old) and /work/SRC/openSUSE:Factory/.gcc48.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "gcc48", Maintainer is "" Changes: -------- New Changes file: --- /dev/null 2013-02-26 18:15:11.936010755 +0100 +++ /work/SRC/openSUSE:Factory/.gcc48.new/cross-aarch64-gcc48-icecream-backend.changes 2013-03-25 20:17:49.000000000 +0100 @@ -0,0 +1,110 @@ +------------------------------------------------------------------- +Wed Mar 20 11:37:21 UTC 2013 - rguenther@suse.com + +- Drop suse-record-gcc-opts.diff. + +------------------------------------------------------------------- +Wed Mar 20 10:28:13 UTC 2013 - rguenther@suse.com + +- Adjust gcc48 rpmlintrc to ignore errors about suffixed + shared library names. +- Add rpmlintrc to libffi48 and libgcj48 packages for the same reason. + +------------------------------------------------------------------- +Mon Mar 18 14:00:48 UTC 2013 - rguenther@suse.com + +- Update to first GCC 4.8.0 release candidate (r196783). + +------------------------------------------------------------------- +Fri Mar 15 10:58:29 UTC 2013 - rguenther@suse.com + +- Dependent on %product_libs_gcc_ver suffix shared library packages + with -gcc48. +- Adjust shared library package provides and conflicts. + +------------------------------------------------------------------- +Mon Mar 11 10:26:03 UTC 2013 - rguenther@suse.com + +- Update to GCC trunk head (r196547). + +------------------------------------------------------------------- +Tue Mar 5 13:35:36 UTC 2013 - rguenther@suse.com + +- Ship arm_neon.h for aarch64. +- Drop -g from STAGE1_CFLAGS, do not use special-case STAGE1_CFLAGS + for arm. + +------------------------------------------------------------------- +Tue Feb 26 11:59:15 UTC 2013 - rguenther@suse.com + +- Update to GCC trunk head (r196281). + +------------------------------------------------------------------- +Mon Feb 18 14:05:09 UTC 2013 - rguenther@suse.com + +- Update to GCC trunk head (r196121). + +------------------------------------------------------------------- +Fri Feb 8 13:59:28 UTC 2013 - rguenther@suse.com + +- Update to GCC trunk head (r195885). + +------------------------------------------------------------------- +Thu Jan 31 08:21:54 UTC 2013 - dmueller@suse.com + +- Add arm to itm/atomic_arches list + +------------------------------------------------------------------- +Thu Jan 17 11:57:07 UTC 2013 - rguenther@suse.com + +- Update to GCC trunk head (r195262). +- Remove unzip dependency for building libgcj. +- Do not build Fortran or Objective C when building libgcj. + +------------------------------------------------------------------- +Wed Jan 9 14:01:33 UTC 2013 - rguenther@suse.com + +- Update to GCC trunk head (r195049). + +------------------------------------------------------------------- +Sun Dec 23 17:11:51 UTC 2012 - schwab@linux-m68k.org + +- Fix installation of gnat_ugn manual +- Fix info references in dir file + +------------------------------------------------------------------- +Thu Dec 20 15:47:34 UTC 2012 - rguenther@suse.com + +- Update to GCC trunk head (r194635). +- Fixup cross.spec.in. + +------------------------------------------------------------------- +Wed Dec 19 11:54:49 UTC 2012 - rguenther@suse.com + +- Update to GCC trunk head (r194606). + +------------------------------------------------------------------- +Mon Dec 17 13:17:06 UTC 2012 - rguenther@suse.com + +- Update to GCC trunk head (r194556). +- Fixup cross.spec.in and icecream-cross.spec.in. +- Add aarch64 icecream and cross compiler target. + +------------------------------------------------------------------- +Fri Dec 14 09:34:23 UTC 2012 - rguenther@suse.com + +- Update to GCC trunk head (r194496). + +------------------------------------------------------------------- +Wed Dec 12 11:37:50 UTC 2012 - rguenther@suse.com + +- Update to GCC trunk head (r194442). + +------------------------------------------------------------------- +Tue Dec 11 11:20:31 UTC 2012 - rguenther@suse.com + +- New package, created from GCC trunk head (r194392), which will + develop to GCC 4.8.0. + * Adds libatomic1 and libitm1 sub-packages for transactional memory + * Adds libasan0 and libtsan0 sub-packages for address and thread sanitizing + New Changes file: cross-aarch64-gcc48.changes: same change New Changes file: cross-armv5tel-gcc48-icecream-backend.changes: same change New Changes file: cross-armv7hl-gcc48-icecream-backend.changes: same change New Changes file: cross-hppa-gcc48-icecream-backend.changes: same change New Changes file: cross-i386-gcc48-icecream-backend.changes: same change New Changes file: cross-ia64-gcc48-icecream-backend.changes: same change New Changes file: cross-ppc-gcc48-icecream-backend.changes: same change New Changes file: cross-ppc64-gcc48-icecream-backend.changes: same change New Changes file: cross-s390-gcc48-icecream-backend.changes: same change New Changes file: cross-s390x-gcc48-icecream-backend.changes: same change New Changes file: cross-x86_64-gcc48-icecream-backend.changes: same change New Changes file: gcc48-testresults.changes: same change New Changes file: gcc48.changes: same change New Changes file: libffi48.changes: same change New Changes file: libgcj48.changes: same change New: ---- README.First-for.SuSE.packagers Wunprototyped-calls.diff _constraints baselibs.conf change_spec check-build.sh cross-aarch64-gcc48-icecream-backend.changes cross-aarch64-gcc48-icecream-backend.spec cross-aarch64-gcc48.changes cross-aarch64-gcc48.spec cross-armv5tel-gcc48-icecream-backend.changes cross-armv5tel-gcc48-icecream-backend.spec cross-armv7hl-gcc48-icecream-backend.changes cross-armv7hl-gcc48-icecream-backend.spec cross-hppa-gcc48-icecream-backend.changes cross-hppa-gcc48-icecream-backend.spec cross-i386-gcc48-icecream-backend.changes cross-i386-gcc48-icecream-backend.spec cross-ia64-gcc48-icecream-backend.changes cross-ia64-gcc48-icecream-backend.spec cross-icecream.spec.in cross-ppc-gcc48-icecream-backend.changes cross-ppc-gcc48-icecream-backend.spec cross-ppc64-gcc48-icecream-backend.changes cross-ppc64-gcc48-icecream-backend.spec cross-s390-gcc48-icecream-backend.changes cross-s390-gcc48-icecream-backend.spec cross-s390x-gcc48-icecream-backend.changes cross-s390x-gcc48-icecream-backend.spec cross-x86_64-gcc48-icecream-backend.changes cross-x86_64-gcc48-icecream-backend.spec cross.spec.in ecj.jar gcc-4.8.0-20130318.tar.bz2 gcc-add-defaultsspec.diff gcc-dir-version.patch gcc-noalias-warn.diff gcc-sles-version.patch gcc.spec.in gcc41-ia64-stack-protector.patch gcc41-java-slow_pthread_self.patch gcc41-ppc32-retaddr.patch gcc43-no-unwind-tables.diff gcc44-rename-info-files.patch gcc44-textdomain.patch gcc48-rpmlintrc gcc48-testresults.changes gcc48-testresults.spec gcc48.changes gcc48.spec libffi48-rpmlintrc libffi48.changes libffi48.spec libgcj48-rpmlintrc libgcj48.changes libgcj48.spec libjava-no-multilib.diff pre_checkin.sh sap303956-uchar.diff tls-no-direct.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-aarch64-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-aarch64-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_nof 0 %define build_with_mudflap 0 %define gcc_target_arch aarch64-suse-linux %define gcc_icecream 1 %define binutils_target aarch64 %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-aarch64-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-aarch64-gcc48.spec ++++++ # # spec file for package cross-aarch64-gcc48 # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define 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 aarch64 %if "aarch64" == "spu" %define build_fortran 1 %endif %if 0%{?build_static:1} %define build_fortran 0 %endif %define binutils_target aarch64 %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-aarch64-gcc48 BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif Requires: cross-%{binutils_target}-binutils %if "aarch64" == "spu" %define sysroot /usr/spu %if 0%{?build_static:1} BuildRequires: cross-aarch64-newlib-headers %else BuildRequires: cross-aarch64-newlib %endif Requires: cross-aarch64-newlib %endif %if "aarch64" == "aarch64" BuildRequires: cross-aarch64-suse-linux-glibc Requires: cross-aarch64-suse-linux-glibc %endif # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description This compiler supports the C language on aarch64 microprocessors. Also install cross-aarch64-binutils and aarch64-libc. # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END 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} %changelog ++++++ cross-armv5tel-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-armv5tel-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define 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 armv5tel-suse-linux %define gcc_icecream 1 %define binutils_target armv5tel %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-armv5tel-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-armv7hl-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-armv7hl-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define 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-suse-linux %define gcc_icecream 1 %define binutils_target armv7hl %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-armv7hl-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-hppa-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-hppa-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_nof 0 %define build_with_mudflap 0 %define gcc_target_arch hppa-suse-linux %define gcc_icecream 1 %define binutils_target hppa %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-hppa-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-i386-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-i386-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_nof 0 %define build_with_mudflap 0 %define gcc_target_arch i386-suse-linux %define gcc_icecream 1 %define binutils_target i386 %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-i386-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc ppc64 x86_64 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-ia64-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-ia64-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_nof 0 %define build_with_mudflap 0 %define gcc_target_arch ia64-suse-linux %define gcc_icecream 1 %define binutils_target ia64 %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-ia64-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc ppc64 %ix86 x86_64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-ppc-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-ppc-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_nof 0 %define build_with_mudflap 0 %define gcc_target_arch ppc-suse-linux %define gcc_icecream 1 %define binutils_target ppc %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-ppc-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc64 %ix86 x86_64 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-ppc64-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-ppc64-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_nof 0 %define build_with_mudflap 0 %define gcc_target_arch ppc64-suse-linux %define gcc_icecream 1 %define binutils_target ppc64 %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-ppc64-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc %ix86 x86_64 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-s390-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-s390-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_nof 0 %define build_with_mudflap 0 %define gcc_target_arch s390-suse-linux %define gcc_icecream 1 %define binutils_target s390 %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-s390-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-s390x-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-s390x-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_nof 0 %define build_with_mudflap 0 %define gcc_target_arch s390x-suse-linux %define gcc_icecream 1 %define binutils_target s390x %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-s390x-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-x86_64-gcc48-icecream-backend.spec ++++++ # # spec file for package cross-x86_64-gcc48-icecream-backend # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_nof 0 %define build_with_mudflap 0 %define gcc_target_arch x86_64-suse-linux %define gcc_icecream 1 %define binutils_target x86_64 %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-x86_64-gcc48-icecream-backend BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif ExclusiveArch: ppc ppc64 %ix86 ia64 %define _binary_payload w.ufdio # COMMON-BEGIN # COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.8.0_20130318 Release: 0 %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.8 # COMMON-END # COMMON-BEGIN BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec Source3: gcc48-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Patch1: gcc-dir-version.patch Patch2: gcc-sles-version.patch Patch3: gcc-noalias-warn.diff Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch # Patches for SAP features Patch130: sap303956-uchar.diff # GCC-TESTSUITE-DELETE-BEGIN # LIBJAVA-DELETE-BEGIN Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # LIBFFI-DELETE-BEGIN # 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} == "powerpc" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64" %define CONFIGURE_TARGET powerpc64-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586" %define CONFIGURE_TARGET i586-suse-linux %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l" %define CONFIGURE_TARGET armv7l-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl" %define CONFIGURE_TARGET armv7hl-suse-linux-gnueabi %endif %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel" %define CONFIGURE_TARGET armv5tel-suse-linux-gnueabi %endif %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 ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} # COMMON-END # COMMON-BEGIN %prep %setup -q -n gcc-%{gcc_version}%{snapshot_date} %patch1 %patch2 %patch3 %patch7 %patch8 %patch23 %patch24 %patch30 %patch51 %patch55 %patch57 %patch60 %patch61 %patch130 # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if test `cat gcc/DEV-PHASE` == "prerelease"; then ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} && 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-build-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 \ %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif %if !%{build_with_mudflap} --disable-libmudflap \ %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif %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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %endif %if 0%{?build_static:1} --disable-shared \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif --disable-nls \ --target=%{CONFIGURE_TARGET} \ %else --program-suffix=%{binsuffix} \ --enable-linux-futex \ %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --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}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif --with-cpu-64=power4 \ --enable-secureplt \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=z196 --with-arch=z10 \ --with-long-double-128 \ --enable-decimal-float \ %endif --build=%{GCCDIST} # COMMON-END # COMMON-END make %{?jobs:-j%jobs} all-gcc TARGET-gcc="cc1 cc1plus gcc-cross xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ gcc48-testresults.spec ++++++ ++++ 710 lines (skipped) gcc48.spec: same change libffi48.spec: same change libgcj48.spec: same change ++++++ README.First-for.SuSE.packagers ++++++ IMPORTANT: Please change gcc.spec.in and then run ./pre_checkin.sh! Do not change gcc.spec directly! Since GCC comes with a testsuite that runs for quite a long time and that test suite also contains some known failures, we should run the testsuite of GCC whenever the compiler is changed to ensure a high quality compiler. The package is now split into multiple parts, gcc$VER, libgcj$VER, gcc$VER-testresults and libffi$VER (plus various spec files for cross and icecream cross compilers). The testsuite is run from gcc$VER-testresults, a dummy package with the testresults, gcc$VER-testresults, is generated from it which contains testing logfiles and summary. Before checking in a new compiler, please do the following steps as QA measure to check that the new compiler does not introduce any new failures: - Run mbuild for all archs for at least the gcc$VER and the gcc$VER-testresults subpackages - When mbuild is finished, call /suse/rguenther/bin/compare-testresults.sh mbuild-directory (for the gcc$VER-testresults build). The output of that script should not show any failures. If it does, please fix them or discuss this with the gcc package maintainers. - Do not remove this file. Thanks, Your GCC packagers. ++++++ Wunprototyped-calls.diff ++++++ Index: gcc/c-family/c.opt =================================================================== --- gcc/c-family/c.opt.orig 2012-11-28 10:36:32.000000000 +0100 +++ gcc/c-family/c.opt 2012-12-11 12:34:00.399116998 +0100 @@ -758,6 +758,10 @@ Wunused-local-typedefs C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused) 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++ Var(cpp_warn_unused_macros) 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-12-11 12:34:00.399116998 +0100 @@ -6,7 +6,7 @@ #define C(x) __attribute__((cleanup(x))) static int f1(void *x U) { return 0; } -static void f2() { } +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) { } @@ -18,7 +18,7 @@ static void f9(int x U) { } /* { dg-mess void test(void) { int o1 C(f1); - int o2 C(f2); + 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/c-typeck.c =================================================================== --- gcc/c/c-typeck.c.orig 2012-11-28 10:36:32.000000000 +0100 +++ gcc/c/c-typeck.c 2012-12-11 12:34:00.400116998 +0100 @@ -2835,6 +2835,19 @@ build_function_call_vec (location_t loc, && !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-11-28 10:36:32.000000000 +0100 +++ gcc/c-family/c-opts.c 2012-12-11 12:34:36.956115737 +0100 @@ -855,6 +855,7 @@ c_common_post_options (const char **pfil warn_main = (c_dialect_cxx () && flag_hosted) ? 1 : 0; else if (warn_main == 2) warn_main = flag_hosted ? 1 : 0; + warn_unprototyped_calls = 1; /* In C, -Wall and -Wc++-compat enable -Wenum-compare; if it has not yet been set, it is disabled by default. In C++, it is enabled ++++++ _constraints ++++++ <constraints> <hardware> <disk> <size unit="G">8</size> </disk> </hardware> </constraints> ++++++ baselibs.conf ++++++ targettype x86 package libgcc_s1 targettype x86 package libstdc++6 libgcj48 requires "libgcj48" libgcj48-devel gcc48-gij requires "libgcj48-<targettype>" +/usr/bin/gij-4.8 -> /usr/bin/gij<extension>-4.8 +/usr/bin/grmiregistry-4.8 -> /usr/bin/grmiregistry<extension>-4.8 ++++++ change_spec ++++++ #!/bin/bash do_icecream=1 do_cross_static=0 do_cross_shared=1 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_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_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' \ p g s/@variant@/-32bit/g p g s/@variant@/-64bit/g p } }' \
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 # disabled: mips, sparc, alpha if test "$do_icecream" = 1 ; then for arch in hppa i386 x86_64 s390 s390x ppc ppc64 ia64 aarch64 armv7hl armv5tel; 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 aarch64 ; 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 osc service localrun format_spec_file exit 0 ++++++ check-build.sh ++++++ #!/bin/bash # Copyright (c) 2003,2005 SUSE Linux Products GmbH, Germany. All rights reserved. # # Authors: Thorsten Kukuk <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 ++++++ cross-icecream.spec.in ++++++ # # spec file for package gcc (Version 4.0.1) # # Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %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@-suse-linux %define gcc_icecream 1 %define binutils_target @cross_arch@ %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-@cross_arch@-gcc@base_ver@-icecream-backend BuildRequires: cross-%{binutils_target}-binutils BuildRequires: gcc-c++ BuildRequires: bison BuildRequires: flex BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif 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 xg++ 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}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/inst%{_prefix}/bin/%{CONFIGURE_TARGET}-g++ \ $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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/share/icecream-envs %changelog -n cross-@cross_arch@-gcc@base_ver@-icecream-backend ++++++ cross.spec.in ++++++ #! /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 %define binutils_target $cross_arch %if %{binutils_target} == "armv7l" || %{binutils_target} == "armv7hl" %define binutils_target arm %endif %if %{binutils_target} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif Name: cross-$cross_arch-gcc$base_ver$name_suffix BuildRequires: cross-%{binutils_target}-binutils BuildRequires: gcc-c++ BuildRequires: bison BuildRequires: flex BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif Requires: cross-%{binutils_target}-binutils %if "$cross_arch" == "spu" %define sysroot /usr/spu %if 0%{?build_static:1} BuildRequires: cross-$cross_arch_cpu-newlib-headers %else BuildRequires: cross-$cross_arch_cpu-newlib %endif Requires: cross-$cross_arch_cpu-newlib %endif %if "$cross_arch" == "aarch64" BuildRequires: cross-$cross_arch-suse-linux-glibc Requires: cross-$cross_arch-suse-linux-glibc %endif EOF sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile | sed -n -e '1,/%description/p' cat << EOF This compiler supports the C language on $cross_arch microprocessors. Also install cross-$cross_arch-binutils and $cross_arch-libc. 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 ++++++ gcc-add-defaultsspec.diff ++++++ Index: gcc/gcc.c =================================================================== --- gcc/gcc.c.orig 2012-11-28 10:36:38.000000000 +0100 +++ gcc/gcc.c 2012-12-11 12:30:30.053124280 +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 **); @@ -1293,6 +1294,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 }, @@ -6382,6 +6384,8 @@ main (int argc, char **argv) if (access (specs_file, R_OK) == 0) read_specs (specs_file, true, false); + do_self_spec ("%:include_noerr(defaults.spec)%(default_spec)"); + /* Process any configure-time defaults specified for the command line options, via OPTION_DEFAULT_SPECS. */ for (i = 0; i < ARRAY_SIZE (option_default_specs); i++) @@ -8271,6 +8275,21 @@ get_random_number (void) return ret ^ getpid(); } +static const char * +include_noerr_spec_function (int argc, const char **argv) +{ + char *file; + + if (argc != 1) + abort (); + + file = find_a_file (&startfile_prefixes, argv[0], R_OK, 0); + if (file) + read_specs (file, FALSE, TRUE); + + return NULL; +} + /* %:compare-debug-dump-opt spec function. Save the last argument, expected to be the last -fdump-final-insns option, or generate a temporary. */ ++++++ gcc-dir-version.patch ++++++ Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in.orig 2012-12-11 11:56:01.000000000 +0100 +++ gcc/Makefile.in 2012-12-11 12:28:43.576127967 +0100 @@ -797,12 +797,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)) @@ -821,6 +823,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@\"" @@ -2085,11 +2088,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) \ @@ -2677,10 +2680,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 @@ -3818,9 +3821,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 $@ $< @@ -4014,7 +4017,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) \ $(TARGET_H) $(TARGET_DEF) $(TREE_H) $(CPP_ID_DATA_H) \ cppbuiltin.h version.h Makefile @@ -4035,8 +4038,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 2012-04-17 12:30:10.000000000 +0200 +++ libjava/Makefile.am 2012-12-11 12:28:43.577127967 +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 2012-12-11 12:19:46.000000000 +0100 +++ libjava/Makefile.in 2012-12-11 12:28:43.582127967 +0100 @@ -12421,7 +12421,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 2012-12-11 12:28:43.582127967 +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.8 verbose "version: $libjava_version" Index: gcc/cppbuiltin.c =================================================================== --- gcc/cppbuiltin.c.orig 2012-11-28 10:36:32.000000000 +0100 +++ gcc/cppbuiltin.c 2012-12-11 12:28:43.583127967 +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; } ++++++ gcc-noalias-warn.diff ++++++ 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) { ++++++ gcc-sles-version.patch ++++++ 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) ++++++ gcc.spec.in ++++++ ++++ 2419 lines (skipped) ++++++ gcc41-ia64-stack-protector.patch ++++++ 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 2012-08-16 13:13:45.000000000 +0200 +++ gcc/config/ia64/linux.h 2012-12-11 12:48:44.759086378 +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 2012-12-11 11:56:03.000000000 +0100 +++ gcc/config/ia64/ia64.c 2012-12-11 12:48:44.763086378 +0100 @@ -2879,6 +2879,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); @@ -2913,9 +2916,9 @@ 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: @@ -2936,6 +2939,7 @@ ia64_initial_elimination_offset (int fro default: gcc_unreachable (); } + offset += FRAME_GROWS_DOWNWARD ? IA64_STACK_ALIGN (size) : 0; break; case ARG_POINTER_REGNUM: Index: gcc/config/ia64/ia64.md =================================================================== --- gcc/config/ia64/ia64.md.orig 2012-10-19 10:44:15.000000000 +0200 +++ gcc/config/ia64/ia64.md 2012-12-11 12:48:44.764086378 +0100 @@ -5205,6 +5205,43 @@ [(set_attr "itanium_class" "unknown") (set_attr "predicable" "no")]) +;; +;; 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 2012-04-17 12:30:33.000000000 +0200 +++ gcc/config/ia64/ia64.h 2012-12-11 12:48:44.764086378 +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. */ ++++++ gcc41-java-slow_pthread_self.patch ++++++ 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 ++++++ gcc41-ppc32-retaddr.patch ++++++ 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 2012-12-11 11:56:04.000000000 +0100 +++ gcc/config/rs6000/rs6000.c 2012-12-11 12:52:22.803078827 +0100 @@ -18325,18 +18325,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 (Pmode, - copy_to_reg - (gen_rtx_MEM (Pmode, - memory_address (Pmode, frame))), - RETURN_ADDRESS_OFFSET))); + if (count == 0) + { + gcc_assert (frame == frame_pointer_rtx); + x = arg_pointer_rtx; + } + else + { + x = memory_address (Pmode, frame); + x = copy_to_reg (gen_rtx_MEM (Pmode, x)); + } + + x = plus_constant (Pmode, x, RETURN_ADDRESS_OFFSET); + return gen_rtx_MEM (Pmode, memory_address (Pmode, x)); } cfun->machine->ra_need_lr = 1; Index: gcc/testsuite/gcc.dg/20051128-1.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ gcc/testsuite/gcc.dg/20051128-1.c 2012-12-11 12:50:58.037081764 +0100 @@ -0,0 +1,41 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -fpic" } */ + +extern void exit (int); +extern void abort (void); + +int b; + +struct A +{ + void *pad[147]; + void *ra, *h; + long o; +}; + +void +__attribute__((noinline)) +foo (struct A *a, void *x) +{ + __builtin_memset (a, 0, sizeof (a)); + if (!b) + exit (0); +} + +void +__attribute__((noinline)) +bar (void) +{ + struct A a; + + __builtin_unwind_init (); + foo (&a, __builtin_return_address (0)); +} + +int +main (void) +{ + bar (); + abort (); + return 0; +} ++++++ gcc43-no-unwind-tables.diff ++++++ Index: libgcc/Makefile.in =================================================================== --- libgcc/Makefile.in.orig 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. ++++++ gcc44-rename-info-files.patch ++++++ ++++ 692 lines (skipped) ++++++ gcc44-textdomain.patch ++++++ #! /bin/sh -e # DP: Set gettext's domain and textdomain to the versioned package name. dir= if [ $# -eq 3 -a "$2" = '-d' ]; then pdir="-d $3" dir="$3/" elif [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0 ;; -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 ;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 esac exit 0 Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in.orig 2012-12-11 12:53:28.687076548 +0100 +++ gcc/Makefile.in 2012-12-11 12:53:28.872076540 +0100 @@ -5283,8 +5283,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.8.mo; \ + $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.8.mo; \ done # Rule for regenerating the message template (gcc.pot). Index: gcc/intl.c =================================================================== --- gcc/intl.c.orig 2012-08-20 15:49:12.000000000 +0200 +++ gcc/intl.c 2012-12-11 12:53:28.873076541 +0100 @@ -56,8 +56,8 @@ gcc_init_libintl (void) setlocale (LC_ALL, ""); #endif - (void) bindtextdomain ("gcc", LOCALEDIR); - (void) textdomain ("gcc"); + (void) bindtextdomain ("gcc-4.8", LOCALEDIR); + (void) textdomain ("gcc-4.8"); /* Opening quotation mark. */ open_quote = _("`"); Index: libcpp/Makefile.in =================================================================== --- libcpp/Makefile.in.orig 2012-12-11 12:19:46.000000000 +0100 +++ libcpp/Makefile.in 2012-12-11 12:53:28.873076541 +0100 @@ -49,6 +49,7 @@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ PACKAGE = @PACKAGE@ +PACKAGE_SUFFIX = -4.8 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. COMPILER = $(CXX) @@ -163,8 +166,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 2012-01-04 13:11:36.000000000 +0100 +++ libcpp/system.h 2012-12-11 12:53:28.873076541 +0100 @@ -281,7 +281,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 2012-11-28 10:37:05.000000000 +0100 +++ libcpp/init.c 2012-12-11 12:53:28.873076541 +0100 @@ -146,7 +146,7 @@ init_library (void) init_trigraph_map (); #ifdef ENABLE_NLS - (void) bindtextdomain (PACKAGE, LOCALEDIR); + (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR); #endif } } ++++++ gcc48-rpmlintrc ++++++ # This line is mandatory to access the configuration functions from Config import * addFilter ("gcc48.*devel-dependency glibc-devel") addFilter ("gcc48-c.*devel-dependency libstdc") addFilter ("shlib-policy-name-error") ++++++ libffi48-rpmlintrc ++++++ # This line is mandatory to access the configuration functions from Config import * addFilter ("shlib-policy-name-error") ++++++ libgcj48-rpmlintrc ++++++ # This line is mandatory to access the configuration functions from Config import * addFilter ("shlib-policy-name-error") ++++++ libjava-no-multilib.diff ++++++ 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. ++++++ pre_checkin.sh ++++++ #!/bin/bash # This script is called automatically during autobuild checkin. case $0 in \./*) here=$PWD ;; */*) here=${0%/*} ;; *) here=$PWD ;; esac case ${here##*/} in gcc-*) suffix=${here##*/} set ${suffix#*-}- ;; gcc[0-9]*) suffix=${here##*/} set ${suffix#gcc} ;; esac . ${here}/change_spec ++++++ sap303956-uchar.diff ++++++ 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) ++++++ tls-no-direct.diff ++++++ Index: gcc/config/i386/gnu-user-common.h =================================================================== --- gcc/config/i386/gnu-user-common.h.orig 2012-12-11 12:44:53.918094370 +0100 +++ gcc/config/i386/gnu-user-common.h 2012-12-11 12:44:55.467094317 +0100 @@ -26,8 +26,12 @@ along with GCC; see the file COPYING3. #define DEFAULT_PCC_STRUCT_RETURN 1 /* We arrange for the whole %fs segment to map the tls area. */ +/* This slows down Xen, so take a very small general performance hit + for not accessing the %fs segment with negative offsets by making + GCC not emit direct accesses to %fs at all. #undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT #define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS + */ #define TARGET_OS_CPP_BUILTINS() \ do \ -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de