From ef3da25fb558d71c4f27d1b7c2344381f53a6651 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Tue, 27 Feb 2024 18:44:43 +1300 Subject: [PATCH] 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. --- README.md | 2 +- configure | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1490731..9abb9d8 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/configure b/configure index 67c6f3a..dcf2cc8 100755 --- a/configure +++ b/configure @@ -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"