Improve how gcc/clang is detected in Makefiles

Rather than check if $(CC) IS gcc or IS clang check for $(CC) containing
gcc or clang. This is because in some systems or conditions the compiler
might not be called JUST gcc or JUST clang. For instance gcc in MacPorts
is called gcc-mp-13 (for example) but without this change one would have
to symlink gcc to gcc-mp-13 or copy it to gcc.

The FAQ has been updated to address this.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-18 06:10:02 -08:00
1 parent c52a7c138b
commit bc35c37748
322 files changed
+650 -647

No files matched your search

+2 -2
View File
@@ -81,7 +81,7 @@ CC= cc
# Compiler add-ons or replacements for clang only
#
ifeq ($(CC),clang)
ifeq "$(findstring $(CLANG),${CC})" "$(CLANG)"
#
CSILENCE+= -Wno-comma -Wno-disabled-macro-expansion -Wno-float-conversion \
-Wno-format-nonliteral -Wno-missing-prototypes \
@@ -95,7 +95,7 @@ endif
# Specific add-ons or replacements for gcc only
#
ifeq ($(CC),gcc)
ifeq "$(findstring $(GCC),${CC})" "$(GCC)"
#
#CSILENCE+=
#