----- Original Message ----- > On 04/16/2014 06:18 AM, Jose Fonseca wrote: > > Module: Mesa > > Branch: master > > Commit: e3c58cdfd97d390cb4c1a02852ab0417bd68c861 > > URL: > > https://urldefense.proofpoint.com/v1/url?u=http://cgit.freedesktop.org/mesa/mesa/commit/?id%3De3c58cdfd97d390cb4c1a02852ab0417bd68c861&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0A&m=rnHOKGZDq72J2Cf7NmK4UzeBkIBuMciZsmOiVPGRA6E%3D%0A&s=9dffa609db579757787307b214f2457380772eed336c55e01703a0dba31e732d > > > > Author: José Fonseca <[email protected]> > > Date: Wed Apr 16 13:13:48 2014 +0100 > > > > Revert "scons: Enable building through Clang Static Analyzer." > > > > This reverts commit a45a50a4828e1357e9555474bc127c5585b3a420. > > > > Unfortunately gcc dumps argv[0] as the first word of --version, so it is > > unreliable for detecting gcc. > > > > In particular `cc --version` and `i686-w64-mingw32-gcc --version` give > > wrong results. > > > > A better solution needs to be found -- most likely using C-preprocessing > > like autotools does. Revert for now. > > I don't know if this is a great solution, but 'gcc -v |& tail -1' seems > to report 'gcc' regardless of argv[0].
Yes, you're right, that would work for gcc. (clang would need to use the other method.) But I was already halfway implementing compiler detection via C-preprocessor macros, which seems to be more robust/versatile, as it doesn't rely on version string to have any particular format, and can be extended to any C compiler. I've just posted the updated patch. Jose _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
