[Bug driver/55781] New: -shared-libgcc does not completely undo -static-libgcc

ccoutant at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 21 21:52:00 GMT 2012


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

             Bug #: 55781
           Summary: -shared-libgcc does not completely undo -static-libgcc
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ccoutant@gcc.gnu.org


In the gold testsuite, I need to link with a shared libgcc, but the top-level
configure now passes in -static-libgcc to all $(COMPILE) and $(CXX_COMPILE)
actions. I tried to undo that by adding -shared-libgcc to the command line, but
it doesn't quite erase the effects of -static-libgcc.

Running gcc without either option gives me these link options:

  .../collect2 ... -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc ...

Running gcc with both -static-libgcc and -shared-libgcc gives me this:

  .../collect2 ... -lstdc++ -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh ...

Reproduced with 4.7 as well.



More information about the Gcc-bugs mailing list