summaryrefslogtreecommitdiffstats
path: root/binutils/Pkgfile
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/Pkgfile')
-rw-r--r--binutils/Pkgfile12
1 files changed, 9 insertions, 3 deletions
diff --git a/binutils/Pkgfile b/binutils/Pkgfile
index 533e6d2..952b5f9 100644
--- a/binutils/Pkgfile
+++ b/binutils/Pkgfile
@@ -4,6 +4,11 @@ maintainer="Lukc <lukc AT upyum DOT com>"
url="http://sources.redhat.com/binutils/"
depends=(zlib)
+if [[ -z ${CROSS_TARGET} ]]; then
+ name=binutils
+else
+ name=binutils-$CROSS_TARGET
+fi
name=binutils
version=2.20.1
release=1
@@ -14,13 +19,13 @@ build ()
sed -i '/^# RELEASE=y/s/#//' $name-$version/bfd/Makefile.in;
mkdir build;
cd build;
- if [[ $CROSS_ARCH ]]; then
- info "Building $name for $CROSS_ARCH."
+ if [[ -n $CROSS_TRIPLET ]]; then
+ info "Building $name for $CROSS_TRIPLET."
fi
../$name-$version/configure \
${CHOST:+--build=${CHOST}} \
${CTARGET:+--host=${CTARGET}} \
- ${CROSS_ARCH:+--target=${CROSS_ARCH}} \
+ ${CROSS_TRIPLET:+--target=${CROSS_TRIPLET}} \
--prefix=$prefix \
--mandir=$mandir \
--enable-shared \
@@ -28,6 +33,7 @@ build ()
make tooldir=$prefix;
make check;
make tooldir=$prefix DESTDIR=$PKG install;
+ mkdir -p $PKG$prefix/include; # Pour éviter des problèmes…
cp ../$name-$version/include/libiberty.h $PKG$prefix/include;
# FIXME
if [[ -e $PKG$prefix/lib/libfd.la ]]; then