# Maintainer: Natanael Copa pkgname=binutils pkgver=2.24 pkgrel=5 pkgdesc="Tools necessary to build programs" url="http://www.gnu.org/software/binutils/" depends="" makedepends="bison flex texinfo zlib-dev" arch="all" license="GPL2 GPL3+ LGPL2 BSD" subpackages="$pkgname-doc $pkgname-libs $pkgname-gold" if [ "$CHOST" != "$CTARGET" ] && [ -n "$CHOST" -a -n "$CTARGET" ]; then pkgname="$pkgname-$CTARGET" subpackages="" somask="libbfd-$pkgver.so libopcodes-$pkgver.so" fi source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2 binutils-ld-fix-static-linking.patch 02_fix-opcodes-configure-bfd-version-on-busybox-ash.patch bfd-version.patch binutils-2.24-CVE-2014-8484.patch binutils-2.24-CVE-2014-8485.patch binutils-2.24-CVE-2014-8501.patch binutils-2.24-CVE-2014-8502.patch binutils-2.24-CVE-2014-8503.patch binutils-2.24-CVE-2014-8504.patch binutils-2.24-CVE-2014-8737.patch binutils-2.24-CVE-2014-8738.patch " _builddir="$srcdir/$pkgname-$pkgver" prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch|*.diff) msg "Applying $i..." patch -p1 -i "$srcdir"/$i || return 1 ;; esac done } build() { local _cross_configure= [ "$CHOST" != "$CTARGET" ] && _cross_configure="--with-sysroot=$CBUILDROOT" cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --target=$CTARGET \ --with-build-sysroot="$CBUILDROOT" \ $_cross_configure \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --disable-multilib \ --enable-shared \ --enable-ld=default \ --enable-gold=yes \ --enable-64-bit-bfd \ --enable-plugins \ --disable-werror \ --disable-nls \ || return 1 make || return 1 } package() { cd "$_builddir" make install DESTDIR="$pkgdir" || return 1 if [ -d "$pkgdir"/usr/lib64 ]; then mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/ rmdir "$pkgdir"/usr/lib64 fi if [ "$CHOST" != "$CTARGET" ]; then # creating cross tools: remove any files that would conflict # with the native tools, or other cross tools rm -r "$pkgdir"/usr/share rm -f "$pkgdir"/usr/lib/libiberty.a fi find "$pkgdir" -name "*.la" -delete } libs() { pkgdesc="Runtime libraries from binutils - libbfd and libopcodes" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/ || return 1 } gold() { pkgdesc="GNU binutils - gold linker" if [ -e "$pkgdir"/usr/bin/ld.gold ]; then mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/ld.gold "$subpkgdir"/usr/bin fi mkdir -p "$subpkgdir"/usr/$CTARGET/bin mv "$pkgdir"/usr/$CTARGET/bin/ld.gold "$subpkgdir"/usr/$CTARGET/bin/ld.gold } md5sums="e0f71a7b2ddab0f8612336ac81d9636b binutils-2.24.tar.bz2 c9f308494b87c243f121a56d58f2da87 binutils-ld-fix-static-linking.patch 26210092adc0e0d7b236eb464dea543a 02_fix-opcodes-configure-bfd-version-on-busybox-ash.patch 56c179892fa33cd0bac127761834e5d9 bfd-version.patch 125d8ce675ced84814d5f068106dbaa3 binutils-2.24-CVE-2014-8484.patch 6923e5279a84cb7134b07e2cf6686434 binutils-2.24-CVE-2014-8485.patch 4c590dc70829d8f4fc190f0fe7e3add8 binutils-2.24-CVE-2014-8501.patch 339fd5a7b79f973e0eb57e9616cfb1e5 binutils-2.24-CVE-2014-8502.patch 70540e2c6418a54ad88ab9c6b988d075 binutils-2.24-CVE-2014-8503.patch acce1f1d28db6bdb84b430a05f331366 binutils-2.24-CVE-2014-8504.patch 12fb3e860203a06b5d1f4b023c06dcec binutils-2.24-CVE-2014-8737.patch d35b0ccb79d565757821b3e0206f3873 binutils-2.24-CVE-2014-8738.patch" sha256sums="e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137 binutils-2.24.tar.bz2 d5c5581d0ba04ef2e3690f6fb57435bf7ce343f2376fe972a2a693c5429eec9c binutils-ld-fix-static-linking.patch 0bbd84e3e761e482e5a78ca126964b2af3b492dad66f49b62603f653bb795ea5 02_fix-opcodes-configure-bfd-version-on-busybox-ash.patch 79cea3abac2fc544494853b03a5fbf92489969397286d201b25706359e0862bb bfd-version.patch f4eb21ee16f34d7d60f9dd2d6a45616a78e60c79ae40a2a691316ed73704f8a1 binutils-2.24-CVE-2014-8484.patch 8bab2ee0dba00bccf78f3a9fee492342c6d6e362b43bdebe20b5226bbc76d3e7 binutils-2.24-CVE-2014-8485.patch 15d8878af78a26bc7ff9e40312c3265d8172328d505c03d2429177c981ab4397 binutils-2.24-CVE-2014-8501.patch cdd5bc44831eb58b00ae374e39102a24870ca14f0eb8c40fc18d94b89c14b3bd binutils-2.24-CVE-2014-8502.patch 03261cba91e0a93a71d1554660d7dadf0735f6ec358ca6ad1443eb66b92b45ae binutils-2.24-CVE-2014-8503.patch 47b092c472373d60655f1cde6d8f83dcf4e2ccdc818fb4c335b141ea2f472a02 binutils-2.24-CVE-2014-8504.patch 86fc02360f3c93ab73e2cc7df4f9516611220185fb543f9be4d87b10bc1d73f4 binutils-2.24-CVE-2014-8737.patch 51e116f55dd72ae8b8af6d8f9755ff557953857251e5490532840cca4a6fae51 binutils-2.24-CVE-2014-8738.patch" sha512sums="5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12 binutils-2.24.tar.bz2 ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch f7c2d19c4fce831d5f2791e4daadde70a1286bcf27074e24e635224fc9f39f47b6d95cbf2860eea1be1362f995e348fca0a0c2d9fe2d491dfe5d674c82f83bfb 02_fix-opcodes-configure-bfd-version-on-busybox-ash.patch 2fce2bbb667e643d090898d221f896ef7c192e858edbda3d460cb2067b130ce6d44730a47e332cae4c7bacf1a858dcc33715246fd209c7d98d2eda4aeb3f5b6c bfd-version.patch e5b136a63c2c402c52dc07383cff0247560aedee541f05144ceba7aaa27ec5eeccf94cd6be36cc7389a597349f02277efff06465a3ae6ea4eecd3169f6794124 binutils-2.24-CVE-2014-8484.patch df3d20083118fa7bd42d95356478af43cdf24d0ffd54aaefc11806bf7cfddd0c8a3d639846e6087b6a7134e6984894cb3044195babc47e48ac1899e4b8384a08 binutils-2.24-CVE-2014-8485.patch 87e56bd9a0d491465202ffac22c732e4c490186c78d366d90130db8ba9882bf0047782fd6873fd1585ce3a336dd75c4cdc830508baeb3e6ec52f1655e6743f21 binutils-2.24-CVE-2014-8501.patch b1e89da52483df8b8156d9c778c22eda50c6c5d2838c89257ec3118f01895a60c47a3120f1a6e59e083490bcaa5c4baaf16ab41625a115b47254a7e4b62ae387 binutils-2.24-CVE-2014-8502.patch ad9c2774c824d4eaf2c99e539786e740f71937aca9af043c05bec422367cc3461904d7c5ca37ba57dc9502170d2082759b1786e5b4024c67be7188632d6349f1 binutils-2.24-CVE-2014-8503.patch c54400678d742a2033036c85ce062cce3b65a32be6656ce39921291d39ccb237fdd20dadf12c20982d372a7cec46d32b07fcaad845c0d1986fc388e7b773af12 binutils-2.24-CVE-2014-8504.patch 85de4bb4646d6b20872337ae452ab9c514661d998b9633e45b1e3d3f267adbc210f9ca35ae71e80f769fb033f2ff6fa8a7d06a7fbc72255076be4006c2e9abca binutils-2.24-CVE-2014-8737.patch 364efbd7f0e98f3796fce4cab8c54f67a2d410c7eb05cbf206aa72911ca7c904f8e5ca929b105a2a23bf0887026bee29086e32f522a39bce8c6547751895b8eb binutils-2.24-CVE-2014-8738.patch"