mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 13:04:43 +08:00
64 lines
1.8 KiB
Bash
64 lines
1.8 KiB
Bash
# maintainer: Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
pkgname=binutils
|
|
pkgver=2.25
|
|
pkgrel=1
|
|
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.20' '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})
|
|
md5sums=('d9f3303f802a5b6b0bb73a335ab89d66'
|
|
'SKIP')
|
|
|
|
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
|
|
|
|
mkdir ${srcdir}/binutils-build
|
|
}
|
|
|
|
build() {
|
|
cd ${srcdir}/binutils-build
|
|
|
|
${srcdir}/binutils-${pkgver}/configure --prefix=/usr \
|
|
--with-lib-path=/usr/lib:/usr/local/lib \
|
|
--with-bugurl=http://chakraos.org/bugtracker \
|
|
--enable-threads --enable-shared --with-pic \
|
|
--enable-ld=default --enable-gold --enable-plugins \
|
|
--disable-werror
|
|
|
|
# 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
|
|
}
|