summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2004-10-21 20:47:30 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2004-10-21 20:47:30 +0000
commitb6022135dfdcbee7f0697274a23e7ab05b76ddaf (patch)
tree0317949cd990605f93a9c7f4919333f99f60c6a0 /gnu/usr.bin/binutils
parente15b1a7cb858f642962f753d8212f742b9a1ed11 (diff)
Move the cross glue from the root makefile to the toolchain's,
allowing bulding cross-tools with new binutils and gcc3. ok drahn@ brad@ espie@
Diffstat (limited to 'gnu/usr.bin/binutils')
-rw-r--r--gnu/usr.bin/binutils/Makefile.bsd-wrapper12
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils/Makefile.bsd-wrapper b/gnu/usr.bin/binutils/Makefile.bsd-wrapper
index 80c33cf1646..dd719dcaf1e 100644
--- a/gnu/usr.bin/binutils/Makefile.bsd-wrapper
+++ b/gnu/usr.bin/binutils/Makefile.bsd-wrapper
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.58 2004/06/01 23:01:44 drahn Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.59 2004/10/21 20:47:29 grange Exp $
NEW_BINUTILS=alpha arm hppa i386 mips powerpc sparc sparc64 amd64
@@ -65,6 +65,13 @@ CONFIGURE_HOST_MODULES=${CONF_SUBDIRS:S/^/configure-/g}
ALL_HOST_MODULES=${SUBDIRS:S/^/all-/g}
INSTALL_MODULES=${INST_SUBDIRS:S/^/install-/g}
+# cross-compilation
+.if defined(TARGET_ARCH)
+CONFIGTARGET=--target=${TARGET_ARCH}-unknown-openbsd${OSREV}
+.else
+CONFIGTARGET=
+.endif
+
all: config.status
SUBDIRS='${SUBDIRS}' \
CONFIGURE_HOST_MODULES='${CONFIGURE_HOST_MODULES}' \
@@ -94,7 +101,8 @@ do-config: .USE
PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
sh ${.CURDIR}/configure --prefix=${PREFIX} \
--infodir='$${prefix}/share/info' \
- --disable-nls --disable-gdbtk --disable-commonbfdlib ${CF}
+ --disable-nls --disable-gdbtk --disable-commonbfdlib ${CF} \
+ ${CONFIGTARGET}
cd ${.OBJDIR} && \
sed -e 's,SUBDIRS *=,SUBDIRS ?=,' <Makefile >Makefile.tmp && \
mv -f Makefile.tmp Makefile