Bug 57261 - [4.9 regression] libgcc_s.so always linked on Solaris
Summary: [4.9 regression] libgcc_s.so always linked on Solaris
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.9.0
: P3 critical
Target Milestone: 4.9.0
Assignee: Rainer Orth
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords: build
: 57265 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-13 07:09 UTC by Eric Botcazou
Modified: 2013-05-14 09:35 UTC (History)
2 users (show)

See Also:
Host:
Target: *-*-solaris2.{9,10}
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-05-13 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Botcazou 2013-05-13 07:09:05 UTC
The new HAVE_LD_AS_NEEDED support doesn't seem to work on Solaris 9 and 10:

(botcazou@ob) /nile.build/botcazou/gcc-head/sparc-sun-solaris2.10 $ cat t.c
int main (void) { return 0; }
(botcazou@ob) /nile.build/botcazou/gcc-head/sparc-sun-solaris2.10 $ gcc/xgcc -Bgcc -o t t.c     
(botcazou@ob) /nile.build/botcazou/gcc-head/sparc-sun-solaris2.10 $ ldd t
        libgcc_s.so.1 =>         /usr/local/gnatpro/6.4.2/lib/libgcc_s.so.1
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1

The dependency on libgcc_s.so.1 for a dummy program is new.  This is critical because this breaks bootstrap:

make[1]: *** [all] Error 2
make[1]: Leaving directory `/nfs/nile/nile.build/botcazou/gcc-head/sparc-sun-solaris2.10/sparc-sun-solaris2.10/libquadmath'
make: *** [all-target-libquadmath] Error 2

configure:3386: checking whether the C compiler works
configure:3395: ./a.out
ld.so.1: ./a.out: fatal: /nile.build/botcazou/gcc-head/sparc-sun-solaris2.10/./gcc/libgcc_s.so.1: wrong ELF class: ELFCLASS32
/nile.build/botcazou/gcc-head/src/libquadmath/configure: line 1: 10727 Killed                  ./$ac_file
configure:3399: $? = 137
configure:3406: error: in `/nile.build/botcazou/gcc-head/sparc-sun-solaris2.10/sparc-sun-solaris2.10/sparcv9/libquadmath':
configure:3410: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Comment 1 Rainer Orth 2013-05-13 13:11:05 UTC
Looking into it.
Comment 2 Eric Botcazou 2013-05-13 19:50:53 UTC
*** Bug 57265 has been marked as a duplicate of this bug. ***
Comment 3 Rainer Orth 2013-05-14 09:35:42 UTC
Fixed for 4.9.0.  Sorry for the mess.

  Rainer