summaryrefslogtreecommitdiff
path: root/mk/buildlink3
diff options
context:
space:
mode:
authorjoerg <joerg>2007-08-02 18:19:31 +0000
committerjoerg <joerg>2007-08-02 18:19:31 +0000
commit237e684f9088ac28f03cbfff58e69bbedf2b596b (patch)
tree7eeb466964543e6a95e208d441bf203db2c07e58 /mk/buildlink3
parentdf71bfa7535ad4cb530714e0bb4ea105956a0d47 (diff)
downloadpkgsrc-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/buildlink3')
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk
index baa1e7ac354..0c66ba8350d 100644
--- a/mk/buildlink3/bsd.buildlink3.mk
+++ b/mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.196 2007/07/27 13:15:41 joerg Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.197 2007/08/02 18:19:31 joerg Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -600,7 +600,7 @@ ${_BLNK_COOKIE.${_pkg_}}:
cd ${BUILDLINK_PREFIX.${_pkg_}}; \
${_BLNK_FILES_CMD.${_pkg_}} | \
while read file; do \
- src="${BUILDLINK_PREFIX.${_pkg_}}/$$file"; \
+ src="${_CROSS_DESTDIR}${BUILDLINK_PREFIX.${_pkg_}}/$$file"; \
if [ ! -f "$$src" ]; then \
msg="$$src: not found"; \
else \