[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/21382] New: --as-needed cannot be combined with -flto

From: dilyan.palauzov at aegee dot org
Subject: [Bug ld/21382] New: --as-needed cannot be combined with -flto
Date: Wed, 12 Apr 2017 20:50:54 +0000


            Bug ID: 21382
           Summary: --as-needed cannot be combined with -flto
           Product: binutils
           Version: 2.29 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: dilyan.palauzov at aegee dot org
  Target Milestone: ---

Created attachment 9991
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9991&action=edit

With the attached package I do ./configure and

make clean && make LDFLAGS="-Wl,--as-needed" && ./m  -- works, prints x
make clean && CFLAGS="-flto" make && ./m -- works, prints x
make clean && make CFLAGS="-flto" LDFLAGS="-Wl,--as-needed" && ./m -- does not
work, prints x-0.libs/lt-m: symbol lookup error: x-0/.libs/libx.so.0: undefined
symbol: x

Why doesn't --as-needed work with LTO?

It happens when I use GNU ld (GNU Binutils) with either GCC
7.0.1 20170411 or GCC 6.3.1 20170329.

As of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80407 it is not gcc bug and
does not happen with gold.

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]