Skip to content
Browse files

Add --build and --host configure options.

These configure options mimic standard autoconf options. The --build is
guessed by default, but it has no real meaning ATM. The --host defaults
to BUILD value, but can be overridden, to specify the platform Rubinius will
run on. This could be used for cross-compilation in the future. At now,
it helps to recognize vendor properly.
  • Loading branch information...
1 parent 01c7a3d commit f0ca61fd9601a3b95915b0ed31f77d635ebecb99 @voxik committed Sep 27, 2012
Showing with 13 additions and 1 deletion.
  1. +13 −1 configure
View
14 configure
@@ -25,6 +25,7 @@ class Configure
@defines = []
@config = File.join(root, "config.rb")
+ @build = nil
@host = nil
@cpu = nil
@vendor = nil
@@ -198,7 +199,8 @@ class Configure
end
def set_platform
- @host = `sh -c ./rakelib/config.guess`.chomp
+ @build ||= `sh -c ./rakelib/config.guess`.chomp
+ @host ||= @build
/([^-]+)-([^-]+)-(.*)/ =~ @host
@cpu, @vendor, @os = $1, $2, $3
@@ -334,6 +336,16 @@ class Configure
update_prebuilt @llvm_generic_prebuilt, true
end
+ o.doc "\n System types"
+
+ o.on "--build", "BUILD", "configure for building on BUILD [guessed]" do |build|
+ @build = build
+ end
+
+ o.on "--host", "HOST", "build programs to run on HOST [BUILD]" do |host|
+ @host = host
+ end
+
o.doc "\n System settings"
o.on "--with-include-dir", "DIR", "Add DIR to the default include search paths" do |dir|

0 comments on commit f0ca61f

Please sign in to comment.
Something went wrong with that request. Please try again.