mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 02:14:37 +08:00
63 lines
1.9 KiB
Bash
63 lines
1.9 KiB
Bash
pkgname=binutils
|
|
pkgver=2.27
|
|
pkgrel=3
|
|
pkgdesc="A set of programs to assemble and manipulate binary and object files"
|
|
arch=('x86_64')
|
|
url="http://www.gnu.org/software/binutils/"
|
|
license=('GPL')
|
|
groups=('base-devel')
|
|
depends=('glibc>=2.24' 'zlib')
|
|
checkdepends=('dejagnu' 'bc')
|
|
conflicts=('binutils-multilib')
|
|
replaces=('binutils-multilib')
|
|
options=('!distcc' '!ccache' 'staticlibs')
|
|
install=binutils.install
|
|
#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')
|
|
validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93') # Tristan Gingold
|
|
|
|
prepare() {
|
|
cd ${srcdir}/binutils-gdb
|
|
|
|
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
|
|
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
|
|
|
|
mkdir ${srcdir}/binutils-build
|
|
}
|
|
|
|
build() {
|
|
cd ${srcdir}/binutils-build
|
|
|
|
${srcdir}/binutils-gdb/configure --prefix=/usr \
|
|
--with-lib-path=/usr/lib:/usr/local/lib \
|
|
--with-bugurl=http://chakralinux.org/bugtracker \
|
|
--enable-threads --enable-shared --with-pic \
|
|
--enable-ld=default --enable-gold --enable-plugins \
|
|
--disable-werror --disable-gdb # we have an extra gdb package, so we do not build gdb from binutils
|
|
|
|
# check the host environment and makes sure all the necessary tools are available
|
|
make configure-host
|
|
make tooldir=/usr
|
|
}
|
|
|
|
check() {
|
|
cd ${srcdir}/binutils-build
|
|
|
|
# unset LDFLAGS as testsuite makes assumptions about which ones are active
|
|
# ignore failures in gold testsuite...
|
|
make -k LDFLAGS="" check || true
|
|
}
|
|
|
|
package() {
|
|
cd ${srcdir}/binutils-build
|
|
make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
|
|
|
|
# Remove unwanted files
|
|
rm ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
|
|
|
|
# No shared linking to these files outside binutils
|
|
rm ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
|
|
}
|