public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/43659] -flto doesn't remember -fPIC
[not found] <bug-43659-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-30 10:36 ` devurandom at gmx dot net
2011-01-08 19:58 ` hubicka at gcc dot gnu.org
1 sibling, 0 replies; 4+ messages in thread
From: devurandom at gmx dot net @ 2010-11-30 10:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43659
devurandom at gmx dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |devurandom at gmx dot net
--- Comment #3 from devurandom at gmx dot net 2010-11-30 10:05:17 UTC ---
The issue seems to still exist in 4.5.1. Does it have something to do with bug
#40546?
On Gentoo, at least following packages are affected:
app-arch/bzip2-1.0.6-r1, dev-libs/libebml-1.0.0, media-libs/jpeg-6b-r9,
media-libs/openjpeg-1.3-r3, media-sound/gsm-1.0.13, net-libs/libsrtp-1.4.4-r1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug lto/43659] -flto doesn't remember -fPIC
[not found] <bug-43659-4@http.gcc.gnu.org/bugzilla/>
2010-11-30 10:36 ` [Bug lto/43659] -flto doesn't remember -fPIC devurandom at gmx dot net
@ 2011-01-08 19:58 ` hubicka at gcc dot gnu.org
1 sibling, 0 replies; 4+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-01-08 19:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43659
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.08 19:54:57
CC| |hubicka at gcc dot gnu.org
Known to work| |4.6.0
Ever Confirmed|0 |1
--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-01-08 19:54:57 UTC ---
This was fixed on mainline by patch of mine
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00210.html
perhaps it can be backported.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug lto/43659] -flto doesn't remember -fPIC
2010-04-06 1:47 [Bug lto/43659] New: " debian-gcc at lists dot debian dot org
2010-04-06 3:02 ` [Bug lto/43659] " pinskia at gmail dot com
@ 2010-04-06 8:58 ` rguenth at gcc dot gnu dot org
1 sibling, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-06 8:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2010-04-06 08:57 -------
GCC has code to do exactly this. Somebody needs to debug why it doesn't work.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43659
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug lto/43659] -flto doesn't remember -fPIC
2010-04-06 1:47 [Bug lto/43659] New: " debian-gcc at lists dot debian dot org
@ 2010-04-06 3:02 ` pinskia at gmail dot com
2010-04-06 8:58 ` rguenth at gcc dot gnu dot org
1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gmail dot com @ 2010-04-06 3:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gmail dot com 2010-04-06 03:01 -------
Subject: Re: New: -flto doesn't remember -fPIC
This is done on purpose. The -fpic is needed on the link line too.
This is a bug in libtool.
Sent from my iPhone
On Apr 5, 2010, at 6:47 PM, "debian-gcc at lists dot debian dot org"
<gcc-bugzilla@gcc.gnu.org
> wrote:
> [forwarded from http://bugs.debian.org/524176]
>
> Matthias
>
> gcc-4.5 with -flto doesn't work with -fPIC properly.
>
> Simple testcase:
> int entry(int a)
> {
> return bar(a)+1;
> }
>
> int bar(int a)
> {
> return a+4;
> }
>
> $ gcc-4.5 foo1.c -flto -fPIC -DPIC -c
> $ gcc-4.5 foo2.c -flto -fPIC -DPIC -c
> $ gcc-4.5 foo1.o foo2.o -flto -shared
> /usr/bin/ld: /tmp/ccmA7RCK.lto.o: relocation R_X86_64_PC32 against
> symbol `bar'
> can not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: ld returned 1 exit status
>
> This works however:
> $ gcc-4.5 foo1.o foo2.o -flto -shared -fPIC
>
> Now -fPIC is something libtool automatically adds, and I it doesn't
> add it at
> linktime (perhaps other build systems don't either).
> Could gcc's -flto see that all .o files involved in the link are -
> fPIC... and
> make the resulting file -fPIC too?
> Or at least it should see the -shared in the linker line, and
> automatically use
> -fPIC when -flto is used.
>
>
> --
> Summary: -flto doesn't remember -fPIC
> Product: gcc
> Version: 4.5.0
> Status: UNCONFIRMED
> Severity: normal
> Priority: P3
> Component: lto
> AssignedTo: unassigned at gcc dot gnu dot org
> ReportedBy: debian-gcc at lists dot debian dot org
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43659
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43659
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-08 19:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-43659-4@http.gcc.gnu.org/bugzilla/>
2010-11-30 10:36 ` [Bug lto/43659] -flto doesn't remember -fPIC devurandom at gmx dot net
2011-01-08 19:58 ` hubicka at gcc dot gnu.org
2010-04-06 1:47 [Bug lto/43659] New: " debian-gcc at lists dot debian dot org
2010-04-06 3:02 ` [Bug lto/43659] " pinskia at gmail dot com
2010-04-06 8:58 ` rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).