configure: use gcc over cc

We don't know what the system cc supports in terms of command line
flags, it could be tcc for all we know. Aiming for gcc over cc allows
the build to succeed when cc is not gcc or clang, but the user can
always override it themselves with the -c configure switch.
This commit is contained in:
Jeremy Baxter 2024-02-27 18:44:43 +13:00
parent 90701bf0ef
commit ef3da25fb5
2 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ POSIX-compliant (like Microsoft Windows).
To build Callisto, all you need is a C99 compiler. The configure
script will check for the presence of various compilers before
building, to decide which one to use.
The compilers checked are clang, followed by cc, followed by gcc. If
The compilers checked are clang, followed by gcc, followed by cc. If
you have a compiler at a custom path that you would like to use over
the system C compiler, just pass `-c /path/to/compiler` to the
configure script before you build. The compiler must support gcc-like

6
configure vendored
View file

@ -80,12 +80,12 @@ gen_CC () {
fi
if present clang; then
cc=clang
elif present cc; then
cc=cc
elif present gcc; then
cc=gcc
elif present cc; then
cc=cc
else
throw "C compiler not found, please acquire a copy of LLVM Clang or the GNU C compiler"
throw "C compiler not found, please acquire a copy of LLVM Clang or the GNU C Compiler"
fi
using "$cc"