2011-01-14 23:54:01 +08:00
|
|
|
# Lib32 Packages for Chakra, part of chakra-project.org
|
|
|
|
#
|
|
|
|
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
|
|
|
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
|
|
|
|
|
|
|
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
|
|
|
|
|
|
|
|
_pkgname=binutils
|
2011-10-16 21:19:12 +08:00
|
|
|
pkgname=binutils-multilib
|
|
|
|
pkgver=2.21.1
|
|
|
|
pkgrel=1
|
|
|
|
_date=20110627
|
2011-01-14 23:54:01 +08:00
|
|
|
pkgdesc="A set of programs to assemble and manipulate binary and object files for multilib"
|
|
|
|
arch=('x86_64')
|
|
|
|
url="http://www.gnu.org/software/binutils/"
|
|
|
|
license=('GPL')
|
2011-10-16 21:19:12 +08:00
|
|
|
groups=('multilib-devel')
|
2011-01-14 23:54:01 +08:00
|
|
|
provides=("binutils=$pkgver-$pkgrel")
|
|
|
|
conflicts=('binutils')
|
2011-10-16 21:19:12 +08:00
|
|
|
depends=('glibc>=2.14' 'zlib')
|
|
|
|
makedepends=('dejagnu' 'gcc-multilib') # Make sure we compile this with gcc-multilib
|
2011-01-14 23:54:01 +08:00
|
|
|
options=('!libtool' '!distcc' '!ccache')
|
|
|
|
install=binutils.install
|
2011-10-16 21:19:12 +08:00
|
|
|
source=(http://chakra-project.org/sources/${_pkgname}/${_pkgname}-${pkgver}_${_date}.tar.bz2)
|
|
|
|
md5sums=('2face559e80d649ba148e42bb2d1fb0f')
|
2011-01-14 23:54:01 +08:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd ${srcdir}
|
2011-05-21 23:53:04 +08:00
|
|
|
mkdir binutils-build && cd binutils-build
|
|
|
|
|
|
|
|
${srcdir}/binutils/configure --prefix=/usr \
|
|
|
|
--enable-ld=default --enable-gold \
|
|
|
|
--enable-plugins --enable-threads \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-64-bit-bfd --enable-multilib
|
2011-01-14 23:54:01 +08:00
|
|
|
|
2011-10-16 21:19:12 +08:00
|
|
|
# check the host environment and makes sure all the necessary tools are available
|
2011-05-21 23:53:04 +08:00
|
|
|
make configure-host
|
2011-01-14 23:54:01 +08:00
|
|
|
|
2011-05-21 23:53:04 +08:00
|
|
|
make tooldir=${pkgdir}/usr
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd ${srcdir}/binutils-build
|
|
|
|
|
|
|
|
# do not abort on errors - manually check log files
|
|
|
|
make -k -j1 check || true
|
2011-01-14 23:54:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2011-05-21 23:53:04 +08:00
|
|
|
cd ${srcdir}/binutils-build
|
2011-01-14 23:54:01 +08:00
|
|
|
make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
|
2011-10-16 21:19:12 +08:00
|
|
|
|
2011-05-21 23:53:04 +08:00
|
|
|
# Add some useful headers
|
|
|
|
install -m644 ${srcdir}/binutils/include/libiberty.h ${pkgdir}/usr/include
|
|
|
|
install -m644 ${srcdir}/binutils/include/demangle.h ${pkgdir}/usr/include
|
2011-01-14 23:54:01 +08:00
|
|
|
|
|
|
|
# Rebuild libiberty.a with -fPIC
|
|
|
|
make -C libiberty clean
|
|
|
|
make CFLAGS="$CFLAGS -fPIC" -C libiberty
|
|
|
|
install -m644 libiberty/libiberty.a ${pkgdir}/usr/lib
|
|
|
|
|
|
|
|
# Rebuild libbfd.a with -fPIC
|
|
|
|
make -C bfd clean
|
|
|
|
# hidden visability prevent 3rd party shared libraries exporting bfd non-stable API
|
|
|
|
make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd
|
|
|
|
install -m644 bfd/libbfd.a ${pkgdir}/usr/lib
|
|
|
|
|
2011-05-21 23:53:04 +08:00
|
|
|
# Remove Windows/Novell specific man pages
|
2011-01-14 23:54:01 +08:00
|
|
|
rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
|
|
|
|
|
2011-05-21 23:53:04 +08:00
|
|
|
# Remove these symlinks, they are not ABI stable.
|
2011-01-14 23:54:01 +08:00
|
|
|
# Programs should compile static to the .a file.
|
|
|
|
rm -f ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
|
|
|
|
echo "INPUT ( /usr/lib/libbfd.a -liberty -lz )" >${pkgdir}/usr/lib/libbfd.so
|
|
|
|
echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" >${pkgdir}/usr/lib/libopcodes.so
|
|
|
|
}
|