binutils: make ld a symlink to ld.bfd to allow easy switching to gold.

This commit is contained in:
Juan RP 2013-12-02 10:51:36 +01:00
parent 3738b06462
commit 870703f9e3
1 changed files with 5 additions and 9 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'binutils' # Template file for 'binutils'
pkgname=binutils pkgname=binutils
version=2.23.52.0.2 version=2.23.52.0.2
revision=6 revision=7
short_desc="GNU binary utilities" short_desc="GNU binary utilities"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.gnu.org/software/binutils/" homepage="http://www.gnu.org/software/binutils/"
@ -15,11 +15,7 @@ if [ "$CHROOT_READY" ]; then
hostmakedepends="flex perl" hostmakedepends="flex perl"
fi fi
makedepends="zlib-devel" makedepends="libfl-devel zlib-devel"
if [ "$CROSS_BUILD" ]; then
makedepends+=" libfl-devel"
fi
pre_configure() { pre_configure() {
# Drop bashism! # Drop bashism!
@ -70,9 +66,9 @@ do_install() {
fi fi
make DESTDIR=${DESTDIR} tooldir=/usr install make DESTDIR=${DESTDIR} tooldir=/usr install
# Remove ld.bfd (hardlink) and make a symlink. # Remove ld (hardlink) and make a symlink to ld.bfd.
rm -f ${DESTDIR}/usr/bin/ld.bfd rm -f ${DESTDIR}/usr/bin/ld
ln -sfr ${DESTDIR}/usr/bin/ld ${DESTDIR}/usr/bin/ld.bfd ln -sfr ${DESTDIR}/usr/bin/ld.bfd ${DESTDIR}/usr/bin/ld
# Add some useful headers # Add some useful headers
install -m644 include/libiberty.h ${DESTDIR}/usr/include install -m644 include/libiberty.h ${DESTDIR}/usr/include