[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/12557] --as-needed doesn't work with g++
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/12557] --as-needed doesn't work with g++ |
Date: |
Fri, 11 Mar 2011 18:36:43 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=12557
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Firefox fails to build with |--as-needed doesn't work
|-flto and --as-needed |with g++
|LDFLAGS |
--- Comment #19 from H.J. Lu <hjl.tools at gmail dot com> 2011-03-11 18:36:35
UTC ---
address@hidden pr12557]$ cat x.c
int x = 20;
address@hidden pr12557]$ cat foo.c
#include <stdio.h>
extern int x;
void
foo ()
{
printf ("%d\n", x);
}
address@hidden pr12557]$ cat main.c
extern void foo ();
int
main ()
{
foo ();
return 0;
}
address@hidden pr12557]$ make
g++ -shared -fPIC -o libx.so x.c
g++ -shared -fPIC -o libfoo.so foo.c libx.so
g++ -Wl,--as-needed -o x main.o -L. -lfoo -lx -Wl,-R,.
main.o: In function `main':
main.c:(.text+0xa): undefined reference to `foo'
collect2: ld returned 1 exit status
make: *** [x] Error 1
address@hidden pr12557]$
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, (continued)
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/10
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, hjl.tools at gmail dot com, 2011/03/10
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, hjl.tools at gmail dot com, 2011/03/10
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/10
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, hjl.tools at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] --as-needed doesn't work with g++,
hjl.tools at gmail dot com <=
- [Bug ld/12557] --as-needed doesn't work with g++, hjl.tools at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, hjl.tools at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, hjl.tools at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, hjl.tools at gmail dot com, 2011/03/11
- [Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] gcc & Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] gcc & Firefox fails to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] gcc & Firefox fail to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11
- [Bug ld/12557] gcc & Firefox fail to build with -flto and --as-needed LDFLAGS, cryptooctoploid at gmail dot com, 2011/03/11