mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 14:04:37 +08:00
71 lines
2.1 KiB
Bash
71 lines
2.1 KiB
Bash
# maintainer: Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
pkgname=binutils
|
|
pkgver=2.25.1
|
|
pkgrel=4
|
|
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}
|
|
binutils-e9c1bdad.patch)
|
|
md5sums=('ac493a78de4fee895961d025b7905be4'
|
|
'SKIP'
|
|
'eb3aceaab8ed26e06d505f82beb30f8f')
|
|
validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93') # Tristan Gingold
|
|
|
|
prepare() {
|
|
cd ${srcdir}/binutils-${pkgver}
|
|
|
|
|
|
# https://sourceware.org/bugzilla/show_bug.cgi?id=16992
|
|
patch -p1 -i ${srcdir}/binutils-e9c1bdad.patch
|
|
|
|
# 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 --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
|
|
}
|