diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-03-23 09:18:13 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-03-23 09:18:13 +0200 |
commit | 6538c085b3954b85e72d5612e92faf06912b046f (patch) | |
tree | 109c6a01c7312bfb8b2a16112dbda8bc9df7c8aa | |
parent | dd6cbe1a7bc7742403c3a4123dc4729e5462fff4 (diff) |
Relax cross-compilation test for ODB_GXX_NAME determination
-rw-r--r-- | odb/buildfile | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/odb/buildfile b/odb/buildfile index 93267d7..46c5ab6 100644 --- a/odb/buildfile +++ b/odb/buildfile @@ -33,11 +33,21 @@ if ($cxx.target.class != 'windows') # plugin{*}: install = bin/ -# Unless cross-compiling, pass the C++ compiler's recall path as g++ name. At -# some point we should also make it configurable. +# Unless cross-compiling, pass the C++ compiler's recall path as the g++ +# name. At some point we should also make it configurable. # -gxx_name = ($cxx.target != $build.host ? g++ : $recall($cxx.path)) -gxx_name = $regex.replace($gxx_name, '\\', '\\\\') # Escape back slashes. +# Note that we used to compare complete target triplets but that prooved too +# strict. For example, we may be running on x86_64-apple-darwin17.7.0 while +# the compiler is targeting x86_64-apple-darwin17.3.0. +# +if ($cxx.target.cpu == $build.host.cpu && \ + $cxx.target.system == $build.host.system) +{ + gxx_name = $recall($cxx.path) + gxx_name = $regex.replace($gxx_name, '\\', '\\\\') # Escape back slashes. +} +else + gxx_name = g++ import libs = libcutl%lib{cutl} import libs += libstudxml%lib{studxml} |