core/binutils/PKGBUILD

77 lines
2.2 KiB
Bash
Raw Normal View History

2012-04-21 08:01:42 +08:00
# maintainer: Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
2010-11-12 06:49:29 +08:00
2010-03-13 23:25:19 +08:00
pkgname=binutils
2014-05-22 20:45:46 +08:00
pkgver=2.24
2014-05-24 18:50:49 +08:00
pkgrel=5
2012-11-14 04:02:56 +08:00
pkgdesc="A set of programs to assemble and manipulate binary and object files"
arch=('x86_64')
2010-03-13 23:25:19 +08:00
url="http://www.gnu.org/software/binutils/"
license=('GPL')
2012-11-14 04:02:56 +08:00
groups=('base-devel')
depends=('glibc>=2.18' 'zlib')
2012-11-14 04:02:56 +08:00
checkdepends=('dejagnu' 'bc')
conflicts=('binutils-multilib')
replaces=('binutils-multilib')
2014-05-22 20:45:46 +08:00
options=('!libtool' '!distcc' '!ccache' 'staticlibs')
2012-11-14 04:02:56 +08:00
install=binutils.install
2013-04-27 02:24:28 +08:00
source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2{,.sig}
2014-05-22 20:45:46 +08:00
binutils-2.24-lto-testsuite.patch
binutils-2.24-static-pie-hang.patch)
md5sums=('e0f71a7b2ddab0f8612336ac81d9636b'
'SKIP'
'b16e895c24ff80acd98a21021eccefad'
'4d2cf591560c3d25265778146bbe1941')
2013-04-27 02:24:28 +08:00
prepare() {
cd ${srcdir}/binutils-${pkgver}
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
2014-05-22 20:45:46 +08:00
# fix lto testsuite with gcc-4.9 - commit b35d44f1
patch -p1 -i $srcdir/binutils-2.24-lto-testsuite.patch
# fix autoconf hang with -static -fPIE -pie - commits d1ec1e40 and 818d220a
patch -p1 -i $srcdir/binutils-2.24-static-pie-hang.patch
2013-04-27 02:24:28 +08:00
mkdir ${srcdir}/binutils-build
}
2010-03-13 23:25:19 +08:00
build() {
2013-04-27 02:24:28 +08:00
cd ${srcdir}/binutils-build
2012-11-14 04:02:56 +08:00
${srcdir}/binutils-${pkgver}/configure --prefix=/usr \
--with-lib-path=/usr/lib:/usr/local/lib \
--with-bugurl=http://chakraos.org/bugtracker \
2012-11-14 04:02:56 +08:00
--enable-ld=default --enable-gold \
2013-04-27 02:24:28 +08:00
--enable-plugins --enable-threads \
2014-05-22 20:45:46 +08:00
--enable-shared \
--disable-werror
2010-03-13 23:25:19 +08:00
2011-10-08 08:02:42 +08:00
# check the host environment and makes sure all the necessary tools are available
make configure-host
2013-04-27 02:24:28 +08:00
make tooldir=/usr
2012-11-14 04:02:56 +08:00
}
check() {
cd ${srcdir}/binutils-build
2013-04-27 02:24:28 +08:00
2012-11-14 04:02:56 +08:00
# unset LDFLAGS as testsuite makes assumptions about which ones are active
# do not abort on errors - manually check log files
make LDFLAGS="" -k check || true
2010-05-16 23:08:55 +08:00
}
package() {
2012-11-14 04:02:56 +08:00
cd ${srcdir}/binutils-build
make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
2013-04-27 02:24:28 +08:00
# Remove unwanted files
2012-11-14 04:02:56 +08:00
rm ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
2013-04-27 02:24:28 +08:00
rm ${pkgdir}/usr/share/info/{configure,standards}.info
2013-04-27 02:24:28 +08:00
# No shared linking to these files outside binutils
2012-11-14 04:02:56 +08:00
rm ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
}