summaryrefslogtreecommitdiff
path: root/mk/wrapper/arg-source
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-08-02 18:19:31 +0000
committerjoerg <joerg@pkgsrc.org>2007-08-02 18:19:31 +0000
commit005620851f14ccfbf69fb7ccaffc6f6e6d0f968a (patch)
tree7eeb466964543e6a95e208d441bf203db2c07e58 /mk/wrapper/arg-source
parent6989e7a043e210e423d5d0252d903c71166a1096 (diff)
downloadpkgsrc-005620851f14ccfbf69fb7ccaffc6f6e6d0f968a.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/wrapper/arg-source')
-rw-r--r--mk/wrapper/arg-source10
1 files changed, 9 insertions, 1 deletions
diff --git a/mk/wrapper/arg-source b/mk/wrapper/arg-source
index bf4ce639fcb..00d840bb304 100644
--- a/mk/wrapper/arg-source
+++ b/mk/wrapper/arg-source
@@ -1,4 +1,4 @@
-# $NetBSD: arg-source,v 1.12 2007/02/23 00:31:29 rillig Exp $
+# $NetBSD: arg-source,v 1.13 2007/08/02 18:19:32 joerg Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -160,6 +160,14 @@ while $test $# -gt 0; do
esac
;;
##############################################################
+ # Remember whether running the linker is desired.
+ ##############################################################
+ -c|-S|-E)
+ dont_link=yes
+ append_queue argbuf "$arg"
+ $debug_log $wrapperlog " (arg-source) push: $arg"
+ ;;
+ ##############################################################
# For everything else, just queue it up.
##############################################################
*)