aboutsummaryrefslogtreecommitdiff
path: root/Configure.pl
diff options
context:
space:
mode:
authorJens Rehsack <sno@netbsd.org>2015-10-22 21:21:42 +0200
committerJens Rehsack <sno@netbsd.org>2015-11-22 14:40:10 +0100
commit2a70ed792f883b8340099d74b2f325b2ca01616b (patch)
tree7d8d8fd915eb7fe15b1a2b49b446fb5096ba1e91 /Configure.pl
parent60378f2972f175710d33615a51ba51bc59a344ff (diff)
introduce support for sdkroot and sysroot to support cross-builds
To allow building for another location rather the final install prefix, regardless whether chroot based builds, cross-compile or canadian cross sdk is the goal, realize the difference between prefix, the sdk-root and the system root for final target. Signed-off-by: Jens Rehsack <sno@netbsd.org>
Diffstat (limited to 'Configure.pl')
-rw-r--r--Configure.pl12
1 files changed, 9 insertions, 3 deletions
diff --git a/Configure.pl b/Configure.pl
index 29ee0b8..889da70 100644
--- a/Configure.pl
+++ b/Configure.pl
@@ -32,6 +32,7 @@ MAIN: {
my %options;
GetOptions(\%options, 'help!', 'prefix=s',
+ 'sysroot=s', 'sdkroot=s',
'backends=s', 'no-clean!',
'gen-nqp:s', 'gen-moar:s',
'make-install!', 'makefile-timing!',
@@ -59,9 +60,9 @@ MAIN: {
}
unless (defined $options{prefix}) {
- my $dir = getcwd;
- print "ATTENTION: no --prefix supplied, building and installing to $dir/install\n";
- $options{prefix} = 'install';
+ my $default = defined($options{sysroot}) ? '/usr' : File::Spec->catdir(getcwd, 'install');
+ print "ATTENTION: no --prefix supplied, building and installing to $default\n";
+ $options{prefix} = $default;
}
$options{prefix} = File::Spec->rel2abs($options{prefix});
@@ -148,6 +149,8 @@ MAIN: {
}
$config{prefix} = $prefix;
+ $config{sdkroot} = $options{sdkroot};
+ $config{sysroot} = $options{sysroot};
$config{slash} = $slash;
$config{'makefile-timing'} = $options{'makefile-timing'};
$config{'stagestats'} = '--stagestats' if $options{'makefile-timing'};
@@ -263,6 +266,9 @@ Configure.pl - $lang Configure
General Options:
--help Show this text
--prefix=dir Install files in dir; also look for executables there
+ --sdkroot=dir When given, use for searching build tools here, e.g.
+ nqp, java etc.
+ --sysroot=dir When given, use for searching runtime components here
--backends=jvm,moar
Which backend(s) to use
--gen-moar[=branch]