1 |
On Mon, May 25, 2020 at 9:13 AM Alexis Ballier <aballier@g.o> wrote: |
2 |
> |
3 |
> On Sun, 24 May 2020 20:25:11 +0000 (UTC) |
4 |
> "Thomas Deutschmann" <whissi@g.o> wrote: |
5 |
> |
6 |
> > commit: 6e149596cc76f1bbcee6720828c8c8c92420f2a3 |
7 |
> > Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
8 |
> > AuthorDate: Sun May 24 19:47:08 2020 +0000 |
9 |
> > Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
10 |
> > CommitDate: Sun May 24 20:23:53 2020 +0000 |
11 |
> > URL: |
12 |
> > https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e149596 |
13 |
> > |
14 |
> > media-libs/x265: drop USE=pic |
15 |
> > |
16 |
> > Gentoo's toolchain uses PIC by default. Since USE=asm was added, |
17 |
> > we no longer need a USE flag to control that behavior. |
18 |
> |
19 |
> |
20 |
> You got it wrong here it seems: USE=pic does not control whether |
21 |
> the toolchain produces PIC or not. Shared libs always are, and have |
22 |
> always been, built that way on Gentoo. |
23 |
> In this case, USE=pic means "no matter what it costs, I do not want |
24 |
> textrels", for the cases of hand written assembly that has to be |
25 |
> rewritten to support PIC. And, still in this case, this costs a lot of |
26 |
> performance, so it is enabled by default on hardened profiles and not |
27 |
> others. |
28 |
> Textrels work fine (on some architectures), they disallow W^X and force |
29 |
> each process using the shared lib to make a "copy" at runtime in order |
30 |
> to resolve relocations, so are not desirable but sometimes the cost |
31 |
> outweights the gain. |
32 |
> |
33 |
> Plus, profiles/features/hardened enables pic by default but knows |
34 |
> nothing about USE=asm so this is a regression for them. |
35 |
|
36 |
The USE flag toggles use of assembly, not use of PIC. The default USE |
37 |
value in the hardened profile should not drive decisions on what we |
38 |
name USE flags. |
39 |
|
40 |
You can add the flag to package.use or package.use.mask in the |
41 |
hardened profile if necessary. |