diff options
author | David Howells <dhowells@redhat.com> | 2013-08-09 11:08:07 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2013-08-09 11:08:07 +0100 |
commit | 0e6f9bc0daaef77834a5bda03b6ea3a46dfb43cd (patch) | |
tree | ad40a77a6aa8fec427ec5f688bfed91ecf044f1a /cross-binutils.spec | |
parent | 033f247765c67c6ddc207ed5dba5aa8d4d55f438 (diff) | |
parent | 7e2c5c0039655bd049c9d16e82aac8265ca9d5a9 (diff) | |
download | cross-binutils-0e6f9bc0daaef77834a5bda03b6ea3a46dfb43cd.tar.gz cross-binutils-0e6f9bc0daaef77834a5bda03b6ea3a46dfb43cd.tar.xz cross-binutils-0e6f9bc0daaef77834a5bda03b6ea3a46dfb43cd.zip |
Merge branch 'f19'
Conflicts:
cross-binutils.spec
The Fedora-20 mass-rebuild altered the release number from the f19 base.
Diffstat (limited to 'cross-binutils.spec')
-rw-r--r-- | cross-binutils.spec | 299 |
1 files changed, 203 insertions, 96 deletions
diff --git a/cross-binutils.spec b/cross-binutils.spec index 3d077c7..036f6de 100644 --- a/cross-binutils.spec +++ b/cross-binutils.spec @@ -1,57 +1,75 @@ -%define build_all 1 -%define build_alpha %{build_all} -%define build_arm %{build_all} -%define build_aarch64 %{build_all} -%define build_avr32 %{build_all} -%define build_blackfin %{build_all} -%define build_c6x %{build_all} -%define build_cris %{build_all} -%define build_frv %{build_all} -%define build_h8300 %{build_all} -%define build_hppa64 %{build_all} -%define build_ia64 %{build_all} -%define build_m32r %{build_all} -%define build_m68k %{build_all} -%define build_microblaze %{build_all} -%define build_mips64 %{build_all} -%define build_mn10300 %{build_all} -%define build_openrisc %{build_all} -%define build_powerpc64 %{build_all} -%define build_s390x %{build_all} -%define build_score %{build_all} -%define build_sh %{build_all} -%define build_sh64 %{build_all} -%define build_sparc64 %{build_all} -%define build_tile %{build_all} -%define build_x86_64 %{build_all} -%define build_xtensa %{build_all} +%define cross cross +%define rpmprefix %{nil} + +%define build_all 1 +%define build_alpha %{build_all} +%define build_arm %{build_all} +%define build_aarch64 %{build_all} +%define build_avr32 %{build_all} +%define build_blackfin %{build_all} +%define build_c6x %{build_all} +%define build_cris %{build_all} +%define build_frv %{build_all} +%define build_h8300 %{build_all} +%define build_hppa %{build_all} +%define build_hppa64 %{build_all} +%define build_ia64 %{build_all} +%define build_m32r %{build_all} +%define build_m68k %{build_all} +%define build_microblaze %{build_all} +%define build_mips64 %{build_all} +%define build_mn10300 %{build_all} +%define build_openrisc %{build_all} +%define build_powerpc64 %{build_all} +%define build_s390x %{build_all} +%define build_score %{build_all} +%define build_sh %{build_all} +%define build_sh64 %{build_all} +%define build_sparc64 %{build_all} +%define build_tile %{build_all} +%define build_x86_64 %{build_all} +%define build_xtensa %{build_all} # 32-bit packages we don't build as we can use the 64-bit package instead -%define build_hppa 0 -%define build_i386 0 -%define build_mips 0 -%define build_powerpc 0 -%define build_s390 0 -%define build_sparc 0 -%define build_sh4 0 +%define build_i386 0 +%define build_mips 0 +%define build_powerpc 0 +%define build_s390 0 +%define build_sparc 0 +%define build_sh4 0 # not available in binutils-2.22 -%define build_hexagon 0 -%define build_unicore32 0 +%define build_hexagon 0 +%define build_unicore32 0 Summary: A GNU collection of cross-compilation binary utilities -Name: cross-binutils -Version: 2.23.51.0.3 -Release: 3%{?dist} +Name: %{cross}-binutils +# Note - this version number is a lie. It should actually be 2.23.2 since +# that is the version of the base sources. But we have decided to switch +# from tracking the Linux Kernel binutils releases to tracking the FSF +# binutils releases half way through the FSF binutils release cycle. The +# version prior to this change was 2.23.52.0.1, but if we just set the new +# version definition to be 2.23.2 then we would have a regression in the +# binutils rpm numbers, which would break the rpm update mechanism. So +# instead we create a bogus, higher, version number here. Once the next +# official binutils release happens (2.24.0) we will be able to restore +# Version to an honest value and everything will be good again. +Version: 2.23.88.0.1 +%define srcdir binutils-2.23.2 +Release: 2%{?dist} License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils -Source: ftp://ftp.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.xz -# The ftp.kernel.org/pub/linux/devel/binutils/ page is (temporarily) unavailable -# so we use the GNU site instead. -# Source: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2 +# Note - see comment about the definition of Version above. Once Version is +# restored to a proper value the definition of Source below should be changed +# to use %{version} instead of 2.23.2 +# +# Note - the Linux Kernel binutils releases are too unstable and contain too +# many controversial patches so we stick with the official FSF version +# instead. +Source: http://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2 Source2: binutils-2.19.50.0.1-output-format.sed Patch01: binutils-2.20.51.0.2-libtool-lib64.patch Patch02: binutils-2.20.51.0.10-ppc64-pie.patch @@ -66,11 +84,32 @@ Patch08: binutils-2.22.52.0.1-relro-on-by-default.patch Patch09: binutils-2.22.52.0.1-export-demangle.h.patch # Disable checks that config.h has been included before system headers. BZ #845084 Patch10: binutils-2.22.52.0.4-no-config-h-check.patch -# Renames ARM LDRALT insn to LDALT. BZ# 869025 -Patch11: binutils-2.23.51.0.3-arm-ldralt.patch +# Fix the creation of the index table in 64-bit thin archives. +Patch11: binutils-2.23.52.0.1-64-bit-thin-archives.patch +# Fix errors reported by version 5.0 of texinfo in gas documentation +Patch12: binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch +# Fix addr2line to use the dynamic symbol table if it could not find any ordinary symbols. +Patch13: binutils-2.23.52.0.1-addr2line-dynsymtab.patch +# Check regular references without non-GOT references when building shared libraries. +Patch14: binutils-2.23.52.0.1-check-regular-ifunc-refs.patch +# Fix errors reported by version 5.0 of texinfo in ld documentation +Patch15: binutils-2.23.2-ld-texinfo-fixes.patch +Patch16: binutils-2.23.2-kernel-ld-r.patch +Patch17: binutils-2.23.2-bfd-texinfo-fixes.patch +# Add support for the alternate debug info files created by the DWZ program. +Patch18: binutils-2.23.2-dwz-alt-debuginfo.patch +# Correct bug introduced by patch 16 +Patch19: binutils-2.23.2-aarch64-em.patch +# Add support for the .machinemode pseudo-op to the S/390 assembler. +patch20: binutils-2.23.2-s390-gas-machinemode.patch + +# Fix for xtensa memset length +Patch100: cross-binutils-2.23.2-xtensa-memset.patch Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: texinfo >= 4.0, gettext, flex, bison, zlib-devel +# BZ 920545: We need pod2man in order to build the manual pages. +BuildRequires: /usr/bin/pod2man # Required for: ld-bootstrap/bootstrap.exp bootstrap with --static # It should not be required for: ld-elf/elf.exp static {preinit,init,fini} array Conflicts: gcc-c++ < 4.0.0 @@ -92,21 +131,31 @@ of an object or archive file), strings (for listing printable strings from files), strip (for discarding symbols), and addr2line (for converting addresses to file and line). -%package -n cross-binutils-common +%package -n %{cross}-binutils-common Summary: Cross-build binary utility documentation and translation files Group: Development/Tools BuildArch: noarch -%description -n cross-binutils-common +%description -n %{cross}-binutils-common Documentation, manual pages and translation files for cross-build binary image generation, manipulation and query tools. %define do_package() \ %if %2 \ -%package -n binutils-%1 \ +%package -n %{rpmprefix}binutils-%1 \ Summary: Cross-build binary utilities for %1 \ Group: Development/Tools \ -Requires: cross-binutils-common == %{version}-%{release} \ -%description -n binutils-%1 \ +Requires: %{cross}-binutils-common == %{version}-%{release} \ +%description -n %{rpmprefix}binutils-%1 \ +Cross-build binary image generation, manipulation and query tools. \ +%endif + +%define do_symlink() \ +%if %2 \ +%package -n %{rpmprefix}binutils-%1 \ +Summary: Cross-build binary utilities for %1 \ +Group: Development/Tools \ +Requires: binutils-%3 == %{version}-%{release} \ +%description -n %{rpmprefix}binutils-%1 \ Cross-build binary image generation, manipulation and query tools. \ %endif @@ -133,6 +182,8 @@ Cross-build binary image generation, manipulation and query tools. \ %do_package openrisc-linux-gnu %{build_openrisc} %do_package powerpc-linux-gnu %{build_powerpc} %do_package powerpc64-linux-gnu %{build_powerpc64} +%do_symlink ppc-linux-gnu %{build_powerpc} powerpc-linux-gnu +%do_symlink ppc64-linux-gnu %{build_powerpc64} powerpc64-linux-gnu %do_package s390-linux-gnu %{build_s390} %do_package s390x-linux-gnu %{build_s390x} %do_package score-linux-gnu %{build_score} @@ -156,7 +207,6 @@ Cross-build binary image generation, manipulation and query tools. \ ############################################################################### %prep -%define srcdir binutils-%{version} %setup -q -n %{srcdir} -c cd %{srcdir} %patch01 -p0 -b .libtool-lib64~ @@ -175,7 +225,18 @@ cd %{srcdir} %endif %patch09 -p0 -b .export-demangle-h~ %patch10 -p0 -b .no-config-h-check~ -%patch11 -p0 -b .arm-ldralt~ +%patch11 -p0 -b .64bit-thin-archives~ +%patch12 -p0 -b .gas-texinfo~ +%patch13 -p0 -b .addr2line~ +%patch14 -p0 -b .check-ifunc~ +%patch15 -p0 -b .ld-texinfo~ +%patch16 -p0 -b .kernel-ld-r~ +%patch17 -p0 -b .bfd-texinfo~ +%patch18 -p0 -b .dwz~ +%patch19 -p0 -b .aarch64~ +%patch20 -p0 -b .machinemode~ + +%patch100 -p1 -b .xtensa~ # We cannot run autotools as there is an exact requirement of autoconf-2.59. @@ -191,7 +252,7 @@ sed -i -e 's/^libbfd_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' bfd/Makefile.{am sed -i -e 's/^libopcodes_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' opcodes/Makefile.{am,in} fi # $PACKAGE is used for the gettext catalog name. -sed -i -e 's/^ PACKAGE=/ PACKAGE=cross-/' */configure +sed -i -e 's/^ PACKAGE=/ PACKAGE=%{cross}-/' */configure # Undo the name change to run the testsuite. for tool in binutils gas ld do @@ -204,7 +265,7 @@ function prep_target () { target=$1 cond=$2 - if [ $cond = 1 ] + if [ $cond != 0 ] then echo $1 >&5 fi @@ -271,7 +332,7 @@ fi function config_target () { arch=$1 prefix=$arch- - build_dir=$arch + build_dir=${1%%%%-*} case $arch in arm-*) target=arm-linux-gnueabi;; @@ -294,11 +355,6 @@ function config_target () { export CFLAGS="$RPM_OPT_FLAGS" CARGS= - case $target in hppa64*) - CARGS="$CARGS --enable-targets=hppa-linux-gnu" - ;; - esac - case $target in i?86*|sparc*|ppc*|s390*|sh*|arm*) CARGS="$CARGS --enable-64-bit-bfd" ;; @@ -364,8 +420,8 @@ do done function build_target () { - arch=$1 - make -C $arch %{_smp_mflags} tooldir=%{_prefix} all + build_dir=${1%%%%-*} + make -C $build_dir %{_smp_mflags} tooldir=%{_prefix} all } for target in `cat target.list` @@ -374,8 +430,8 @@ do done # for documentation purposes only -mkdir cross-binutils -cd cross-binutils +mkdir %{cross}-binutils +cd %{cross}-binutils ../%{srcdir}/configure \ --disable-dependency-tracking \ --disable-silent-rules \ @@ -392,7 +448,7 @@ cd cross-binutils --sharedstatedir=%{_sharedstatedir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ - --program-prefix=cross- \ + --program-prefix=%{cross}- \ --disable-shared \ --with-bugurl=http://bugzilla.redhat.com/bugzilla/ make %{_smp_mflags} tooldir=%{_prefix} all @@ -407,8 +463,33 @@ cd .. rm -rf %{buildroot} function install_bin () { - cross=$1 - make install -C $cross DESTDIR=%{buildroot} + cpu=${1%%%%-*} + build_dir=$cpu + make install -C $build_dir DESTDIR=%{buildroot} + + # We want links for ppc and ppc64 also if we make powerpc or powerpc64 + case $cpu in + powerpc*) + cd %{buildroot}/usr/bin + for i in $cpu-* + do + ln -s $i ppc${i#powerpc} + done + cd - + cd %{buildroot}/usr/ + for i in $cpu-* + do + ln -s $i ppc${i#powerpc} + done + cd - + cd %{buildroot}/usr/share/man/man1 + for i in $cpu-* + do + ln -s $i ppc${i#powerpc} + done + cd - + ;; + esac } for target in `cat target.list` @@ -423,18 +504,22 @@ do done echo "=== INSTALL man targets ===" -make install-man1 -C cross-binutils/binutils/doc DESTDIR=%{buildroot} -make install-man1 -C cross-binutils/gas/doc DESTDIR=%{buildroot} -make install-man1 -C cross-binutils/ld DESTDIR=%{buildroot} -make install-man1 -C cross-binutils/gprof DESTDIR=%{buildroot} +make install-man1 -C %{cross}-binutils/binutils/doc DESTDIR=%{buildroot} +make install-man1 -C %{cross}-binutils/gas/doc DESTDIR=%{buildroot} +make install-man1 -C %{cross}-binutils/ld DESTDIR=%{buildroot} +make install-man1 -C %{cross}-binutils/gprof DESTDIR=%{buildroot} echo "=== INSTALL po targets ===" -make install -C cross-binutils/binutils/po DESTDIR=%{buildroot} -make install -C cross-binutils/gas/po DESTDIR=%{buildroot} -make install -C cross-binutils/ld/po DESTDIR=%{buildroot} -make install -C cross-binutils/gprof/po DESTDIR=%{buildroot} -make install -C cross-binutils/bfd/po DESTDIR=%{buildroot} -make install -C cross-binutils/opcodes/po DESTDIR=%{buildroot} +make install -C %{cross}-binutils/binutils/po DESTDIR=%{buildroot} +make install -C %{cross}-binutils/gas/po DESTDIR=%{buildroot} +make install -C %{cross}-binutils/ld/po DESTDIR=%{buildroot} +make install -C %{cross}-binutils/gprof/po DESTDIR=%{buildroot} +make install -C %{cross}-binutils/bfd/po DESTDIR=%{buildroot} +make install -C %{cross}-binutils/opcodes/po DESTDIR=%{buildroot} + +# Add the additional symlink-only targets +grep ^powerpc target.list | sed -e s/powerpc/ppc/ >symlink-target.list +cat symlink-target.list >>target.list # For cross-binutils we drop the documentation. echo "=== REMOVE documentation ===" @@ -467,7 +552,12 @@ function build_file_list () { echo '%%defattr(-,root,root,-)' echo %{_bindir}/$arch-[!l]\* echo %{_bindir}/$arch-ld\* - echo %{auxbin_prefix}/$target_cpu-*/bin/\* + if [ -L %{buildroot}%{auxbin_prefix}/$target_cpu-* ] + then + echo %{auxbin_prefix}/$target_cpu-* + else + echo %{auxbin_prefix}/$target_cpu-*/bin/\* + fi echo %{_mandir}/man1/$arch-\* ) >files.$arch } @@ -481,9 +571,9 @@ done # same, so symlink them to the core package echo "=== CROSSLINK man pages ===" cd %{buildroot}%{_mandir}/man1 -for i in cross-*.1* +for i in %{cross}-*.1* do - j=${i#cross-} + j=${i#%{cross}-} for k in *-$j do @@ -496,7 +586,7 @@ done # Add ld.bfd manual pages -find * -name "*ld.1*" -a ! -name "cross-ld.1*" -print | +find * -name "*ld.1*" -a ! -name "%{cross}-ld.1*" -print | while read x do y=`echo $x | sed -e s/ld[.]1/ld.bfd.1/` @@ -507,18 +597,18 @@ cd - # Find the language files which only exist in the common package ( - %find_lang cross-binutils - %find_lang cross-opcodes - %find_lang cross-bfd - %find_lang cross-gas - %find_lang cross-ld - %find_lang cross-gprof - cat cross-binutils.lang - cat cross-opcodes.lang - cat cross-bfd.lang - cat cross-gas.lang - cat cross-ld.lang - cat cross-gprof.lang + %find_lang %{cross}-binutils + %find_lang %{cross}-opcodes + %find_lang %{cross}-bfd + %find_lang %{cross}-gas + %find_lang %{cross}-ld + %find_lang %{cross}-gprof + cat %{cross}-binutils.lang + cat %{cross}-opcodes.lang + cat %{cross}-bfd.lang + cat %{cross}-gas.lang + cat %{cross}-ld.lang + cat %{cross}-gprof.lang ) >files.cross @@ -536,14 +626,14 @@ rm -rf %{buildroot} # Filesets # ############################################################################### -%files -n cross-binutils-common -f files.cross +%files -n %{cross}-binutils-common -f files.cross %doc %{srcdir}/README %doc %{srcdir}/COPYING* -%{_mandir}/man1/cross-* +%{_mandir}/man1/%{cross}-* %define do_files() \ %if %2 \ -%files -n binutils-%1 -f files.%1 \ +%files -n %{rpmprefix}binutils-%1 -f files.%1 \ %endif %do_files alpha-linux-gnu %{build_alpha} @@ -569,6 +659,8 @@ rm -rf %{buildroot} %do_files openrisc-linux-gnu %{build_openrisc} %do_files powerpc-linux-gnu %{build_powerpc} %do_files powerpc64-linux-gnu %{build_powerpc64} +%do_files ppc-linux-gnu %{build_powerpc} +%do_files ppc64-linux-gnu %{build_powerpc64} %do_files s390-linux-gnu %{build_s390} %do_files s390x-linux-gnu %{build_s390x} %do_files score-linux-gnu %{build_score} @@ -583,6 +675,21 @@ rm -rf %{buildroot} %do_files xtensa-linux-gnu %{build_xtensa} %changelog +* Fri Aug 9 2013 David Howells <dhowells@redhat.com> - 2.23.88.0.1-2 +- Fix a build error in xtensa + +* Thu Aug 8 2013 David Howells <dhowells@redhat.com> - 2.23.88.0.1-2 +- Backport S390 .machinemode pseudo-op support from binutils-2.23.88.0.1-10. +- Add pod2man as a build requirement. + +* Tue Jun 4 2013 David Howells <dhowells@redhat.com> - 2.23.88.0.1-1 +- Update to binutils-2.22.88.0.1 to fix F19 texinfo issues [BZ 912921]. + +* Tue Jun 4 2013 David Howells <dhowells@redhat.com> - 2.23.51.0.3-2 +- Backport cleanups from the RHEL-6.4 cross-compiler. +- Backport some macroisation from the RHEL-6.4 cross-compiler. +- The hppa64 target cannot actually build hppa, so provide hppa [BZ 892220]. + * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.23.51.0.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild |