jsoftware / jsource

J engine source mirror
Other
657 stars 90 forks source link

clang detection should not depend on spelling of cc #133

Closed rdm closed 1 year ago

rdm commented 2 years ago

We can detect clang using

$(CC) --version | grep clang

This works even when CC=/usr/bin/cc regardless of whether /usr/bin/cc is gcc or clang.

bilam commented 2 years ago

This is not true at least on Raspberry: 32-bit rpi cc (Debian 4.6.3-14+rpi1) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

64-bit rpi bill@debian8:~$ cc --version cc (Debian/Linaro 4.9.2-10+deb8u1) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rdm commented 2 years ago

That looks like gcc -- are you sure it's clang?

bilam commented 2 years ago

it is gcc