aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-03-09 11:46:19 -0800
committerDylan Baker <dylan@pnwbakers.com>2023-03-09 21:38:13 -0800
commit24ea1d3f1968bff52ccaaf33fcdd59e810459aa9 (patch)
tree9f8256f92440bb361476b299f3364b5e70e8590c /mesonbuild/compilers
parentf8eba38801a853ed2f8b1635bcda35139ae86815 (diff)
downloadmeson-24ea1d3f1968bff52ccaaf33fcdd59e810459aa9.zip
meson-24ea1d3f1968bff52ccaaf33fcdd59e810459aa9.tar.gz
meson-24ea1d3f1968bff52ccaaf33fcdd59e810459aa9.tar.bz2
detect.py: Be more precise about detecting xtensa gcc toolchains
clang --version can yield a string like below when its installed into such a directory clang version 14.0.0 (https://github.com/llvm/llvm-project 3f43d803382d57e3fc010ca19833077d1023e9c9) Target: aarch64-yoe-linux Thread model: posix InstalledDir: /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux/gnome-text-editor/42.0-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux as you can see InstallDir has 'xt-' subtring and this trips the check to guess gcc if 'Free Software Foundation' in out or 'xt-' in out: Therefore, check if compiler output starts with xt- then assume it to be gcc Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/detect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py
index 1ef734f..6eca155 100644
--- a/mesonbuild/compilers/detect.py
+++ b/mesonbuild/compilers/detect.py
@@ -334,7 +334,7 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin
version = search_version(out)
guess_gcc_or_lcc: T.Optional[str] = None
- if 'Free Software Foundation' in out or 'xt-' in out:
+ if 'Free Software Foundation' in out or out.startswith('xt-'):
guess_gcc_or_lcc = 'gcc'
if 'e2k' in out and 'lcc' in out:
guess_gcc_or_lcc = 'lcc'