* compiler detection
@ 2020-08-22 20:42 Jan Stary
2020-08-22 21:11 ` Måns Rullgård
0 siblings, 1 reply; 2+ messages in thread
From: Jan Stary @ 2020-08-22 20:42 UTC (permalink / raw)
To: sox-devel
It seems ./configure is confused about which compiler it found.
When run without arguments, ./configure will look for (and find) gcc,
without ever bothering to look for cc.
With CC specified, using either of
./configure CC=cc
env CC=cc ./configure
this is what happens:
checking for gcc... cc
$ cc --version
OpenBSD clang version 10.0.1
Target: amd64-unknown-openbsd6.7
Thread model: posix
InstalledDir: /usr/bin
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
no
I don't know what effect it has on the subsequent compilation,
or what assumptions thinking "we are using the GNU compiler" leads to.
Jan
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: compiler detection
2020-08-22 20:42 compiler detection Jan Stary
@ 2020-08-22 21:11 ` Måns Rullgård
0 siblings, 0 replies; 2+ messages in thread
From: Måns Rullgård @ 2020-08-22 21:11 UTC (permalink / raw)
To: Jan Stary; +Cc: sox-devel
Jan Stary <hans@stare.cz> writes:
> It seems ./configure is confused about which compiler it found.
>
> When run without arguments, ./configure will look for (and find) gcc,
> without ever bothering to look for cc.
>
> With CC specified, using either of
>
> ./configure CC=cc
> env CC=cc ./configure
>
> this is what happens:
>
> checking for gcc... cc
>
> $ cc --version
> OpenBSD clang version 10.0.1
> Target: amd64-unknown-openbsd6.7
> Thread model: posix
> InstalledDir: /usr/bin
>
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
>
> no
>
> I don't know what effect it has on the subsequent compilation,
> or what assumptions thinking "we are using the GNU compiler" leads to.
That checks whether __GNUC__ is defined. Since clang supports (most)
gcc extensions, it defines this symbol.
--
Måns Rullgård
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-22 21:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 20:42 compiler detection Jan Stary
2020-08-22 21:11 ` Måns Rullgård
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).