public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
@ 2014-04-28  6:00 tony.theodore at gmail dot com
  2014-04-28  6:03 ` [Bug lto/60981] " tony.theodore at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tony.theodore at gmail dot com @ 2014-04-28  6:00 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
  2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
@ 2014-04-28  6:03 ` tony.theodore at gmail dot com
  2014-05-08 12:38 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tony.theodore at gmail dot com @ 2014-04-28  6:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Tony Theodore <tony.theodore at gmail dot com> ---
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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
  2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
  2014-04-28  6:03 ` [Bug lto/60981] " tony.theodore at gmail dot com
@ 2014-05-08 12:38 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2014-05-09 19:16 ` tony.theodore at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2014-05-08 12:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
Could you please provide details on your configuration?  AFAICS, the
lto-plugin isn't ever built in a native Darwin configuration.

So please provide info on host OS and the exact configure line.

Thanks.
        Rainer


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
  2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
  2014-04-28  6:03 ` [Bug lto/60981] " tony.theodore at gmail dot com
  2014-05-08 12:38 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2014-05-09 19:16 ` tony.theodore at gmail dot com
  2014-05-13 13:47 ` ro at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tony.theodore at gmail dot com @ 2014-05-09 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

Tony Theodore <tony.theodore at gmail dot com> 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 <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

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
  2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
                   ` (2 preceding siblings ...)
  2014-05-09 19:16 ` tony.theodore at gmail dot com
@ 2014-05-13 13:47 ` ro at gcc dot gnu.org
  2014-05-13 13:47 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ro at gcc dot gnu.org @ 2014-05-13 13:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 32790
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32790&action=edit
proposed patch


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
  2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
                   ` (3 preceding siblings ...)
  2014-05-13 13:47 ` ro at gcc dot gnu.org
@ 2014-05-13 13:47 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2014-05-14  8:33 ` ro at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2014-05-13 13:47 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
  2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
                   ` (4 preceding siblings ...)
  2014-05-13 13:47 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2014-05-14  8:33 ` ro at gcc dot gnu.org
  2014-05-15  9:53 ` ro at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ro at gcc dot gnu.org @ 2014-05-14  8:33 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
                URL|                            |https://gcc.gnu.org/ml/gcc-
                   |                            |patches/2014-05/msg01047.ht
                   |                            |ml
   Last reconfirmed|                            |2014-05-14
           Assignee|unassigned at gcc dot gnu.org      |ro at gcc dot gnu.org
   Target Milestone|---                         |4.9.1
     Ever confirmed|0                           |1

--- Comment #7 from Rainer Orth <ro at gcc dot gnu.org> ---
Patch submitted.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
  2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
                   ` (5 preceding siblings ...)
  2014-05-14  8:33 ` ro at gcc dot gnu.org
@ 2014-05-15  9:53 ` ro at gcc dot gnu.org
  2014-05-15  9:56 ` ro at gcc dot gnu.org
  2014-05-15  9:57 ` ro at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: ro at gcc dot gnu.org @ 2014-05-15  9:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Rainer Orth <ro at gcc dot gnu.org> ---
Author: ro
Date: Thu May 15 09:52:37 2014
New Revision: 210465

URL: http://gcc.gnu.org/viewcvs?rev=210465&root=gcc&view=rev
Log:
Check for -static-libgcc before use (PR lto/60981)

    PR lto/60981
    * configure.ac: Check for -static-libgcc.
    * configure: Regenerate.

Modified:
    trunk/lto-plugin/ChangeLog
    trunk/lto-plugin/configure   (contents, props changed)
    trunk/lto-plugin/configure.ac


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
  2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
                   ` (6 preceding siblings ...)
  2014-05-15  9:53 ` ro at gcc dot gnu.org
@ 2014-05-15  9:56 ` ro at gcc dot gnu.org
  2014-05-15  9:57 ` ro at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: ro at gcc dot gnu.org @ 2014-05-15  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Rainer Orth <ro at gcc dot gnu.org> ---
Author: ro
Date: Thu May 15 09:56:22 2014
New Revision: 210466

URL: http://gcc.gnu.org/viewcvs?rev=210466&root=gcc&view=rev
Log:
Check for -static-libgcc before use (PR lto/60981)

    PR lto/60981
    * configure.ac: Check for -static-libgcc.
    * configure: Regenerate.

Modified:
    branches/gcc-4_9-branch/lto-plugin/ChangeLog
    branches/gcc-4_9-branch/lto-plugin/configure   (contents, props changed)
    branches/gcc-4_9-branch/lto-plugin/configure.ac


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/60981] lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang)
  2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
                   ` (7 preceding siblings ...)
  2014-05-15  9:56 ` ro at gcc dot gnu.org
@ 2014-05-15  9:57 ` ro at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: ro at gcc dot gnu.org @ 2014-05-15  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Rainer Orth <ro at gcc dot gnu.org> ---
Fixed for 4.9.1, 4.10.0.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-05-15  9:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-28  6:00 [Bug lto/60981] New: lto-plugin configuration doesn't test for -static-libgcc (OSX gcc -> clang) tony.theodore at gmail dot com
2014-04-28  6:03 ` [Bug lto/60981] " tony.theodore at gmail dot com
2014-05-08 12:38 ` ro at CeBiTec dot Uni-Bielefeld.DE
2014-05-09 19:16 ` tony.theodore at gmail dot com
2014-05-13 13:47 ` ro at gcc dot gnu.org
2014-05-13 13:47 ` ro at CeBiTec dot Uni-Bielefeld.DE
2014-05-14  8:33 ` ro at gcc dot gnu.org
2014-05-15  9:53 ` ro at gcc dot gnu.org
2014-05-15  9:56 ` ro at gcc dot gnu.org
2014-05-15  9:57 ` ro at gcc dot gnu.org

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).