2010-11-12 06:49:29 +08:00
|
|
|
|
2010-03-13 23:25:19 +08:00
|
|
|
pkgname=binutils
|
2017-01-11 12:23:14 +08:00
|
|
|
pkgver=2.27
|
2017-01-17 04:12:06 +08:00
|
|
|
pkgrel=3
|
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')
|
2014-09-16 19:53:45 +08:00
|
|
|
depends=('glibc>=2.20' 'zlib')
|
2012-11-14 04:02:56 +08:00
|
|
|
checkdepends=('dejagnu' 'bc')
|
2014-06-02 02:46:11 +08:00
|
|
|
conflicts=('binutils-multilib')
|
|
|
|
replaces=('binutils-multilib')
|
2015-01-20 06:14:12 +08:00
|
|
|
options=('!distcc' '!ccache' 'staticlibs')
|
2012-11-14 04:02:56 +08:00
|
|
|
install=binutils.install
|
2017-01-11 12:23:14 +08:00
|
|
|
#source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2{,.sig}
|
|
|
|
# binutils-e9c1bdad.patch)
|
|
|
|
source=(git://sourceware.org/git/binutils-gdb.git#commit=2870b1ba)
|
|
|
|
md5sums=('SKIP')
|
2015-08-22 07:37:41 +08:00
|
|
|
validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93') # Tristan Gingold
|
2013-04-27 02:24:28 +08:00
|
|
|
|
|
|
|
prepare() {
|
2017-01-11 12:23:14 +08:00
|
|
|
cd ${srcdir}/binutils-gdb
|
2013-04-27 02:24:28 +08:00
|
|
|
|
|
|
|
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
|
|
|
|
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
|
|
|
|
|
|
|
|
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
|
2011-04-12 02:22:13 +08:00
|
|
|
|
2017-01-11 12:23:14 +08:00
|
|
|
${srcdir}/binutils-gdb/configure --prefix=/usr \
|
2012-11-14 04:02:56 +08:00
|
|
|
--with-lib-path=/usr/lib:/usr/local/lib \
|
2017-01-11 12:23:14 +08:00
|
|
|
--with-bugurl=http://chakralinux.org/bugtracker \
|
2014-09-16 19:53:45 +08:00
|
|
|
--enable-threads --enable-shared --with-pic \
|
|
|
|
--enable-ld=default --enable-gold --enable-plugins \
|
2015-08-22 04:42:35 +08:00
|
|
|
--disable-werror --disable-gdb # we have an extra gdb package, so we do not build gdb from binutils
|
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
|
2011-04-12 02:22:13 +08:00
|
|
|
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
|
2014-09-16 19:53:45 +08:00
|
|
|
# ignore failures in gold testsuite...
|
2015-01-20 06:14:12 +08:00
|
|
|
make -k LDFLAGS="" 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
|
2014-09-16 19:53:45 +08:00
|
|
|
|
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}*
|
2012-01-10 05:25:47 +08:00
|
|
|
|
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
|
|
|
|
}
|