This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #3 from Tony Theodore <tony.theodore at gmail dot com> ---
> I'm building a cross compiler with:
>
> Host: x86_64-apple-darwin13.1.0
> Targets: i686-pc-mingw32 x86_64-w64-mingw32 i686-w64-mingw32
> Build: x86_64-apple-darwin13.1.0

It would have helped enormously if you'd stated so in the first place.

> Compiler details:
>
> $ gcc -v
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
> 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.

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.

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

    Rainer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]