summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-07-30 14:12:57 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2019-07-30 14:12:57 +0300
commitd3f9f9c95f8ea4d7be9fa565015b1e027396d115 (patch)
tree1e5120a4b2a40e3e94022821ffaff5618bf3fd72
parentc904d3eefe2a01ca60027e2a5192e1f1c7ca5d9d (diff)
downloadmeson-armlinux.tar.gz
Make ARM compilers work on Linux.armlinux
-rw-r--r--cross/armclang-linux.txt35
-rw-r--r--mesonbuild/compilers/mixins/arm.py4
2 files changed, 37 insertions, 2 deletions
diff --git a/cross/armclang-linux.txt b/cross/armclang-linux.txt
new file mode 100644
index 000000000..2772d827b
--- /dev/null
+++ b/cross/armclang-linux.txt
@@ -0,0 +1,35 @@
+# 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'
+
+[properties]
+
+#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/mesonbuild/compilers/mixins/arm.py b/mesonbuild/compilers/mixins/arm.py
index dfdf540ca..02654cebd 100644
--- a/mesonbuild/compilers/mixins/arm.py
+++ b/mesonbuild/compilers/mixins/arm.py
@@ -161,8 +161,8 @@ class ArmclangCompiler:
def __init__(self, compiler_type: 'CompilerType'):
if not self.is_cross:
raise mesonlib.EnvironmentException('armclang supports only cross-compilation.')
- # Check whether 'armlink.exe' is available in path
- self.linker_exe = 'armlink.exe'
+ # Check whether 'armlink' is available in path
+ self.linker_exe = 'armlink'
args = '--vsn'
try:
p, stdo, stderr = mesonlib.Popen_safe(self.linker_exe, args)