Re: Dealing with compilers that pretend to be GCC
On Thu, 19 Jan 2012, Ludovic Court�s wrote: It turns out that ICC manages to build a working GCC plug-in, so after I would say there is some conceptual confusion here (based on this sentence, without having looked at the autoconf macros you refer to). Logically there are two or three different compilers involved: * The compiler (host-x-target) into which a plugin would be loaded. This is the one that needs to be GCC. * The compiler (build-x-host) building the plugin. There is no particular reason it should need to be GCC, if sufficiently compatible with the compiler that built the host-x-target compiler that will load the plugin. * If you are testing a compiler for plugin support by running it in some way, that will be a build-x-target compiler that is intended to be configured in the same way as the final host-x-target compiler. Such a build-x-target compiler will be used to build target libraries in a Canadian cross build of GCC. So always think carefully about which compiler you wish to test - and what the relevant properties of that compiler are. -- Joseph S. Myers jos...@codesourcery.com
Re: Dealing with compilers that pretend to be GCC
On 20/01/2012 11:19, Peter Rosin wrote: Dave Korn skrev 2012-01-20 01:15: *snip* That could be tricky because I guess you won't be able to use libtool at configure time. *snip* It's possible to use libtool at configure time, but you need to invoke LT_OUTPUT before you do so. Or is there a reason for that not to work in this case? Not as far as I know, I just wasn't aware that you could generate the output script early. cheers, DaveK
Re: Dealing with compilers that pretend to be GCC
Dave Korn skrev 2012-01-20 01:15: *snip* That could be tricky because I guess you won't be able to use libtool at configure time. *snip* It's possible to use libtool at configure time, but you need to invoke LT_OUTPUT before you do so. Or is there a reason for that not to work in this case? Cheers, Peter
Re: Dealing with compilers that pretend to be GCC
On 01/19/12 06:24, Ludovic Courtès wrote: I don’t see what can be done on “our” side (perhaps Autoconf’s feature test could be strengthened, but how?) Which feature test would that be? I certainly understand the problem, and have run into issues where clang fools 'configure' into thinking a GCC feature is present when it isn't, but testing whether a compiler is GCC is not really the Autoconf Way. A 'configure' script is supposed to check for behavior, not identity. If the compiler supports the features needed, then generally speaking a 'configure' script shouldn't care whether the compiler is truly GCC.