sha1collisiondetection
sha1collisiondetection copied to clipboard
Don't use gcc-specific compilerflags if not using gcc
Makes compilation using xlc on AIX (and likely other compilers) not warn so much.
Hi @MrShark, thanks for looking at this.
If you check the build logs for your job, you can see that the command line parameters for both clang and gcc are only "-Ilib" dropping the "-O2 -Wall -Werror -Wextra -pedantic -std=c90" So I think that the logic you put in to check for gcc is incorrect.
Also, I don't think that checking for gcc only is what we want, as we want to support compiling with clang, which matches all the gcc parameters.
Ahh, sorry. I only checked this patch on AIX.
I will have a look att it (and also try to fix some other gnu-isms I found in make clean
)
Since a lot of common compilers allow for these gnu-isms, can you make it check for the specific non-supporting compiler?
BTW Which of the compiler options specifically cause issues?
E.g., -Ilib
, -O2
and -std=c90
are more important than -W*
and -pedantic
.
A new patch: 4b0064d5abb218f2fa3b2282fb0ce4bed1749a1e
gmake apperently sets CC to cc by default, making the detection code from the manual void :-(
Well, well I added code to detect if gcc or clang is installed and then if $CC is cc use them, currently preferring clang if both are installed. This approach messes up if you have an other compiler installed as cc without an alias alongside gcc/clang and want to use cc for compilation (but probably not worse then before).
Cleaning up among my old pull requests, I no longer have access to AIX systems to test this out on.