This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15648] Support building glibc with -flto.
- From: "knrstaj at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 20 Jun 2013 06:10:19 +0000
- Subject: [Bug libc/15648] Support building glibc with -flto.
- Auto-submitted: auto-generated
- References: <bug-15648-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15648
--- Comment #6 from Neil <knrstaj at gmail dot com> ---
Created attachment 7086
--> http://sourceware.org/bugzilla/attachment.cgi?id=7086&action=edit
multiple definition of `__lll_lock_wait_private' example2
I don't want to build glibc with -flto option.
I build application with -flto.
The problem is like building thread program which static link with -lc
-lpthread
For example:
gcc thread_program.c -lc -lpthread -static
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libpthread.a(lowlevellock.o):
In function `__lll_lock_wait_private':
/build/buildd/eglibc-2.15/nptl/../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:76:
multiple definition of `__lll_lock_wait_private'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x0):
first defined here
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libpthread.a(lowlevellock.o):
In function `__lll_unlock_wake_private':
/build/buildd/eglibc-2.15/nptl/../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:332:
multiple definition of `__lll_unlock_wake_private'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x30):
first defined here
collect2: ld returned 1 exit status
But, I don't know why -flto causes the problem for my first example. :(
--
You are receiving this mail because:
You are on the CC list for the bug.