aboutsummaryrefslogtreecommitdiff
blob: dd7dfb5534993dfd5e3e3fe41235fc46e5ad8088 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="UTF-8"?>
<devbook self="general-concepts/pic/">
<chapter>
<title>Position Independent Code</title>
<body>

<p>
On some architectures, shared libraries must be built with <c>-fPIC</c>.
On <c>x86</c> and others, shared libraries may build without <c>-fPIC</c>.
This can be wasteful and potentially cause a performance hit.
</p>

<p>
If you encounter a package that is not building shared libraries with
<c>-fPIC</c>, patch the Makefile to build only the shared libraries with
<c>-fPIC</c>. More information on PIC is available at the
<uri link="https://wiki.gentoo.org/wiki/Project:Hardened/Position_Independent_Code_internals">
PIC internals</uri> wiki page. If you are unsure, please ask in a public
developer forum (like the <c>gentoo-dev</c> mailing list or the
<c>#gentoo-dev</c> IRC channel) for help.
</p>

</body>
</chapter>
</devbook>