aboutsummaryrefslogtreecommitdiff
path: root/cross
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-07-29 00:04:29 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-07-29 00:04:29 +0300
commitc12a4c1acaf44ba0c5e74e5723fa3d5ce72a90dd (patch)
tree7bed4abe5f5ed39517a62116b65b4c127ecadf3f /cross
parentb6cb7fd29e289cf01f2ef13ef002a658ccb2d9c8 (diff)
parentba92f2126c9bf995a11b07ee8fac771eea153333 (diff)
downloadmeson-c12a4c1acaf44ba0c5e74e5723fa3d5ce72a90dd.zip
meson-c12a4c1acaf44ba0c5e74e5723fa3d5ce72a90dd.tar.gz
meson-c12a4c1acaf44ba0c5e74e5723fa3d5ce72a90dd.tar.bz2
Merge pull request #214 from mesonbuild/cross
Merge cross compilation branch.
Diffstat (limited to 'cross')
-rw-r--r--cross/ubuntu-armhf.txt12
-rw-r--r--cross/ubuntu-faketarget.txt12
-rw-r--r--cross/ubuntu-mingw.txt16
3 files changed, 37 insertions, 3 deletions
diff --git a/cross/ubuntu-armhf.txt b/cross/ubuntu-armhf.txt
index 2d2ee62..73e3f67 100644
--- a/cross/ubuntu-armhf.txt
+++ b/cross/ubuntu-armhf.txt
@@ -1,11 +1,14 @@
-name = 'linux'
+[binaries]
+# we could set exe_wrapper = qemu-arm-static but to test the case
+# when cross compiled binaries can't be run we don't do that
c = '/usr/bin/arm-linux-gnueabihf-gcc'
cpp = '/usr/bin/arm-linux-gnueabihf-g++'
ar = '/usr/arm-linux-gnueabihf/bin/ar'
strip = '/usr/arm-linux-gnueabihf/bin/strip'
+pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
+[properties]
root = '/usr/arm-linux-gnueabihf'
-pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
sizeof_int = 4
sizeof_wchar_t = 4
@@ -17,3 +20,8 @@ alignment_double = 4 # Don't know if this is correct...
has_function_printf = true
has_function_hfkerhisadf = false
+
+[host_machine]
+name = 'linux'
+cpu = 'arm'
+endian = 'little'
diff --git a/cross/ubuntu-faketarget.txt b/cross/ubuntu-faketarget.txt
new file mode 100644
index 0000000..1ea0977
--- /dev/null
+++ b/cross/ubuntu-faketarget.txt
@@ -0,0 +1,12 @@
+# This is a setup for compiling a program that runs natively
+# but produces output that runs on a different platform.
+# That is either a cross compiler or something like binutils.
+
+# We don't need to specify any properties or compilers,
+# for we use the native ones and can run the resulting
+# binaries directly.
+
+[target_machine]
+name = 'linux'
+cpu = 'mips'
+endian = 'little'
diff --git a/cross/ubuntu-mingw.txt b/cross/ubuntu-mingw.txt
index 76a15a8..2f2fa34 100644
--- a/cross/ubuntu-mingw.txt
+++ b/cross/ubuntu-mingw.txt
@@ -1,8 +1,22 @@
-name = 'windows'
+# Something crazy: compiling on Linux a crosscompiler that
+# runs on Windows and generates code for OSX.
+
+[binaries]
exe_wrapper = 'wine' # A command used to run generated executables.
c = '/usr/bin/i686-w64-mingw32-gcc'
cpp = '/usr/bin/i686-w64-mingw32-g++'
ar = '/usr/bin/i686-w64-mingw32-ar'
strip = '/usr/bin/i686-w64-mingw32-strip'
+[properties]
root = '/usr/i686-w64-mingw32'
+
+[host_machine]
+name = 'windows'
+cpu = 'x86'
+endian = 'little'
+
+[target_machine]
+name = 'darwin'
+cpu = 'arm'
+endian = 'little'