Changeset 1066
- Timestamp:
- Mar 20, 2017, 5:47:53 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/binutils.spec
r777 r1066 1 #define svn_url e:/trees/binutils/trunk2 %define svn_url http://svn.netlabs.org/repos/ports/binutils/trunk3 %define svn_rev 15874 5 1 # rpmbuild parameters: 6 2 # --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. 13 7 14 8 %if 0%{!?binutils_target:1} … … 27 21 %define enable_deterministic_archives 0 28 22 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 29 46 30 47 Summary: A GNU collection of binary utilities 31 48 Name: %{?cross}binutils%{?_with_debug:-debug} 32 Version: 2.2 549 Version: 2.27 33 50 Release: 1%{?dist} 34 51 License: GPLv3+ … … 36 53 URL: http://sources.redhat.com/binutils 37 54 38 Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip39 55 Vendor: bww bitwise works GmbH 56 %scm_source svn http://svn.netlabs.org/repos/ports/binutils/trunk 2151 40 57 41 58 Provides: bundled(libiberty) 42 59 43 60 # 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} 45 62 %define gold_arches %ix86 x86_64 %arm aarch64 46 63 64 %if %{with bootstrap} 65 %define build_gold no 66 %else 67 %ifarch %gold_arches 47 68 # 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 51 70 %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} 55 77 # Define this if you want to skip the strip step and preserve debug info. 56 78 # Useful for testing. 57 79 %define __debug_install_post : > %{_builddir}/%{?buildsubdir}/debugfiles.list 58 80 %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 83 BuildRequires: gcc 84 85 # Gold needs bison in order to build gold/yyscript.c. 86 # Bison needs m4. 87 %if "%{build_gold}" == "both" 88 BuildRequires: bison, m4, gcc-c++ 89 %endif 90 91 %if %{without bootstrap} 92 BuildRequires: gettext, flex, zlib-devel 93 %endif 94 95 %if %{with docs} 96 BuildRequires: texinfo >= 4.0 65 97 # BZ 920545: We need pod2man in order to build the manual pages. 66 # BuildRequires: /@unixroot/usr/bin/pod2man 98 #BuildRequires: /@unixroot/usr/bin/pod2man 99 Requires(post): %{_sbindir}/install-info.exe 100 Requires(preun): %{_sbindir}/install-info.exe 101 %endif 102 67 103 # Required for: ld-bootstrap/bootstrap.exp bootstrap with --static 68 104 # It should not be required for: ld-elf/elf.exp static {preinit,init,fini} array 69 %if %{ run_testsuite}105 %if %{with testsuite} 70 106 # relro_test.sh uses dc which is part of the bc rpm, hence its inclusion here. 71 107 BuildRequires: dejagnu, zlib-static, glibc-static, sharutils, bc … … 75 111 %endif 76 112 %endif 113 77 114 Conflicts: gcc-c++ < 4.0.0 78 #Requires(post): /sbin/install-info79 #Requires(preun): /sbin/install-info80 %ifarch ia6481 Obsoletes: gnupro <= 1117-182 %endif83 84 115 85 116 # The higher of these two numbers determines the default ld. … … 113 144 114 145 %package devel 115 Summary: BFD and opcodes dynamic libraries and header files146 Summary: BFD and opcodes static and dynamic libraries and header files 116 147 Group: System Environment/Libraries 117 Conflicts: binutils < 2.17.50.0.3-4 118 #Requires(post): /sbin/install-info 119 #Requires(preun): /sbin/install-info 148 Provides: binutils-static = %{version}-%{release} 149 %if %{with docs} 150 Requires(post): %{_sbindir}/install-info.exe 151 Requires(preun): %{_sbindir}/install-info.exe 152 %endif 120 153 Requires: zlib-devel 121 154 Requires: binutils = %{version}-%{release} … … 140 173 141 174 %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 150 176 151 177 autogen.sh 178 179 %if %{without docs} 180 find . -name *.info -print -exec touch {} \; 181 %endif 152 182 153 183 %build … … 185 215 esac 186 216 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 187 224 %if 0%{?_with_debug:1} 188 225 CFLAGS="$CFLAGS -O0 -ggdb2 -Wno-error -D_FORTIFY_SOURCE=0" … … 190 227 %endif 191 228 192 export LDFLAGS=" -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" 229 export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" 230 export LIBS="-lcx" 193 231 194 232 # We could optimize the cross builds size by --enable-shared but the produced … … 198 236 %configure \ 199 237 --target=%{binutils_target} \ 238 --with-system-zlib \ 200 239 %ifarch %gold_arches 201 240 %if "%{build_gold}" == "both" … … 205 244 %endif 206 245 %endif 207 %if !%{isnative} 246 %if %{isnative} 247 --with-sysroot=/@unixroot \ 248 %else 208 249 --enable-targets=%{_host} \ 209 250 --with-sysroot=%{_prefix}/%{binutils_target}/sys-root \ … … 220 261 --enable-deterministic-archives=no \ 221 262 %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 222 271 $CARGS \ 223 272 --enable-plugins=no \ 224 273 --with-bugurl=http://trac.netlabs.org/ports/ 274 275 %if %{with docs} 225 276 make %{_smp_mflags} tooldir=%{_prefix} all 226 277 make %{_smp_mflags} tooldir=%{_prefix} info 278 %else 279 make %{_smp_mflags} tooldir=%{_prefix} MAKEINFO=true all 280 %endif 227 281 228 282 # Do not use %%check as it is run after %%install where libbfd.so is rebuild 229 283 # with -fvisibility=hidden no longer being usable in its shared form. 230 %if !%{run_testsuite}284 %if %{without testsuite} 231 285 echo ====================TESTSUITE DISABLED========================= 232 286 %else … … 246 300 %install 247 301 rm -rf %{buildroot} 302 %if %{with docs} 248 303 make install DESTDIR=%{buildroot} 249 %if %{isnative} 304 %else 305 make install DESTDIR=%{buildroot} MAKEINFO=true 306 %endif 307 %if %{isnative} 308 %if %{with docs} 250 309 make prefix=%{buildroot}%{_prefix} infodir=%{buildroot}%{_infodir} install-info 310 %endif 251 311 252 312 #install -m 644 bfd/libbfd.a %{buildroot}%{_libdir} … … 257 317 rm -f %{buildroot}%{_mandir}/man1/dlltool* 258 318 rm -f %{buildroot}%{_mandir}/man1/nlmconv* 319 rm -f %{buildroot}%{_mandir}/man1/windres* 259 320 rm -f %{buildroot}%{_mandir}/man1/windmc* 260 321 … … 323 384 exit 0 324 385 386 exit 0 387 325 388 %preun 326 389 %if "%{build_gold}" == "both" … … 344 407 345 408 %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 347 418 %endif # %{isnative} 348 419 349 420 %files -f %{?cross}binutils.lang 350 421 %defattr(-,root,root,-) 422 %license COPYING COPYING3 COPYING3.LIB COPYING.LIB 351 423 %doc README 352 424 %{_bindir}/%{?cross}[!l]*.exe … … 359 431 %endif 360 432 %{_mandir}/man1/* 433 %{_infodir}/as.info.gz 434 %{_infodir}/binutils.info.gz 435 %{_infodir}/gprof.info.gz 436 #%{_infodir}/ld.info.gz 361 437 %if %{enable_shared} 362 438 %{_libdir}/*.dll … … 364 440 365 441 %if %{isnative} 442 %if %{with docs} 366 443 %{_infodir}/[^b]*info* 367 444 %{_infodir}/binutils*info* 445 %endif 368 446 369 447 %files devel … … 371 449 %{_prefix}/include/* 372 450 %{_libdir}/*_dll.a 451 %if %{with docs} 373 452 %{_infodir}/bfd*info* 453 %endif # with docs 374 454 375 455 %endif # %{isnative} 376 456 377 457 %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 378 462 * Tue May 31 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.25-1 379 463 - update to version 2.25
Note:
See TracChangeset
for help on using the changeset viewer.