Changeset 1066


Ignore:
Timestamp:
Mar 20, 2017, 5:47:53 PM (8 years ago)
Author:
Silvan Scherrer
Message:

spec: binutils: Release version 2.27-1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/binutils.spec

    r777 r1066  
    1 #define svn_url     e:/trees/binutils/trunk
    2 %define svn_url     http://svn.netlabs.org/repos/ports/binutils/trunk
    3 %define svn_rev     1587
    4 
    51# rpmbuild parameters:
    62# --define "binutils_target arm-linux-gnu" to create arm-linux-gnu-binutils.
    7 # --with debug: Build without optimizations and without splitting the debuginfo.
    8 # --without testsuite: Do not run the testsuite.  Default is to run it.
    9 # --with testsuite: Run the testsuite.  Default --with debug is not to run it.
    10 
    11 # we don't run the testsuit, as there are dependencies we don't have atm
    12 %define _without_testsuite 1
     3# --with=bootstrap: Build with minimal dependencies.
     4# --with=debug: Build without optimizations and without splitting the debuginfo.
     5# --without=docs: Skip building documentation.
     6# --without=testsuite: Do not run the testsuite.
    137
    148%if 0%{!?binutils_target:1}
     
    2721%define enable_deterministic_archives 0
    2822
     23# BZ 1342618: Enable support for GCC LTO compilation.
     24%define enable_lto 0
     25# Disable the default generation of compressed debug sections.
     26%define default_compress_debug 0
     27
     28# Default: Not bootstrapping.
     29%bcond_with bootstrap
     30# Default: Not debug
     31%bcond_with debug
     32# Default: Always build documentation.
     33%bcond_without docs
     34# Default: don't run run the testsuite.
     35%bcond_with testsuite
     36
     37%if %{with bootstrap}
     38%undefine with_docs
     39%undefine with_testsuite
     40%endif
     41
     42%if %{with debug}
     43%undefine with_testsuite
     44%endif
     45
    2946
    3047Summary: A GNU collection of binary utilities
    3148Name: %{?cross}binutils%{?_with_debug:-debug}
    32 Version: 2.25
     49Version: 2.27
    3350Release: 1%{?dist}
    3451License: GPLv3+
     
    3653URL: http://sources.redhat.com/binutils
    3754
    38 Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
    3955Vendor: bww bitwise works GmbH
     56%scm_source svn http://svn.netlabs.org/repos/ports/binutils/trunk 2151
    4057
    4158Provides: bundled(libiberty)
    4259
    4360# BZ 1173780: Building GOLD for PPC is not working at the moment.
    44 # define gold_arches %ix86 x86_64 %arm aarch64 ppc* %{power64}
     61# %define gold_arches %ix86 x86_64 %arm aarch64 ppc* %{power64}
    4562%define gold_arches %ix86 x86_64 %arm aarch64
    4663
     64%if %{with bootstrap}
     65%define build_gold      no
     66%else
     67%ifarch %gold_arches
    4768# we don't build on elf, so no gold for us
    48 # ifarch %gold_arches
    49 # define build_gold     both
    50 # else
     69#define build_gold      both
    5170%define build_gold      no
    52 # endif
    53 
    54 %if 0%{?_with_debug:1}
     71%else
     72%define build_gold      no
     73%endif
     74%endif
     75
     76%if %{with debug}
    5577# Define this if you want to skip the strip step and preserve debug info.
    5678# Useful for testing.
    5779%define __debug_install_post : > %{_builddir}/%{?buildsubdir}/debugfiles.list
    5880%define debug_package %{nil}
    59 %define run_testsuite 0%{?_with_testsuite:1}
    60 %else
    61 %define run_testsuite 0%{!?_without_testsuite:1}
    62 %endif
    63 
    64 BuildRequires: texinfo >= 4.0, gettext, flex, bison, zlib-devel
     81%endif
     82
     83BuildRequires: gcc
     84
     85# Gold needs bison in order to build gold/yyscript.c.
     86# Bison needs m4.
     87%if "%{build_gold}" == "both"
     88BuildRequires: bison, m4, gcc-c++
     89%endif
     90
     91%if %{without bootstrap}
     92BuildRequires: gettext, flex, zlib-devel
     93%endif
     94
     95%if %{with docs}
     96BuildRequires: texinfo >= 4.0
    6597# BZ 920545: We need pod2man in order to build the manual pages.
    66 # BuildRequires: /@unixroot/usr/bin/pod2man
     98#BuildRequires: /@unixroot/usr/bin/pod2man
     99Requires(post): %{_sbindir}/install-info.exe
     100Requires(preun): %{_sbindir}/install-info.exe
     101%endif
     102
    67103# Required for: ld-bootstrap/bootstrap.exp bootstrap with --static
    68104# It should not be required for: ld-elf/elf.exp static {preinit,init,fini} array
    69 %if %{run_testsuite}
     105%if %{with testsuite}
    70106# relro_test.sh uses dc which is part of the bc rpm, hence its inclusion here.
    71107BuildRequires: dejagnu, zlib-static, glibc-static, sharutils, bc
     
    75111%endif
    76112%endif
     113
    77114Conflicts: gcc-c++ < 4.0.0
    78 #Requires(post): /sbin/install-info
    79 #Requires(preun): /sbin/install-info
    80 %ifarch ia64
    81 Obsoletes: gnupro <= 1117-1
    82 %endif
    83 
    84115
    85116# The higher of these two numbers determines the default ld.
     
    113144
    114145%package devel
    115 Summary: BFD and opcodes dynamic libraries and header files
     146Summary: BFD and opcodes static and dynamic libraries and header files
    116147Group: System Environment/Libraries
    117 Conflicts: binutils < 2.17.50.0.3-4
    118 #Requires(post): /sbin/install-info
    119 #Requires(preun): /sbin/install-info
     148Provides: binutils-static = %{version}-%{release}
     149%if %{with docs}
     150Requires(post): %{_sbindir}/install-info.exe
     151Requires(preun): %{_sbindir}/install-info.exe
     152%endif
    120153Requires: zlib-devel
    121154Requires: binutils = %{version}-%{release}
     
    140173
    141174%prep
    142 %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
    143 %setup -q
    144 %else
    145 %setup -n "%{name}-%{version}" -Tc
    146 svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
    147 rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
    148 (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
    149 %endif
     175%scm_setup
    150176
    151177autogen.sh
     178
     179%if %{without docs}
     180  find . -name *.info -print -exec touch {} \;
     181%endif
    152182
    153183%build
     
    185215esac
    186216
     217# we are not elf
     218#case %{binutils_target} in x86_64*|i?86*|arm*|aarch64*)
     219#  CARGS="$CARGS --enable-targets=x86_64-pep"
     220#  ;;
     221#esac
     222
     223
    187224%if 0%{?_with_debug:1}
    188225CFLAGS="$CFLAGS -O0 -ggdb2 -Wno-error -D_FORTIFY_SOURCE=0"
     
    190227%endif
    191228
    192 export LDFLAGS=" -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
     229export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
     230export LIBS="-lcx"
    193231
    194232# We could optimize the cross builds size by --enable-shared but the produced
     
    198236%configure \
    199237  --target=%{binutils_target} \
     238  --with-system-zlib \
    200239%ifarch %gold_arches
    201240%if "%{build_gold}" == "both"
     
    205244%endif
    206245%endif
    207 %if !%{isnative}
     246%if %{isnative}
     247  --with-sysroot=/@unixroot \
     248%else
    208249  --enable-targets=%{_host} \
    209250  --with-sysroot=%{_prefix}/%{binutils_target}/sys-root \
     
    220261  --enable-deterministic-archives=no \
    221262%endif
     263%if %{enable_lto}
     264  --enable-lto \
     265%endif
     266%if %{default_compress_debug}
     267  --enable-compressed-debug-sections=all \
     268%else
     269  --enable-compressed-debug-sections=none \
     270%endif
    222271  $CARGS \
    223272  --enable-plugins=no \
    224273  --with-bugurl=http://trac.netlabs.org/ports/
     274
     275%if %{with docs} 
    225276make %{_smp_mflags} tooldir=%{_prefix} all
    226277make %{_smp_mflags} tooldir=%{_prefix} info
     278%else
     279make %{_smp_mflags} tooldir=%{_prefix} MAKEINFO=true all
     280%endif
    227281
    228282# Do not use %%check as it is run after %%install where libbfd.so is rebuild
    229283# with -fvisibility=hidden no longer being usable in its shared form.
    230 %if !%{run_testsuite}
     284%if %{without testsuite}
    231285echo ====================TESTSUITE DISABLED=========================
    232286%else
     
    246300%install
    247301rm -rf %{buildroot}
     302%if %{with docs} 
    248303make install DESTDIR=%{buildroot}
    249 %if %{isnative}
     304%else
     305make install DESTDIR=%{buildroot} MAKEINFO=true
     306%endif
     307%if %{isnative}
     308%if %{with docs}
    250309make prefix=%{buildroot}%{_prefix} infodir=%{buildroot}%{_infodir} install-info
     310%endif
    251311
    252312#install -m 644 bfd/libbfd.a %{buildroot}%{_libdir}
     
    257317rm -f %{buildroot}%{_mandir}/man1/dlltool*
    258318rm -f %{buildroot}%{_mandir}/man1/nlmconv*
     319rm -f %{buildroot}%{_mandir}/man1/windres*
    259320rm -f %{buildroot}%{_mandir}/man1/windmc*
    260321
     
    323384exit 0
    324385
     386exit 0
     387
    325388%preun
    326389%if "%{build_gold}" == "both"
     
    344407
    345408%if %{isnative}
    346 #%postun -p /sbin/ldconfig
     409#%postun
     410#/sbin/ldconfig
     411  if [ -e %{_infodir}/binutils.info.gz ]
     412  then
     413   %{_sbindir}/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
     414   %{_sbindir}/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
     415   %{_sbindir}/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
     416   %{_sbindir}/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
     417  fi
    347418%endif # %{isnative}
    348419
    349420%files -f %{?cross}binutils.lang
    350421%defattr(-,root,root,-)
     422%license COPYING COPYING3 COPYING3.LIB COPYING.LIB
    351423%doc README
    352424%{_bindir}/%{?cross}[!l]*.exe
     
    359431%endif
    360432%{_mandir}/man1/*
     433%{_infodir}/as.info.gz
     434%{_infodir}/binutils.info.gz
     435%{_infodir}/gprof.info.gz
     436#%{_infodir}/ld.info.gz
    361437%if %{enable_shared}
    362438%{_libdir}/*.dll
     
    364440
    365441%if %{isnative}
     442%if %{with docs}
    366443%{_infodir}/[^b]*info*
    367444%{_infodir}/binutils*info*
     445%endif
    368446
    369447%files devel
     
    371449%{_prefix}/include/*
    372450%{_libdir}/*_dll.a
     451%if %{with docs}
    373452%{_infodir}/bfd*info*
     453%endif # with docs
    374454
    375455%endif # %{isnative}
    376456
    377457%changelog
     458* Mon Mar 20 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.27-1
     459- update to version 2.27
     460- adjust spec to scm_ macros usage
     461
    378462* Tue May 31 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.25-1
    379463- update to version 2.25
Note: See TracChangeset for help on using the changeset viewer.