Meta: Fix detection of default compiler versions

The logic in this script was *intended* to use the system's default
compiler if it was sufficiently new, and only start searching for the
latest installed if the default was not suitable.

However, the `cxx` program does not exist on Unixes, so the version
check always failed. We should be using the standard `c++` program name
instead.

After this change, the `CC` and `CXX` environment variables will have to
be used if someone wants to force a newer compiler version.
This commit is contained in:
Daniel Bertalan 2024-05-20 20:43:00 +02:00 committed by Andrew Kaster
commit 060e6f4d21
Notes: sideshowbarker 2024-07-18 22:57:59 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -50,7 +50,7 @@ find_newest_compiler() {
pick_host_compiler() {
CC=${CC:-"cc"}
CXX=${CXX:-"cxx"}
CXX=${CXX:-"c++"}
if is_supported_compiler "$CC" && is_supported_compiler "$CXX"; then
return