From cd325ea5cdb6a62cd3c900545864d767e59a1f5f Mon Sep 17 00:00:00 2001 From: abs Date: Mon, 29 Jan 2001 10:25:07 +0000 Subject: Add a 'cross-env' script which helps set up the environment for cross compiling or similar. Based on various postings and notes from the site. --- cross/COMMON/cross.mk | 4 +-- cross/binutils/Makefile | 12 +++++++-- cross/binutils/files/cross-env | 61 ++++++++++++++++++++++++++++++++++++++++++ cross/binutils/pkg/PLIST | 5 +++- 4 files changed, 77 insertions(+), 5 deletions(-) create mode 100755 cross/binutils/files/cross-env (limited to 'cross') diff --git a/cross/COMMON/cross.mk b/cross/COMMON/cross.mk index 26d3c666aec..83388f4243a 100644 --- a/cross/COMMON/cross.mk +++ b/cross/COMMON/cross.mk @@ -1,4 +1,4 @@ -# $NetBSD: cross.mk,v 1.17 2001/01/09 13:24:46 itojun Exp $ +# $NetBSD: cross.mk,v 1.18 2001/01/29 10:25:07 abs Exp $ # Shared definitions for building a cross-compile environment. @@ -30,7 +30,7 @@ BINUTILS_WRKSRC= ${WRKDIR}/${BINUTILS_DISTNAME} CROSS_DISTFILES+= ${BINUTILS_DISTNAME}.tar.gz MASTER_SITES+= ${MASTER_SITE_GNU:=binutils/} CONFIGURE_ARGS+= --with-gnu-as --with-gnu-ld -DEPENDS+= cross-binutils-2.9.1.1:../../cross/binutils +DEPENDS+= cross-binutils>=2.9.1.1:../../cross/binutils PLIST_PRE+= ${COMMON_DIR}/PLIST-binutils AS_FOR_TARGET= ${BINUTILS_WRKSRC}/gas/as-new diff --git a/cross/binutils/Makefile b/cross/binutils/Makefile index 5f1b96246a3..6ad6e82cccc 100644 --- a/cross/binutils/Makefile +++ b/cross/binutils/Makefile @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.21 2001/01/24 12:13:26 tsutsui Exp $ +# $NetBSD: Makefile,v 1.22 2001/01/29 10:25:07 abs Exp $ # # GNU binutils configured to hold `as many targets as the cross system is # capable of using'. Configures and builds everything except gas, which # gets built at cross-pkg build time (it's target specific). DISTNAME= binutils-2.9.1 -PKGNAME= cross-binutils-2.9.1.1 +PKGNAME= cross-binutils-2.9.1.2 CATEGORIES= cross lang MASTER_SITES= ${MASTER_SITE_GNU:=binutils/} @@ -24,6 +24,8 @@ CONFIGURE_ARGS+= --enable-targets=${ENABLE_TARGETS_LIST} \ MAKE_ARGS+= CFLAGS="${CFLAGS}" ALL_TARGET= all-binutils all-ld +PLIST_SUBST= LOCALBASE=${LOCALBASE} + BINDIR= ${PREFIX}/libexec/binutils # due to /bin/sh restriction, we can accomodate no more archs @@ -67,6 +69,12 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/include/ansidecl.h ${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/bfd/bfd.h ${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/ld/ldscripts/* ${PREFIX}/lib/ldscripts + ${INSTALL_SCRIPT} ${WRKSRC}/cross-env ${BINDIR} + ${LN} -s ${BINDIR}/cross-env ${LOCALBASE}/bin/cross-env + +post-build: + ${SED} -e 's|@@PREFIX@@|${PREFIX}|' < ${FILESDIR}/cross-env > \ + ${WRKSRC}/cross-env .include "../../mk/bsd.pkg.mk" diff --git a/cross/binutils/files/cross-env b/cross/binutils/files/cross-env new file mode 100755 index 00000000000..6dd4ced2152 --- /dev/null +++ b/cross/binutils/files/cross-env @@ -0,0 +1,61 @@ +#! /bin/sh +# $NetBSD: cross-env,v 1.1 2001/01/29 10:25:07 abs Exp $ + +PREFIX=@@PREFIX@@ + +if [ -z "$CROSS_PKG" ] ;then + cat < /dev/null || true libexec/binutils/addr2line libexec/binutils/ar +libexec/binutils/cross-env libexec/binutils/dlltool libexec/binutils/ld libexec/binutils/nlmconv @@ -129,3 +130,5 @@ libexec/binutils/strings libexec/binutils/strip libexec/binutils/windres @dirrm libexec/binutils +@exec ln -s %D/libexec/binutils/cross-env ${LOCALBASE}/bin/cross-env +@unexec rm ${LOCALBASE}/bin/cross-env -- cgit v1.2.3