diff options
author | joerg <joerg> | 2007-08-02 18:19:31 +0000 |
---|---|---|
committer | joerg <joerg> | 2007-08-02 18:19:31 +0000 |
commit | 237e684f9088ac28f03cbfff58e69bbedf2b596b (patch) | |
tree | 7eeb466964543e6a95e208d441bf203db2c07e58 /mk/install/bin-install.mk | |
parent | df71bfa7535ad4cb530714e0bb4ea105956a0d47 (diff) | |
download | pkgsrc-237e684f9088ac28f03cbfff58e69bbedf2b596b.tar.gz |
Add core of the infrastructure support for cross-compilation.
- USE_CROSS_COMPILATION activates it, CROSS_DESTDIR specifies root of
the target filesystem
- derive _CROSS_DESTDIR from CROSS_DESTDIR or MAKEOBJDIR
- buildlink3.mk prefixes the files to symlink with _CROSS_DESTDIR
- compiler/gcc.mk knows about the target prefix (e.g. i386--netbsdelf)
- PKG_DBDIR is prefixed with _CROSS_DESTDIR
- package-install and bin-install are not called with su
- install and strip are redirected to the tool version
- links for the target specific ar, as, ld, nm, objdump, ranlib and
strip are added
- compiler wrapper detect if linking is requested or not
- special command sinks for CPP and CC/CXX add the cross-compile magic:
- modify include dirs to get the target /usr/include
- modify linker dirs and runpath to use target /usr/lib at link time,
but keep correct rpath entries
Supported-by: Google SoC 2007
Basic tests by he@ on Sparc. Review from jlam@.
Diffstat (limited to 'mk/install/bin-install.mk')
-rw-r--r-- | mk/install/bin-install.mk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/install/bin-install.mk b/mk/install/bin-install.mk index f617359efbd..83eb54a58a5 100644 --- a/mk/install/bin-install.mk +++ b/mk/install/bin-install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bin-install.mk,v 1.9 2007/03/09 03:28:58 rillig Exp $ +# $NetBSD: bin-install.mk,v 1.10 2007/08/02 18:19:32 joerg Exp $ # # This file provides the following targets: @@ -36,7 +36,11 @@ bin-install: \ do-bin-install \ do-bin-install-from-source +. if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) +do-bin-install: su-do-bin-install +. else do-bin-install: su-target +. endif @${PHASE_MSG} "Binary install for "${PKGNAME_REQD:U${PKGNAME}:Q} su-do-bin-install: \ |