Gentoo Archives: gentoo-amd64

From: Simon Stelling <blubb@g.o>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] First Impressions
Date: Wed, 27 Sep 2006 15:38:59
Message-Id: 451A9A45.5040209@gentoo.org
In Reply to: Re: [gentoo-amd64] First Impressions by Daniel Iliev
1 Daniel Iliev wrote:
2 > So, both flags let gcc produce PIC for libs and programs and none of
3 > them lets gcc produce PIC for libs only? The next flag described in the
4 > man page is -fpie, which makes PIC for programs only. Something is wrong
5 > and don't know how to find the right explanation.
6
7 The problem is that -fPIC is a code-generating flag, i.e. it applies to
8 the .o object files built. The compiler can't work out whether that
9 object is used in a program or a shared library, so it can't know
10 whether using PIC is a good idea or not.
11
12 --
13 Kind Regards,
14
15 Simon Stelling
16 Gentoo/AMD64 developer
17 --
18 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] First Impressions Daniel Iliev <danny@××××××××.com>