aboutsummaryrefslogtreecommitdiff
blob: 8d6cfffab73264172aec550c92f5d70f25036080 (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"?>
<guide 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>
</guide>