[Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60981 Bug ID: 60981 Summary: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: tony.theodore at gmail dot com Created attachment 32690 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32690&action=edit lto-plugin -static-libgcc configure.ac test Hi, When building on OSX, gcc is a symlink to clang and doesn't accept the -static-libgcc option. The attached patch basically copies the "have_static_libs" test from the top level configure.ac:1253 to the lto-plugin/configure.ac (removing the c++ parts) - it hasn't been tested as I don't have the right version of autoconf, but copying and modifying the corresponding section from configure works. Cheers, Tony
[Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60981 --- Comment #1 from Tony Theodore --- Created attachment 32691 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32691&action=edit add -static-libgcc to lto-plugin/configure This is the modified lto-plugin/configure that has been tested.
[Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60981 Tony Theodore changed: What|Removed |Added Target||i686-w64-mingw32 Host||x86_64-apple-darwin13.1.0 Build||x86_64-apple-darwin13.1.0 --- Comment #3 from Tony Theodore --- 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 The configure line is: configure \ --target='$(TARGET)' \ --build='$(BUILD)' \ --prefix='$(PREFIX)' \ --libdir='$(PREFIX)/lib' \ --enable-languages='c,c++,objc,fortran' \ --enable-version-specific-runtime-libs \ --with-gcc \ --with-gnu-ld \ --with-gnu-as \ --disable-nls \ --disable-shared \ --disable-multilib \ --without-x \ --disable-win32-registry \ --enable-threads=win32 \ --disable-libgomp \ --disable-libmudflap \ --with-cloog='$(PREFIX)' \ --with-gmp='$(PREFIX)' \ --with-isl='$(PREFIX)' \ --with-mpc='$(PREFIX)' \ --with-mpfr='$(PREFIX)' \ --with-as='$(PREFIX)/bin/$(TARGET)-as' \ --with-ld='$(PREFIX)/bin/$(TARGET)-ld' \ --with-nm='$(PREFIX)/bin/$(TARGET)-nm' \ LDFLAGS='-Wl,-no_pie' 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 $ clang -v Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.1.0 Thread model: posix
[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 #6 from Tony Theodore --- (In reply to r...@cebitec.uni-bielefeld.de from comment #4) > > --- Comment #3 from Tony Theodore --- > > 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
[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 #11 from Tony Theodore --- Thanks!