summaryrefslogtreecommitdiffstats
path: root/cross
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cross/arm64cl.txt18
-rw-r--r--cross/armcc.txt20
-rw-r--r--cross/armclang-linux.txt34
-rw-r--r--cross/armclang.txt20
-rw-r--r--cross/c2000.txt28
-rw-r--r--cross/ccomp-armv7a.txt13
-rw-r--r--cross/ccrx.txt22
-rw-r--r--cross/iphone.txt30
-rw-r--r--cross/linux-mingw-w64-32bit.json7
-rw-r--r--cross/linux-mingw-w64-32bit.txt31
-rw-r--r--cross/linux-mingw-w64-64bit.json7
-rw-r--r--cross/linux-mingw-w64-64bit.txt30
-rw-r--r--cross/msp430.txt25
-rw-r--r--cross/none.txt19
-rw-r--r--cross/ownstdlib.txt13
-rw-r--r--cross/tvos.txt27
-rw-r--r--cross/ubuntu-armhf.json5
-rw-r--r--cross/ubuntu-armhf.txt29
-rw-r--r--cross/ubuntu-faketarget.txt13
-rw-r--r--cross/wasm.txt17
-rw-r--r--cross/xc16.txt26
21 files changed, 434 insertions, 0 deletions
diff --git a/cross/arm64cl.txt b/cross/arm64cl.txt
new file mode 100644
index 0000000..aa7398d
--- /dev/null
+++ b/cross/arm64cl.txt
@@ -0,0 +1,18 @@
+[binaries]
+c = 'cl'
+cpp = 'cl'
+fc = 'false'
+ar = 'lib'
+windres = 'rc'
+
+[built-in options]
+c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP']
+c_link_args = ['-APPCONTAINER', 'WindowsApp.lib']
+cpp_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP']
+cpp_link_args = ['-APPCONTAINER', 'WindowsApp.lib']
+
+[host_machine]
+system = 'windows'
+cpu_family = 'aarch64'
+cpu = 'armv8'
+endian = 'little'
diff --git a/cross/armcc.txt b/cross/armcc.txt
new file mode 100644
index 0000000..ae65c9e
--- /dev/null
+++ b/cross/armcc.txt
@@ -0,0 +1,20 @@
+# This file assumes that path to the arm compiler toolchain is added
+# to the environment(PATH) variable, so that Meson can find
+# the armcc, armlink and armar while building.
+[binaries]
+c = 'armcc'
+cpp = 'armcc'
+ar = 'armar'
+strip = 'armar'
+
+[built-in options]
+# The '--cpu' option with the appropriate target type should be mentioned
+# to cross compile c/c++ code with armcc,.
+c_args = ['--cpu=Cortex-M0plus']
+cpp_args = ['--cpu=Cortex-M0plus']
+
+[host_machine]
+system = 'bare metal' # Update with your system name - bare metal/OS.
+cpu_family = 'arm'
+cpu = 'Cortex-M0+'
+endian = 'little'
diff --git a/cross/armclang-linux.txt b/cross/armclang-linux.txt
new file mode 100644
index 0000000..10f6fa4
--- /dev/null
+++ b/cross/armclang-linux.txt
@@ -0,0 +1,34 @@
+# Using ARM compilers from Linux command line is tricky and
+# not really well documented because they want you to use
+# their IDE instead.
+#
+# First you need to do the full install with the IDE and set
+# up license files et al. This may be possible from the command
+# line.
+#
+# Then you need to do the following:
+#
+# Select toolchain by running /opt/arm/developmentstudio-2019.0/bin/select_default_toolchain
+# Armcc is only available in toolchain version 5.
+# Armclang is only available in toolchain version 6.
+# Start shell with /opt/arm/developmentstudio-2019.0/bin/suite_exec zsh
+# Now the compilers will work.
+
+[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 = '/opt/arm/developmentstudio-2019.0/sw/ARMCompiler6.12/bin/armclang'
+#c = '/opt/arm/developmentstudio-2019.0/sw/ARMCompiler5.06u6/bin/armcc'
+#cpp = '/usr/bin/arm-linux-gnueabihf-g++'
+ar = '/opt/arm/developmentstudio-2019.0/sw/ARMCompiler6.12/bin/armar'
+#strip = '/usr/arm-linux-gnueabihf/bin/strip'
+#pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
+
+[built-in options]
+c_args = ['--target=aarch64-arm-none-eabi']
+
+[host_machine]
+system = 'baremetal'
+cpu_family = 'arm'
+cpu = 'armv7' # Not sure if correct.
+endian = 'little'
diff --git a/cross/armclang.txt b/cross/armclang.txt
new file mode 100644
index 0000000..6146e0d
--- /dev/null
+++ b/cross/armclang.txt
@@ -0,0 +1,20 @@
+# This file assumes that path to the arm compiler toolchain is added
+# to the environment(PATH) variable, so that Meson can find
+# the armclang, armlink and armar while building.
+[binaries]
+c = 'armclang'
+cpp = 'armclang'
+ar = 'armar'
+strip = 'armar'
+
+[built-in options]
+# The '--target', '-mcpu' options with the appropriate values should be mentioned
+# to cross compile c/c++ code with armclang.
+c_args = ['--target=arm-arm-none-eabi', '-mcpu=cortex-m0plus']
+cpp_args = ['--target=arm-arm-none-eabi', '-mcpu=cortex-m0plus']
+
+[host_machine]
+system = 'bare metal' # Update with your system name - bare metal/OS.
+cpu_family = 'arm'
+cpu = 'Cortex-M0+'
+endian = 'little'
diff --git a/cross/c2000.txt b/cross/c2000.txt
new file mode 100644
index 0000000..61c0310
--- /dev/null
+++ b/cross/c2000.txt
@@ -0,0 +1,28 @@
+# This file assumes that path to the Texas Instruments C20000 toolchain is added
+# to the environment(PATH) variable, so that Meson can find
+# cl2000 and ar2000 while building.
+[binaries]
+c = 'cl2000'
+ar = 'ar2000'
+strip = 'cl2000'
+
+[host_machine]
+system = 'bare metal'
+cpu_family = 'c2000'
+cpu = 'c28x'
+endian = 'little'
+
+[built-in options]
+c_args = [
+ '-v28',
+ '-ml',
+ '-mt']
+c_link_args = [
+ '-z',
+ '--rom_model',
+ '\f28004x_flash.cmd']
+cpp_args = []
+cpp_link_args = []
+
+[properties]
+needs_exe_wrapper = true
diff --git a/cross/ccomp-armv7a.txt b/cross/ccomp-armv7a.txt
new file mode 100644
index 0000000..af66ed2
--- /dev/null
+++ b/cross/ccomp-armv7a.txt
@@ -0,0 +1,13 @@
+[binaries]
+c = 'ccomp'
+ar = 'ccomp'
+strip = 'strip'
+
+[built-in options]
+c_args = ['-target', 'armv7a-eabi', '-fall']
+
+[host_machine]
+system = 'bare metal' # Update with your system name - bare metal/OS.
+cpu_family = 'arm'
+cpu = 'Cortex-A9'
+endian = 'little'
diff --git a/cross/ccrx.txt b/cross/ccrx.txt
new file mode 100644
index 0000000..f1b536c
--- /dev/null
+++ b/cross/ccrx.txt
@@ -0,0 +1,22 @@
+# This file assumes that path to the Renesas CC-RX toolchain is added
+# to the environment(PATH) variable, so that Meson can find
+# ccrx and rlink while building.
+[binaries]
+c = 'ccrx'
+cpp = 'ccrx'
+ar = 'rlink'
+strip = 'rlink'
+
+[built-in options]
+# The '--cpu' option with the appropriate target type should be mentioned
+# to cross compile c/c++ code with ccrx,.
+c_args = ['-cpu=rx600']
+cpp_args = ['-cpu=rx600']
+c_link_args = []
+cpp_link_args = []
+
+[host_machine]
+system = 'bare metal'
+cpu_family = 'rx'
+cpu = 'rx600'
+endian = 'little'
diff --git a/cross/iphone.txt b/cross/iphone.txt
new file mode 100644
index 0000000..6346248
--- /dev/null
+++ b/cross/iphone.txt
@@ -0,0 +1,30 @@
+# This is a cross compilation file from OSX Yosemite to iPhone
+# Apple keeps changing the location and names of files so
+# these might not work for you. Use the googels and xcrun.
+
+[binaries]
+c = 'clang'
+cpp = 'clang++'
+objc = 'clang'
+objcpp = 'clang++'
+ar = 'ar'
+strip = 'strip'
+
+[built-in options]
+c_args = ['-arch', 'arm64', '-miphoneos-version-min=11.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
+cpp_args = ['-arch', 'arm64', '-miphoneos-version-min=11.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
+c_link_args = ['-arch', 'arm64', '-miphoneos-version-min=11.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
+cpp_link_args = ['-arch', 'arm64', '-miphoneos-version-min=11.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
+objc_args = ['-arch', 'arm64', '-miphoneos-version-min=11.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
+objcpp_args = ['-arch', 'arm64', '-miphoneos-version-min=11.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
+
+[properties]
+root = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer'
+has_function_printf = true
+has_function_hfkerhisadf = false
+
+[host_machine]
+system = 'darwin'
+cpu_family = 'aarch64'
+cpu = 'aarch64'
+endian = 'little'
diff --git a/cross/linux-mingw-w64-32bit.json b/cross/linux-mingw-w64-32bit.json
new file mode 100644
index 0000000..4761111
--- /dev/null
+++ b/cross/linux-mingw-w64-32bit.json
@@ -0,0 +1,7 @@
+{
+ "file": "linux-mingw-w64-32bit.txt",
+ "tests": ["common", "cmake"],
+ "env": {
+ "WINEPATH": "/usr/lib/gcc/i686-w64-mingw32/9.2-posix;/usr/i686-w64-mingw32/bin;/usr/i686-w64-mingw32/lib"
+ }
+}
diff --git a/cross/linux-mingw-w64-32bit.txt b/cross/linux-mingw-w64-32bit.txt
new file mode 100644
index 0000000..caf1da1
--- /dev/null
+++ b/cross/linux-mingw-w64-32bit.txt
@@ -0,0 +1,31 @@
+[binaries]
+c = '/usr/bin/i686-w64-mingw32-gcc'
+cpp = '/usr/bin/i686-w64-mingw32-g++'
+objc = '/usr/bin/i686-w64-mingw32-gcc'
+ar = '/usr/bin/i686-w64-mingw32-ar'
+strip = '/usr/bin/i686-w64-mingw32-strip'
+pkgconfig = '/usr/bin/i686-w64-mingw32-pkg-config'
+windres = '/usr/bin/i686-w64-mingw32-windres'
+exe_wrapper = 'wine'
+ld = '/usr/bin/i686-w64-mingw32-ld'
+cmake = '/usr/bin/cmake'
+
+[properties]
+# Directory that contains 'bin', 'lib', etc
+root = '/usr/i686-w64-mingw32'
+# Directory that contains 'bin', 'lib', etc for the toolchain and system libraries
+sys_root = '/usr/i686-w64-mingw32/sys-root/mingw'
+
+[host_machine]
+system = 'windows'
+cpu_family = 'x86'
+cpu = 'i686'
+endian = 'little'
+
+[cmake]
+
+CMAKE_BUILD_WITH_INSTALL_RPATH = 'ON'
+CMAKE_FIND_ROOT_PATH_MODE_PROGRAM = 'NEVER'
+CMAKE_FIND_ROOT_PATH_MODE_LIBRARY = 'ONLY'
+CMAKE_FIND_ROOT_PATH_MODE_INCLUDE = 'ONLY'
+CMAKE_FIND_ROOT_PATH_MODE_PACKAGE = 'ONLY'
diff --git a/cross/linux-mingw-w64-64bit.json b/cross/linux-mingw-w64-64bit.json
new file mode 100644
index 0000000..df344da
--- /dev/null
+++ b/cross/linux-mingw-w64-64bit.json
@@ -0,0 +1,7 @@
+{
+ "file": "linux-mingw-w64-64bit.txt",
+ "tests": ["common", "cmake"],
+ "env": {
+ "WINEPATH": "/usr/lib/gcc/x86_64-w64-mingw32/9.2-posix;/usr/x86_64-w64-mingw32/bin;/usr/x86_64-w64-mingw32/lib"
+ }
+}
diff --git a/cross/linux-mingw-w64-64bit.txt b/cross/linux-mingw-w64-64bit.txt
new file mode 100644
index 0000000..f49fb35
--- /dev/null
+++ b/cross/linux-mingw-w64-64bit.txt
@@ -0,0 +1,30 @@
+[binaries]
+c = '/usr/bin/x86_64-w64-mingw32-gcc'
+cpp = '/usr/bin/x86_64-w64-mingw32-g++'
+objc = '/usr/bin/x86_64-w64-mingw32-gcc'
+ar = '/usr/bin/x86_64-w64-mingw32-ar'
+strip = '/usr/bin/x86_64-w64-mingw32-strip'
+pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config'
+windres = '/usr/bin/x86_64-w64-mingw32-windres'
+exe_wrapper = 'wine64'
+cmake = '/usr/bin/cmake'
+
+[properties]
+# Directory that contains 'bin', 'lib', etc
+root = '/usr/x86_64-w64-mingw32'
+# Directory that contains 'bin', 'lib', etc for the toolchain and system libraries
+sys_root = '/usr/x86_64-w64-mingw32/sys-root/mingw'
+
+[host_machine]
+system = 'windows'
+cpu_family = 'x86_64'
+cpu = 'x86_64'
+endian = 'little'
+
+[cmake]
+
+CMAKE_BUILD_WITH_INSTALL_RPATH = 'ON'
+CMAKE_FIND_ROOT_PATH_MODE_PROGRAM = 'NEVER'
+CMAKE_FIND_ROOT_PATH_MODE_LIBRARY = 'ONLY'
+CMAKE_FIND_ROOT_PATH_MODE_INCLUDE = 'ONLY'
+CMAKE_FIND_ROOT_PATH_MODE_PACKAGE = 'ONLY'
diff --git a/cross/msp430.txt b/cross/msp430.txt
new file mode 100644
index 0000000..839c90b
--- /dev/null
+++ b/cross/msp430.txt
@@ -0,0 +1,25 @@
+# This file assumes that path to the Texas Instruments MSP430 toolchain is added
+# to the environment(PATH) variable, so that Meson can find
+# cl430 and ar430 while building.
+[binaries]
+c = cl430
+ar = ar430
+strip = strip430
+
+[host_machine]
+system = 'baremetal'
+cpu_family = 'msp430'
+endian = 'little'
+
+[built-in options]
+c_args = [
+ '-vmsp',
+ '--printf_support=minimal']
+c_link_args = [
+ '--rom_model',
+ '-llibc.a',]
+cpp_args = []
+cpp_link_args = []
+
+[properties]
+needs_exe_wrapper = true
diff --git a/cross/none.txt b/cross/none.txt
new file mode 100644
index 0000000..1fbe471
--- /dev/null
+++ b/cross/none.txt
@@ -0,0 +1,19 @@
+# native file used to make the build machine compiler unusable
+
+[host_machine]
+system = 'none'
+cpu_family = 'none'
+cpu = 'none'
+endian = 'little'
+
+[properties]
+
+[binaries]
+c = ['false']
+cpp = ['false']
+fc = ['false']
+objc = ['false']
+objcpp = ['false']
+ar = ['false']
+pkgconfig = ['false']
+cmake = ['false']
diff --git a/cross/ownstdlib.txt b/cross/ownstdlib.txt
new file mode 100644
index 0000000..bdff6f4
--- /dev/null
+++ b/cross/ownstdlib.txt
@@ -0,0 +1,13 @@
+# This is a setup for compiling a program that runs natively
+# but uses a custom std lib. This test will only work on
+# x86_64.
+
+[target_machine]
+system = 'linux'
+cpu_family = 'x86_64'
+cpu = 'x86_64'
+endian = 'little'
+
+[properties]
+
+c_stdlib = 'mylibc' # Subproject name
diff --git a/cross/tvos.txt b/cross/tvos.txt
new file mode 100644
index 0000000..a7d5dd1
--- /dev/null
+++ b/cross/tvos.txt
@@ -0,0 +1,27 @@
+# This is a cross compilation file from OSX Yosemite to Apple tvOS
+# Apple keeps changing the location and names of files so
+# these might not work for you. Use the googels and xcrun.
+
+[binaries]
+c = 'clang'
+cpp = 'clang++'
+ar = 'ar'
+strip = 'strip'
+
+[built-in options]
+c_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
+cpp_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
+c_link_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
+cpp_link_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
+
+[properties]
+root = '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer'
+
+has_function_printf = true
+has_function_hfkerhisadf = false
+
+[host_machine]
+system = 'darwin'
+cpu_family = 'arm'
+cpu = 'arm64'
+endian = 'little'
diff --git a/cross/ubuntu-armhf.json b/cross/ubuntu-armhf.json
new file mode 100644
index 0000000..40f5619
--- /dev/null
+++ b/cross/ubuntu-armhf.json
@@ -0,0 +1,5 @@
+{
+ "file": "ubuntu-armhf.txt",
+ "tests": ["common"],
+ "env": {}
+}
diff --git a/cross/ubuntu-armhf.txt b/cross/ubuntu-armhf.txt
new file mode 100644
index 0000000..69e0c86
--- /dev/null
+++ b/cross/ubuntu-armhf.txt
@@ -0,0 +1,29 @@
+[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++'
+rust = ['rustc', '--target', 'arm-unknown-linux-gnueabihf', '-C', 'linker=/usr/bin/arm-linux-gnueabihf-gcc-7']
+ar = '/usr/arm-linux-gnueabihf/bin/ar'
+strip = '/usr/arm-linux-gnueabihf/bin/strip'
+pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
+ld = '/usr/bin/arm-linux/gnueabihf-ld'
+
+[built-in options]
+# Used in unit test '140 get define'
+c_args = ['-DMESON_TEST_ISSUE_1665=1']
+cpp_args = '-DMESON_TEST_ISSUE_1665=1'
+
+[properties]
+root = '/usr/arm-linux-gnueabihf'
+
+has_function_printf = true
+has_function_hfkerhisadf = false
+
+skip_sanity_check = true
+
+[host_machine]
+system = 'linux'
+cpu_family = 'arm'
+cpu = 'armv7' # Not sure if correct.
+endian = 'little'
diff --git a/cross/ubuntu-faketarget.txt b/cross/ubuntu-faketarget.txt
new file mode 100644
index 0000000..cc43998
--- /dev/null
+++ b/cross/ubuntu-faketarget.txt
@@ -0,0 +1,13 @@
+# 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]
+system = 'linux'
+cpu_family = 'mips'
+cpu = 'mips'
+endian = 'little'
diff --git a/cross/wasm.txt b/cross/wasm.txt
new file mode 100644
index 0000000..269c77a
--- /dev/null
+++ b/cross/wasm.txt
@@ -0,0 +1,17 @@
+[binaries]
+c = '/home/jpakkane/src/emsdk/upstream/emscripten/emcc'
+cpp = '/home/jpakkane/src/emsdk/upstream/emscripten/em++'
+ar = '/home/jpakkane/src/emsdk/upstream/emscripten/emar'
+
+[built-in options]
+c_args = []
+c_link_args = ['-sEXPORT_ALL=1']
+cpp_args = []
+cpp_link_args = ['-sEXPORT_ALL=1']
+
+[host_machine]
+
+system = 'emscripten'
+cpu_family = 'wasm32'
+cpu = 'wasm32'
+endian = 'little'
diff --git a/cross/xc16.txt b/cross/xc16.txt
new file mode 100644
index 0000000..c66889d
--- /dev/null
+++ b/cross/xc16.txt
@@ -0,0 +1,26 @@
+# This file assumes that path to the Microchip xc16 toolchain is added
+# to the environment(PATH) variable, so that Meson can find
+# xc16-gcc and xc16-ar while building.
+[binaries]
+c = 'xc16-gcc'
+ar = 'xc16-ar'
+strip = 'xc16-gcc'
+
+[host_machine]
+system = 'bare metal'
+cpu_family = 'dspic'
+cpu = '33ep64mc203'
+endian = 'little'
+
+[properties]
+needs_exe_wrapper = true
+
+[built-in options]
+c_args = [
+ '-c',
+ '-mcpu=33EP64MC203',
+ '-omf=elf']
+c_link_args = [
+ '-mcpu=33EP64MC203',
+ '-omf=elf',
+ '-Wl,--script=p33EP64MC203.gld,']