Gentoo Archives: gentoo-user

From: Martin Vaeth <martin@×××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Profile 17.0, PIE, USE="pic", C(XX)FLAGS "-fpic", "-fPIC"?
Date: Tue, 09 Jan 2018 20:31:12
Message-Id: p338ln$179$1@blaine.gmane.org
In Reply to: [gentoo-user] Profile 17.0, PIE, USE="pic", C(XX)FLAGS "-fpic", "-fPIC"? by Walter Dnes
1 Walter Dnes <waltdnes@××××××××.org> wrote:
2 > Question: does PIE imply pic/PIC?
3
4 The code is somewhat different, but in principle yes.
5
6 > I.e does a PIE build also require USE="pic"
7
8 Assembler code which breaks pic will also break pie,
9 so better do not use that code.
10
11 > and CFLAGS/CXXFLAGS="-fpic -fPIC"?
12
13 These are usually added for libraries anyway.
14 They do not belong into your "manual" configuration file.
15
16 > If so, is there a way to disable PIE in profile 17.0?
17
18 If you want to switch it off for a particular binary,
19 there are -fno-PIE -no-pie.
20 Ebuilds should add it automatically if needed.
21 So far, I only needed it for clisp:
22 https://bugs.gentoo.org/show_bug.cgi?id=618170