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/50367] New: -flto and -Wl,--as-needed combination removes some needed libraries


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

             Bug #: 50367
           Summary: -flto and -Wl,--as-needed combination removes some
                    needed libraries
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: krisztian.kocsis@optimaster.eu


Created attachment 25250
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25250
Verbose linker output.

When I try to build udev with gcc-4.6.1, the accelerometer module fails to link
because of undefined references to sqrt, atan, etc. Unfortunately -lm is
explicitly specified. If I remove -flto or -Wl,--as-needed, the module links
successfully.

Verbose linker output is attached.


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