clang version 10.0.1 identified as gcc in configure ?

Dennis Clarke dclarke at blastwave.org
Thu Aug 20 08:50:26 UTC 2020


On 8/20/20 4:02 AM, Torbjörn Granlund wrote:
> The cause for this is that clang claims to be the real thing:
> 
> On a FreeBSD box:
> 
> shell$ cc -v
> FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on
> LLVM 8.0.1)
> Target: x86_64-unknown-freebsd12.1
> Thread model: posix
> InstalledDir: /usr/bin
> shell$ cc -dM -E - < /dev/null | grep GNU
> #define __GNUC_MINOR__ 2
> #define __GNUC_PATCHLEVEL__ 1
> #define __GNUC_STDC_INLINE__ 1
> #define __GNUC__ 4
> 
> And on a Mac:
> 
> flat$ cc -v
> Apple clang version 12.0.0 (clang-1200.0.22.19)
> Target: x86_64-apple-darwin19.6.0
> Thread model: posix
> InstalledDir:
> /Users/tege/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> flat$ cc -dM -E - < /dev/null | grep GNU
> #define __GNUC_MINOR__ 2
> #define __GNUC_PATCHLEVEL__ 1
> #define __GNUC_STDC_INLINE__ 1
> #define __GNUC__ 4
> 
> 

Fascinating! I never would have guessed :




callisto#
callisto# uname -apKU
FreeBSD callisto 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r363935: Thu Aug
6 06:41:09 UTC 2020
root at releng1.nyi.freebsd.org:/usr/obj/usr/src/i386.i386/sys/GENERIC
i386 i386 1300105 1300105
callisto# cc -v
FreeBSD clang version 10.0.1 (git at github.com:llvm/llvm-project.git
llvmorg-10.0.1-0-gef32c611aa2)
Target: i386-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin
callisto# cc -dM -E - < /dev/null | grep GNU
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC_STDC_INLINE__ 1
#define __GNUC__ 4
callisto#

Never would have guessed that in a million years. Thank you Sir.


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional






More information about the gmp-discuss mailing list