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:
1 parent
c52a7c138b
commit
bc35c37748
322 files changed
+650
-647
No files matched your search
@@ -883,11 +883,14 @@ While we know that use of `-Weverything` is generally not recommended
|
||||
by `clang` C compiler developers, we do use the `-Weverything`
|
||||
option in a certain case in IOCCC winner `Makefile`s.
|
||||
|
||||
The use of `-Weverything` is limited to when one forces `CC=clang`. Users with
|
||||
clang compilers are not required to set `CC=clang` but when they do,
|
||||
`-Weverything` is enabled with all of its challenges, pedantic warnings, and
|
||||
sometimes warnings about things that do not matter, some of which are frankly
|
||||
frivolous and often downright dubious.
|
||||
The use of `-Weverything` is limited to when one forces `CC=clang` or more
|
||||
generally if the string 'clang' is in `$(CC)`. If `$(CC)` contains 'gcc' the
|
||||
'gcc' specific options are run instead.
|
||||
|
||||
Users with clang compilers are not required to set `CC=clang` or equivalent but
|
||||
when they do, `-Weverything` is enabled with all of its challenges, pedantic
|
||||
warnings, and sometimes warnings about things that do not matter, some of which
|
||||
are frankly frivolous and often downright dubious.
|
||||
|
||||
To enable this feature:
|
||||
|
||||
|
||||
Reference in new issue
Block a user