[Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)

tony.theodore at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue May 13 15:51:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60981

--- Comment #6 from Tony Theodore <tony.theodore at gmail dot com> ---
(In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #4)
> > --- Comment #3 from Tony Theodore <tony.theodore at gmail dot com> ---
> > I'm building a cross compiler with:
> 
> It would have helped enormously if you'd stated so in the first place.

Apologies.

> > Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
> > Target: x86_64-apple-darwin13.1.0
> > Thread model: posix
> 
> On Mac OS X 10.7, gcc -v *does accept* -static-libgcc, though, although
> it's also LLVM-based.  No idea why they changed this in 10.9.

Up till LLVM 3.3 there was a gcc plugin called DragonEgg which used gcc as a
front-end and LLVM as the back-end. Now "gcc" is basically an alias for the
clang front-end.

> Your proposed patch has two problems, unfortunately:
> 
> * Don't check for $GCC.  I don't care who the compiler thinks he is as
>   long as it accepts -static-libgcc.
> 
> * The gcc version check is wrong: -static-libgcc goes back way long
>   (even 2.95 and perhaps even before).  It did apply to
>   -static-libstdc++, though I don't know what a version check buys us if
>   the compiler accepts the option.

Thanks for the explanation, that make sense.

> Please try the attached patch instead.  Manual testing with Oracle
> Studio cc (which doesn't accept -static-libgcc) and gcc gave the correct
> results.

I can confirm that this works with all three mingw targets (after installing
autoconf 2.64) - thank you very much!

Cheers,

Tony



More information about the Gcc-bugs mailing list