Hello community, here is the log from the commit of package gcc49 for openSUSE:Factory checked in at 2014-04-22 11:54:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcc49 (Old) and /work/SRC/openSUSE:Factory/.gcc49.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "gcc49" Changes: -------- New Changes file: --- /dev/null 2014-04-17 09:46:44.096034755 +0200 +++ /work/SRC/openSUSE:Factory/.gcc49.new/cross-aarch64-gcc49.changes 2014-04-22 11:54:38.000000000 +0200 @@ -0,0 +1,83 @@ +------------------------------------------------------------------- +Mon Apr 14 08:29:37 UTC 2014 - rguenther@suse.com + +- Update to gcc 4.9.0 RC1. + +------------------------------------------------------------------- +Mon Apr 7 09:14:13 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r209179). + * obsoletes gcc49-pr59626.patch +- tls-no-direct.diff, only affect %ix86. +- Drop old compatibility provide and conflict of/with libgcc%{libgcc_s} + +------------------------------------------------------------------- +Mon Mar 31 10:17:53 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r208978). +- Enable cross compilers (and icecream backends), compared to GCC 4.8 + packages drop hppa and ia64 from the list of targets. +- gcc49-pr60720.patch, fix LTO ICEs with mismatched decl references + in global initializers. + +------------------------------------------------------------------- +Tue Mar 25 08:49:26 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r208807). +- Use power7 code generation only for ppc64le. +- gcc49-pr59626.patch, fix indirectly calling _FORTIFY_SOURCE wrappers + with LTO. + +------------------------------------------------------------------- +Fri Mar 21 09:35:08 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r208745). + +------------------------------------------------------------------- +Thu Mar 13 15:18:38 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r208538). +- Change -Wunprototyped-calls from being enabled by default to be + enabled with -Wall to solve GCC testsuite fallout. + +------------------------------------------------------------------- +Fri Feb 28 13:11:38 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r208221). +- Fix typo in libgcj_bc suffix computation. + +------------------------------------------------------------------- +Wed Feb 26 09:35:45 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r208170). + * includes now obsolete gcc49-libjava-install.patch +- Disable building libvtv, it's not useful unless we instrument + libstdc++. + +------------------------------------------------------------------- +Wed Feb 19 13:02:03 UTC 2014 - rguenther@suse.com + +- New package, inherits from gcc48 + * gcc-dir-version.patch, drop patchlevel from install directory names + * gcc-sles-version.patch, do not print (prerelease) with --version + but drop patchlevel by one + * gcc-add-defaultsspec.diff, add the ability to provide a specs file + that is read by default + * Wunprototyped-calls.diff, new warning to warn about calls to functions + without seeing a real prototype earlier + * libjava-no-multilib.diff, do not build multilibs for libjava even on + multilib systems (we use baselibs for it) + * tls-no-direct.diff, avoid direct %fs references on x86 to not slow down + Xen + * gcc43-no-unwind-tables.diff, do not produce unwind tables for CRT files + * gcc41-ia64-stack-protector.patch, stack protector support for IA64 + * gcc41-java-slow_pthread_self.patch, force us to assume pthread_self + is fast + * gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr for ppc + * gcc44-textdomain.patch, make translation files version specific and + adjust textdomain to find them + * gcc44-rename-info-files.patch, fix cross-references in info files when + renaming them to be version specific +- Adds the following patches + * gcc49-libjava-install.patch, fix PR60261 + New Changes file: cross-armv6hl-gcc49.changes: same change New Changes file: cross-armv7hl-gcc49.changes: same change New Changes file: cross-i386-gcc49.changes: same change New Changes file: cross-ppc-gcc49.changes: same change New Changes file: cross-ppc64-gcc49.changes: same change New Changes file: cross-ppc64le-gcc49.changes: same change New Changes file: cross-s390-gcc49.changes: same change New Changes file: cross-s390x-gcc49.changes: same change New Changes file: cross-x86_64-gcc49.changes: same change --- /work/SRC/openSUSE:Factory/gcc49/gcc49-testresults.changes 2014-03-22 09:07:07.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.gcc49.new/gcc49-testresults.changes 2014-04-22 11:54:41.000000000 +0200 @@ -1,0 +2,30 @@ +Mon Apr 14 08:29:37 UTC 2014 - rguenther@suse.com + +- Update to gcc 4.9.0 RC1. + +------------------------------------------------------------------- +Mon Apr 7 09:14:13 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r209179). + * obsoletes gcc49-pr59626.patch +- tls-no-direct.diff, only affect %ix86. +- Drop old compatibility provide and conflict of/with libgcc%{libgcc_s} + +------------------------------------------------------------------- +Mon Mar 31 10:17:53 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r208978). +- Enable cross compilers (and icecream backends), compared to GCC 4.8 + packages drop hppa and ia64 from the list of targets. +- gcc49-pr60720.patch, fix LTO ICEs with mismatched decl references + in global initializers. + +------------------------------------------------------------------- +Tue Mar 25 08:49:26 UTC 2014 - rguenther@suse.com + +- Update to SVN trunk head (r208807). +- Use power7 code generation only for ppc64le. +- gcc49-pr59626.patch, fix indirectly calling _FORTIFY_SOURCE wrappers + with LTO. + +------------------------------------------------------------------- gcc49.changes: same change libffi49.changes: same change libgcj49.changes: same change Old: ---- gcc-4.9.0-r208745.tar.bz2 New: ---- cross-aarch64-gcc49.changes cross-aarch64-gcc49.spec cross-armv6hl-gcc49.changes cross-armv6hl-gcc49.spec cross-armv7hl-gcc49.changes cross-armv7hl-gcc49.spec cross-i386-gcc49.changes cross-i386-gcc49.spec cross-ppc-gcc49.changes cross-ppc-gcc49.spec cross-ppc64-gcc49.changes cross-ppc64-gcc49.spec cross-ppc64le-gcc49.changes cross-ppc64le-gcc49.spec cross-s390-gcc49.changes cross-s390-gcc49.spec cross-s390x-gcc49.changes cross-s390x-gcc49.spec cross-x86_64-gcc49.changes cross-x86_64-gcc49.spec gcc-4.9.0-r209354.tar.bz2 gcc49-pr60720.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-aarch64-gcc49.spec ++++++ # # spec file for package cross-aarch64-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-aarch64-gcc49 %define cross_arch aarch64 %define gcc_target_arch aarch64-suse-linux %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-armv6hl-gcc49.spec ++++++ # # spec file for package cross-armv6hl-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-armv6hl-gcc49 %define cross_arch armv6hl %define gcc_target_arch armv6hl-suse-linux-gnueabi %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-armv7hl-gcc49.spec ++++++ # # spec file for package cross-armv7hl-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-armv7hl-gcc49 %define cross_arch armv7hl %define gcc_target_arch armv7hl-suse-linux-gnueabi %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-i386-gcc49.spec ++++++ # # spec file for package cross-i386-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-i386-gcc49 %define cross_arch i386 %define gcc_target_arch i586-suse-linux %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-ppc-gcc49.spec ++++++ # # spec file for package cross-ppc-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-ppc-gcc49 %define cross_arch ppc %define gcc_target_arch powerpc64-suse-linux %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: x86_64 ia64 s390x aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-ppc64-gcc49.spec ++++++ # # spec file for package cross-ppc64-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-ppc64-gcc49 %define cross_arch ppc64 %define gcc_target_arch powerpc64-suse-linux %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: x86_64 ia64 s390x aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-ppc64le-gcc49.spec ++++++ # # spec file for package cross-ppc64le-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-ppc64le-gcc49 %define cross_arch ppc64le %define gcc_target_arch powerpc64le-suse-linux %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-s390-gcc49.spec ++++++ # # spec file for package cross-s390-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-s390-gcc49 %define cross_arch s390 %define gcc_target_arch s390-suse-linux %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-s390x-gcc49.spec ++++++ # # spec file for package cross-s390x-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-s390x-gcc49 %define cross_arch s390x %define gcc_target_arch s390x-suse-linux %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: ppc64 x86_64 ia64 aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ cross-x86_64-gcc49.spec ++++++ # # spec file for package cross-x86_64-gcc49 # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkgname cross-x86_64-gcc49 %define cross_arch x86_64 %define gcc_target_arch x86_64-suse-linux %define gcc_icecream 1 # # spec file for package gcc (Version 4.0.1) # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # %define build_cp 1 %define build_ada 0 %define build_libjava 0 %define build_java 0 %define build_fortran 0 %define build_objc 0 %define build_objcp 0 %define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm %endif %if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl" %define binutils_target arm %endif %if %{cross_arch} == "armv5tel" %define binutils_target arm %endif %define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %if %{binutils_target} == "arm" %define canonical_target_abi -gnueabi %endif %if 0%{?gcc_icecream:1} %define build_sysroot / %endif Name: %{pkgname} BuildRequires: bison BuildRequires: cross-%{binutils_target}-binutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl %if %{suse_version} > 1220 BuildRequires: makeinfo %else BuildRequires: texinfo %endif BuildRequires: zlib-devel %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm BuildRequires: cloog-isl-devel BuildRequires: isl-devel %endif %ifarch ia64 BuildRequires: libunwind-devel %endif %if 0%{!?gcc_icecream:1} BuildRequires: cross-%cross_arch-glibc-devel %endif ExclusiveArch: ppc64 ia64 s390x aarch64 %define _binary_payload w.ufdio %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) %define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -4.9 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi49-rpmlintrc Source3: gcc49-rpmlintrc Source4: ecj.jar Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj49-rpmlintrc #testpatch begin Patch1: gcc-dir-version.patch Patch7: gcc-add-defaultsspec.diff Patch8: Wunprototyped-calls.diff Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch Patch57: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch #testpatch end Summary: The GNU C Compiler and Support Files License: GPL-3.0+ Group: Development/Languages/C and C++ %description Core package for the GNU Compiler Collection, including the C language frontend. Language frontends other than C are split to different sub-packages, namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and gcc-obj-c++. # Define the canonical target and host architecture # %gcc_target_arch is supposed to be the full target triple # %cross_arch is supposed to be the rpm target variant arch # %TARGET_ARCH will be the canonicalized target CPU part # %HOST_ARCH will be the canonicalized host CPU part %if 0%{?gcc_target_arch:1} %define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %else %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %endif %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") %ifarch ppc %define GCCDIST powerpc64-suse-linux %else %ifarch %sparc %define GCCDIST sparc64-suse-linux %else %ifarch %arm %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi %else %define GCCDIST %{HOST_ARCH}-suse-linux %endif %endif %endif %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %prep %setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision} #test patching start %patch1 %patch7 %patch8 %patch23 %patch24 %patch30 %patch33 %patch51 %patch55 %patch57 %patch60 %patch61 #test patching end # We are configuring ppc as ppc64 but with switched multilibs. Adjust # the libstdc++ abi testsuite baseline files accordingly %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/ mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/ fi %endif %build # Avoid rebuilding of generated files contrib/gcc_update --touch # Avoid fucking up testsuite results with Java and indirect dispatch export SUSE_ASNEEDED=0 # Split version file into version used for directories (X.Y) and # version to report with --version (X.Y.Z). # See also gcc-dir-version.patch. # Also decrement the patchlevel version by one if possible and remove # the 'prerelease' tagging in this case if test `cat gcc/DEV-PHASE` == "prerelease"; then if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then : > gcc/DEV-PHASE fi ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER else mv gcc/BASE-VER gcc/FULL-VER fi cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER rm -rf obj-%{GCCDIST} mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops # the build process, so remove it for now. Also remove all other # -march and -mtune flags. They are superseeded by proper # default compiler settings now. RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'` %endif %ifarch s390 s390x RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'` %endif %if 0%{?gcc_target_arch:1} # Kill all -march/tune/cpu because that screws building the target libs RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'` %endif # Replace 2 spaces by one finally RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'` languages=c %if %{build_cp} languages=$languages,c++ %endif %if %{build_objc} languages=$languages,objc %endif %if %{build_fortran} languages=$languages,fortran %endif %if %{build_objcp} languages=$languages,obj-c++ %endif %if %{build_java} languages=$languages,java %endif %if %{build_ada} languages=$languages,ada %endif %if %{build_go} languages=$languages,go %endif J=%{?jobs:%jobs} if test -z "$J"; then J=$(getconf _NPROCESSORS_CONF) JL=$(($J * 2)) else test 1 -gt "$J" && J=1 JL=$(($(getconf _NPROCESSORS_CONF)*2)) fi if test "$J" == "0"; then J=1 fi if test "$JL" == "0"; then JL=1 fi PARALLEL="-j$J -l$JL" # we don't want some miscompiles in the testsuite, or some fault in # the compiler to kill the machine. Hence we limit the amount of memory # by the physical RAM plus half of swap #MEM=$(free -m | awk '/^Mem:/ {print $2}') #SWAP=$(free -m | awk '/^Swap:/ {print $2}') #ulimit -v $(((MEM + SWAP/2)*1024)) # In general we want to ship release checking enabled compilers # and run BETA with checking enabled. ENABLE_CHECKING="--enable-checking=yes" #ENABLE_CHECKING="--enable-checking=release" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 %if %{build_ada} # Using the host gnatmake like # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}" # GNATMAKE="gnatmake%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif #%if 0%{?gcc_target_arch:1} #%else # --enable-threads=posix \ #%endif # --enable-shared \ %if "%{TARGET_ARCH}" == "armv7hl" # temporary workaround for a miscompilation of hash functions in java code GCJ_EXTRA_FLAGS="-marm" %endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \ ../configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libdir} \ --enable-languages=$languages \ $ENABLE_CHECKING \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ --enable-ssp \ --disable-libssp \ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif --disable-plugin \ --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} --disable-libgcj \ %else --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \ --with-ecj-jar=%{libsubdir}/ecj.jar \ --disable-java-awt \ %if !%{biarch_libjava} --disable-libjava-multilib \ %endif %endif --with-slibdir=/%{_lib} \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-version-specific-runtime-libs \ %if 0%{suse_version} > 1100 --enable-linker-build-id \ %endif --enable-linux-futex \ --program-suffix=%{binsuffix} \ %if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else --without-system-libunwind \ %endif %endif %if 0%{?gcc_target_arch:1} --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} --with-sysroot=%sysroot \ %else --with-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %if 0%{?build_sysroot:1} --with-build-sysroot=%{build_sysroot} \ %else %if 0%{?sysroot:1} --with-build-sysroot=%{sysroot} \ %else --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \ %endif %endif %if 0%{?canonical_target:1} --with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \ %endif %if "%{TARGET_ARCH}" == "spu" --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \ --with-newlib \ %endif %endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ --with-mode=arm \ --with-abi=aapcs-linux \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv6hl" --with-arch=armv6zk \ --with-tune=arm1176jzf-s \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfp \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "armv7hl" --with-arch=armv7-a \ --with-tune=cortex-a15 \ --with-float=hard \ --with-abi=aapcs-linux \ --with-fpu=vfpv3-d16 \ --disable-sjlj-exceptions \ %endif %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le" %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif %if "%{TARGET_ARCH}" == "powerpc64le" --with-cpu=power7 \ %else --with-cpu-64=power4 \ %endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" --disable-multilib \ %endif %endif %if "%{TARGET_ARCH}" == "sparc64" --with-cpu=ultrasparc \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "sparc" --with-cpu=v8 \ --with-long-double-128 \ %endif %if "%{TARGET_ARCH}" == "i586" --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "x86_64" --enable-multilib \ --with-arch-32=i586 \ --with-tune=generic \ %endif %if "%{TARGET_ARCH}" == "s390" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "s390x" --with-tune=zEC12 --with-arch=z196 \ --with-long-double-128 \ --enable-decimal-float \ %endif %if "%{TARGET_ARCH}" == "m68k" --disable-multilib \ %endif --build=%{GCCDIST} \ --host=%{GCCDIST} %if 0%{!?gcc_icecream:1} make %{?jobs:-j%jobs} %else make %{?jobs:-j%jobs} all-host %endif %package -n cross-%cross_arch-gcc49-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc49-icecream-backend This package contains the icecream environment for the GNU C Compiler %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la # common fixup rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # remove docs rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} # install and fixup target parts # ??? don't do this - debugedit is not prepared for this and crashes # so expect the sysroot to be populated from natively built binaries #%if 0%{?sysroot:1} #make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target #%else #make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target #%endif # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/$back done if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \ $RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so fi # Make sure to also pull in all shared library requirements for the # binaries we put into the environment which is operated by chrooting # into it and execing the compiler libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \ ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\ done | sort -u ` for lib in $libs; do # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'` test -f "$baselib" && lib=$baselib install -s -D $lib $RPM_BUILD_ROOT/env$lib done cd $RPM_BUILD_ROOT/env tar cvzf ../%{name}_%{_arch}.tar.gz * cd .. mkdir -p usr/share/icecream-envs mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} %files -n cross-%cross_arch-gcc49-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs %changelog ++++++ gcc49-testresults.spec ++++++ --- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200 +++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200 @@ -238,7 +238,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ -Version: 4.9.0+r208745 +Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) @@ -296,6 +296,7 @@ Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff +Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -413,6 +414,7 @@ %patch23 %patch24 %patch30 +%patch33 %patch51 %patch55 %patch57 @@ -593,8 +595,8 @@ --enable-linker-build-id \ %endif --enable-linux-futex \ -%if 0%{!?gcc_target_arch:1} --program-suffix=%{binsuffix} \ +%if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else @@ -602,6 +604,7 @@ %endif %endif %if 0%{?gcc_target_arch:1} + --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} @@ -653,9 +656,11 @@ %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif - --with-cpu-32=power7 \ - --with-cpu-64=power7 \ - --with-tune=power7 \ +%if "%{TARGET_ARCH}" == "powerpc64le" + --with-cpu=power7 \ +%else + --with-cpu-64=power4 \ +%endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" ++++++ gcc49.spec ++++++ --- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200 +++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200 @@ -220,7 +220,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ -Version: 4.9.0+r208745 +Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) @@ -278,6 +278,7 @@ Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff +Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -464,9 +465,6 @@ # Only one package may provide this - allows multiple gcc versions # to co-exist without an overly large list of provides/obsoletes Conflicts: %selfconflict libgcc_s%{libgcc_s} -# Old libgcc packages provided a wrong shlib policy compatible name -Provides: libgcc%{libgcc_s} = %{version}-%{release} -Conflicts: %selfconflict libgcc%{libgcc_s} %description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} Libgcc is needed for dynamically linked C programs. @@ -482,9 +480,6 @@ # Only one package may provide this - allows multiple gcc versions # to co-exist without an overly large list of provides/obsoletes Conflicts: %selfconflict libgcc_s%{libgcc_s}-32bit -# Old libgcc packages provided a wrong shlib policy compatible name -Provides: libgcc%{libgcc_s}-32bit = %{version}-%{release} -Conflicts: %selfconflict libgcc%{libgcc_s}-32bit %description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit Libgcc is needed for dynamically linked C programs. @@ -500,9 +495,6 @@ # Only one package may provide this - allows multiple gcc versions # to co-exist without an overly large list of provides/obsoletes Conflicts: %selfconflict libgcc_s%{libgcc_s}-64bit -# Old libgcc packages provided a wrong shlib policy compatible name -Provides: libgcc%{libgcc_s}-64bit = %{version}-%{release} -Conflicts: %selfconflict libgcc%{libgcc_s}-64bit %description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit Libgcc is needed for dynamically linked C programs. @@ -1733,6 +1725,7 @@ %patch23 %patch24 %patch30 +%patch33 %patch51 %patch55 %patch57 @@ -1913,8 +1906,8 @@ --enable-linker-build-id \ %endif --enable-linux-futex \ -%if 0%{!?gcc_target_arch:1} --program-suffix=%{binsuffix} \ +%if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else @@ -1922,6 +1915,7 @@ %endif %endif %if 0%{?gcc_target_arch:1} + --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} @@ -1973,9 +1967,11 @@ %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif - --with-cpu-32=power7 \ - --with-cpu-64=power7 \ - --with-tune=power7 \ +%if "%{TARGET_ARCH}" == "powerpc64le" + --with-cpu=power7 \ +%else + --with-cpu-64=power4 \ +%endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" @@ -2645,6 +2641,7 @@ %ifarch %cilkrts_arch %versmainlib libcilkrts.so %versmainlib libcilkrts.a +%versmainlib libcilkrts.spec %endif %ifarch %lsan_arch %versmainlib liblsan.so @@ -2695,6 +2692,7 @@ %ifarch %cilkrts_arch %versbiarchlib libcilkrts.a %versbiarchlib libcilkrts.so +%versbiarchlib libcilkrts.spec %endif %if 0 %ifarch %tsan_arch ++++++ libffi49.spec ++++++ --- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200 +++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200 @@ -237,7 +237,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ -Version: 4.9.0+r208745 +Version: 4.9.0+r209354 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) @@ -295,6 +295,7 @@ Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff +Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -575,6 +576,7 @@ %patch23 %patch24 %patch30 +%patch33 %patch51 %patch55 %patch57 @@ -755,8 +757,8 @@ --enable-linker-build-id \ %endif --enable-linux-futex \ -%if 0%{!?gcc_target_arch:1} --program-suffix=%{binsuffix} \ +%if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else @@ -764,6 +766,7 @@ %endif %endif %if 0%{?gcc_target_arch:1} + --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} @@ -815,9 +818,11 @@ %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif - --with-cpu-32=power7 \ - --with-cpu-64=power7 \ - --with-tune=power7 \ +%if "%{TARGET_ARCH}" == "powerpc64le" + --with-cpu=power7 \ +%else + --with-cpu-64=power4 \ +%endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" libgcj49.spec: same change ++++++ change_spec ++++++ --- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200 +++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200 @@ -1,6 +1,6 @@ #!/bin/bash -do_icecream=0 +do_icecream=1 do_cross_static=0 do_cross_shared=1 do_optional_compiler_languages=0 @@ -130,18 +130,16 @@ # # For now keep the old way of doing things if test "$do_icecream" = 1 ; then -add_cross cross-aarch64-gcc$base_ver-icecream-backend aarch64 aarch64-suse-linux %define gcc_icecream 1 -add_cross cross-armv6hl-gcc$base_ver-icecream-backend armv6hl armv6hl-suse-linux-gnueabi %define gcc_icecream 1 -add_cross cross-armv7hl-gcc$base_ver-icecream-backend armv7hl armv7hl-suse-linux-gnueabi %define gcc_icecream 1 -add_cross cross-hppa-gcc$base_ver-icecream-backend hppa hppa-suse-linux %define gcc_icecream 1 -add_cross cross-i386-gcc$base_ver-icecream-backend i386 i586-suse-linux %define gcc_icecream 1 -add_cross cross-x86_64-gcc$base_ver-icecream-backend x86_64 x86_64-suse-linux %define gcc_icecream 1 -add_cross cross-s390-gcc$base_ver-icecream-backend s390 s390-suse-linux %define gcc_icecream 1 -add_cross cross-s390x-gcc$base_ver-icecream-backend s390x s390x-suse-linux %define gcc_icecream 1 -add_cross cross-ppc-gcc$base_ver-icecream-backend ppc powerpc64-suse-linux %define gcc_icecream 1 -add_cross cross-ppc64-gcc$base_ver-icecream-backend ppc64 powerpc64-suse-linux %define gcc_icecream 1 -add_cross cross-ppc64le-gcc$base_ver-icecream-backend ppc64le powerpc64le-suse-linux %define gcc_icecream 1 -add_cross cross-ia64-gcc$base_ver-icecream-backend ia64 ia64-suse-linux %define gcc_icecream 1 +add_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux %define gcc_icecream 1 +add_cross cross-armv6hl-gcc$base_ver armv6hl armv6hl-suse-linux-gnueabi %define gcc_icecream 1 +add_cross cross-armv7hl-gcc$base_ver armv7hl armv7hl-suse-linux-gnueabi %define gcc_icecream 1 +add_cross cross-i386-gcc$base_ver i386 i586-suse-linux %define gcc_icecream 1 +add_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux %define gcc_icecream 1 +add_cross cross-s390-gcc$base_ver s390 s390-suse-linux %define gcc_icecream 1 +add_cross cross-s390x-gcc$base_ver s390x s390x-suse-linux %define gcc_icecream 1 +add_cross cross-ppc-gcc$base_ver ppc powerpc64-suse-linux %define gcc_icecream 1 +add_cross cross-ppc64-gcc$base_ver ppc64 powerpc64-suse-linux %define gcc_icecream 1 +add_cross cross-ppc64le-gcc$base_ver ppc64le powerpc64le-suse-linux %define gcc_icecream 1 fi for f in *.spec; do ++++++ cross.spec.in ++++++ --- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200 +++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200 @@ -16,8 +16,7 @@ %define build_fortran 0 %define build_objc 0 %define build_objcp 0 -%define build_nof 0 -%define build_with_mudflap 0 +%define build_go 0 %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" @@ -78,14 +77,12 @@ %endif -%if 0%{!?gcc_icecream:1} %package -n cross-%cross_arch-gcc@base_ver@-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ %description -n cross-%cross_arch-gcc@base_ver@-icecream-backend This package contains the icecream environment for the GNU C Compiler -%endif %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} @@ -95,9 +92,6 @@ # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host -# binsuffix is not applied consistently for cross builds, get rid of -# the remains -rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} # with the present setup fixincludes are for the build includes which # is wrong - get rid of them rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed @@ -124,9 +118,9 @@ # named funnily, not even on ppc, so there we need the original target install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \ $RPM_BUILD_ROOT/env/usr/bin/as -install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \ +install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/g++ -install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \ +install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \ $RPM_BUILD_ROOT/env/usr/bin/gcc for back in cc1 cc1plus; do @@ -161,29 +155,15 @@ rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils rm -r env -%if 0%{?gcc_icecream:1} -rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin -rm -rf $RPM_BUILD_ROOT/%{_libdir} -%endif - - -%if 0%{!?gcc_icecream:1} %files %defattr(-,root,root) %{_prefix}/bin %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} -%else -%files -%defattr(-,root,root) -/usr/share/icecream-envs -%endif -%if 0%{!?gcc_icecream:1} %files -n cross-%cross_arch-gcc@base_ver@-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs -%endif %changelog -n cross-%{pkgname}-gcc@base_ver@ ++++++ gcc-4.9.0-r208745.tar.bz2 -> gcc-4.9.0-r209354.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/gcc49/gcc-4.9.0-r208745.tar.bz2 /work/SRC/openSUSE:Factory/.gcc49.new/gcc-4.9.0-r209354.tar.bz2 differ: char 11, line 1 ++++++ gcc.spec.in ++++++ --- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200 +++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200 @@ -225,7 +225,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: http://gcc.gnu.org/ -Version: 4.9.0+r208745 +Version: 4.9.0+r209354 Release: 1 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2) @@ -285,6 +285,7 @@ Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch30: gcc43-no-unwind-tables.diff +Patch33: gcc49-pr60720.patch # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -451,9 +452,6 @@ # Only one package may provide this - allows multiple gcc versions # to co-exist without an overly large list of provides/obsoletes Conflicts: %selfconflict libgcc_s%{libgcc_s}@variant@ -# Old libgcc packages provided a wrong shlib policy compatible name -Provides: libgcc%{libgcc_s}@variant@ = %{version}-%{release} -Conflicts: %selfconflict libgcc%{libgcc_s}@variant@ %description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}@variant@ Libgcc is needed for dynamically linked C programs. @@ -1105,6 +1103,7 @@ %patch23 %patch24 %patch30 +%patch33 %patch51 %patch55 %patch57 @@ -1285,8 +1284,8 @@ --enable-linker-build-id \ %endif --enable-linux-futex \ -%if 0%{!?gcc_target_arch:1} --program-suffix=%{binsuffix} \ +%if 0%{!?gcc_target_arch:1} %ifarch ia64 --with-system-libunwind \ %else @@ -1294,6 +1293,7 @@ %endif %endif %if 0%{?gcc_target_arch:1} + --program-prefix=%{gcc_target_arch}- \ --target=%{gcc_target_arch} \ --disable-nls \ %if 0%{?sysroot:1} @@ -1345,9 +1345,11 @@ %if "%{TARGET_ARCH}" == "powerpc" --with-cpu=default32 \ %endif - --with-cpu-32=power7 \ - --with-cpu-64=power7 \ - --with-tune=power7 \ +%if "%{TARGET_ARCH}" == "powerpc64le" + --with-cpu=power7 \ +%else + --with-cpu-64=power4 \ +%endif --enable-secureplt \ --with-long-double-128 \ %if "%{TARGET_ARCH}" == "powerpc64le" @@ -2034,6 +2036,7 @@ %ifarch %cilkrts_arch %versmainlib libcilkrts.so %versmainlib libcilkrts.a +%versmainlib libcilkrts.spec %endif %ifarch %lsan_arch %versmainlib liblsan.so @@ -2084,6 +2087,7 @@ %ifarch %cilkrts_arch %versbiarchlib libcilkrts.a %versbiarchlib libcilkrts.so +%versbiarchlib libcilkrts.spec %endif %if 0 %ifarch %tsan_arch ++++++ gcc49-pr60720.patch ++++++ 2014-04-01 Richard Biener <rguenther@suse.de> PR lto/60720 * lto-streamer-out.c (wrap_refs): New function. (lto_output): Wrap symbol references in global initializes in type-preserving MEM_REFs. * gcc.dg/lto/pr60720_0.c: New testcase. * gcc.dg/lto/pr60720_1.c: Likewise. Index: gcc/lto-streamer-out.c =================================================================== *** gcc/lto-streamer-out.c (revision 208955) --- gcc/lto-streamer-out.c (working copy) *************** copy_function (struct cgraph_node *node) *** 2024,2029 **** --- 2024,2052 ---- lto_end_section (); } + /* Wrap symbol references in *TP inside a type-preserving MEM_REF. */ + + static tree + wrap_refs (tree *tp, int *ws, void *) + { + tree t = *tp; + if (handled_component_p (t) + && TREE_CODE (TREE_OPERAND (t, 0)) == VAR_DECL) + { + tree decl = TREE_OPERAND (t, 0); + tree ptrtype = build_pointer_type (TREE_TYPE (decl)); + TREE_OPERAND (t, 0) = build2 (MEM_REF, TREE_TYPE (decl), + build1 (ADDR_EXPR, ptrtype, decl), + build_int_cst (ptrtype, 0)); + TREE_THIS_VOLATILE (TREE_OPERAND (t, 0)) = TREE_THIS_VOLATILE (decl); + *ws = 0; + } + else if (TREE_CODE (t) == CONSTRUCTOR) + ; + else if (!EXPR_P (t)) + *ws = 0; + return NULL_TREE; + } /* Main entry point from the pass manager. */ *************** lto_output (void) *** 2045,2068 **** for (i = 0; i < n_nodes; i++) { symtab_node *snode = lto_symtab_encoder_deref (encoder, i); ! cgraph_node *node = dyn_cast <cgraph_node> (snode); ! if (node ! && lto_symtab_encoder_encode_body_p (encoder, node) ! && !node->alias) { #ifdef ENABLE_CHECKING ! gcc_assert (!bitmap_bit_p (output, DECL_UID (node->decl))); ! bitmap_set_bit (output, DECL_UID (node->decl)); #endif ! decl_state = lto_new_out_decl_state (); ! lto_push_out_decl_state (decl_state); ! if (gimple_has_body_p (node->decl) || !flag_wpa) ! output_function (node); ! else ! copy_function (node); ! gcc_assert (lto_get_out_decl_state () == decl_state); ! lto_pop_out_decl_state (); ! lto_record_function_out_decl_state (node->decl, decl_state); } } --- 2068,2100 ---- for (i = 0; i < n_nodes; i++) { symtab_node *snode = lto_symtab_encoder_deref (encoder, i); ! if (cgraph_node *node = dyn_cast <cgraph_node> (snode)) { + if (lto_symtab_encoder_encode_body_p (encoder, node) + && !node->alias) + { #ifdef ENABLE_CHECKING ! gcc_assert (!bitmap_bit_p (output, DECL_UID (node->decl))); ! bitmap_set_bit (output, DECL_UID (node->decl)); #endif ! decl_state = lto_new_out_decl_state (); ! lto_push_out_decl_state (decl_state); ! if (gimple_has_body_p (node->decl) || !flag_wpa) ! output_function (node); ! else ! copy_function (node); ! gcc_assert (lto_get_out_decl_state () == decl_state); ! lto_pop_out_decl_state (); ! lto_record_function_out_decl_state (node->decl, decl_state); ! } ! } ! else if (varpool_node *node = dyn_cast <varpool_node> (snode)) ! { ! /* Wrap symbol references inside the ctor in a type ! preserving MEM_REF. */ ! tree ctor = DECL_INITIAL (node->decl); ! if (ctor && !in_lto_p) ! walk_tree (&ctor, wrap_refs, NULL, NULL); } } Index: gcc/testsuite/gcc.dg/lto/pr60720_0.c =================================================================== *** gcc/testsuite/gcc.dg/lto/pr60720_0.c (revision 0) --- gcc/testsuite/gcc.dg/lto/pr60720_0.c (working copy) *************** *** 0 **** --- 1,15 ---- + /* { dg-lto-do run } */ + /* { dg-extra-ld-options { -w } } */ + + /* ??? lto.exp does not allow to scan for + :1:12: warning: type of 'x' does not match original declaration + extern int x[]; + ^ + :1:5: note: previously declared here + int x; + ^ */ + + extern int x[]; + int *foo[] = { &x[0] }; + + int main() { return *foo[0]; } Index: gcc/testsuite/gcc.dg/lto/pr60720_1.c =================================================================== *** gcc/testsuite/gcc.dg/lto/pr60720_1.c (revision 0) --- gcc/testsuite/gcc.dg/lto/pr60720_1.c (working copy) *************** *** 0 **** --- 1 ---- + int x; ++++++ tls-no-direct.diff ++++++ --- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200 +++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200 @@ -1,17 +1,20 @@ -Index: gcc/config/i386/gnu-user-common.h +For i?86 negative offsets to %fs segment accesses cause a hypervisor +trap for Xen. Avoid this by making accesses indirect. + +??? Note that similar to the behavior on SLE11 this only affects +the compiler built on %ix86, not that on x86_64, even with -m32. + +Index: gcc/config/i386/linux.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 +--- gcc/config/i386/linux.h (revision 209175) ++++ gcc/config/i386/linux.h (working copy) +@@ -21,3 +21,9 @@ along with GCC; see the file COPYING3. - /* We arrange for the whole %fs segment to map the tls area. */ + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++ +/* 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 \ ++ GCC not emit direct accesses to %fs at all. */ ++#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT ++#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT 0 -- 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