summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-08-21 15:25:46 +0900
committerGitHub <[email protected]>2021-08-21 15:25:46 +0900
commit4ea80913c27264df0c7088367109c5a0678879f1 (patch)
treef6511377b785d62284a4fdb4b9aeec84e3adeb9c
parentca295a2c237dab1a1e69b7599a2fa66af466b7d3 (diff)
parent7f290bebaf6ee86cf6ef6d7614f6ed8d8f1f6e1f (diff)
downloadmruby-4ea80913c27264df0c7088367109c5a0678879f1.tar.gz
mruby-4ea80913c27264df0c7088367109c5a0678879f1.zip
Merge pull request #5533 from dantecatalfamo/serenity-32bit-crossbuild
Add SerenityOS crossbuild
-rw-r--r--build_config/serenity.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/build_config/serenity.rb b/build_config/serenity.rb
new file mode 100644
index 000000000..6704d2673
--- /dev/null
+++ b/build_config/serenity.rb
@@ -0,0 +1,26 @@
+# Cross compiling configuration for SerenityOS
+# Graphical Unix-like operating system for x86 computers.
+# https://github.com/SerenityOS/serenity
+#
+# Should be built using the SerenityOS Ports system
+# https://github.com/SerenityOS/serenity/tree/master/Ports
+#
+# As of 2021/08/20, SERENITY_ARCH is defined in the SerenityOS Ports
+# build script to always be either "i686" or "x86_64"
+
+MRuby::CrossBuild.new('serenity') do |conf|
+ conf.toolchain :gcc
+
+ conf.archiver.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-ar"
+ conf.linker.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-g++"
+
+ conf.cxx.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-g++"
+ conf.cxx.defines << (ENV['SERENITY_ARCH'].include?('64') ? 'MRB_64BIT' : 'MRB_32BIT')
+
+ conf.cc.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-gcc"
+ conf.cc.defines << (ENV['SERENITY_ARCH'].include?('64') ? 'MRB_64BIT' : 'MRB_32BIT')
+
+ conf.gembox 'full-core'
+
+ conf.test_runner.command = 'env'
+end