On Mon, May 25, 2020 at 9:13 AM Alexis Ballier <aball...@gentoo.org> wrote:
>
> On Sun, 24 May 2020 20:25:11 +0000 (UTC)
> "Thomas Deutschmann" <whi...@gentoo.org> wrote:
>
> > commit:     6e149596cc76f1bbcee6720828c8c8c92420f2a3
> > Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
> > AuthorDate: Sun May 24 19:47:08 2020 +0000
> > Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
> > CommitDate: Sun May 24 20:23:53 2020 +0000
> > URL:
> > https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e149596
> >
> > media-libs/x265: drop USE=pic
> >
> > Gentoo's toolchain uses PIC by default. Since USE=asm was added,
> > we no longer need a USE flag to control that behavior.
>
>
> You got it wrong here it seems: USE=pic does not control whether
> the toolchain produces PIC or not. Shared libs always are, and have
> always been, built that way on Gentoo.
> In this case, USE=pic means "no matter what it costs, I do not want
> textrels", for the cases of hand written assembly that has to be
> rewritten to support PIC. And, still in this case, this costs a lot of
> performance, so it is enabled by default on hardened profiles and not
> others.
> Textrels work fine (on some architectures), they disallow W^X and force
> each process using the shared lib to make a "copy" at runtime in order
> to resolve relocations, so are not desirable but sometimes the cost
> outweights the gain.
>
> Plus, profiles/features/hardened enables pic by default but knows
> nothing about USE=asm so this is a regression for them.

The USE flag toggles use of assembly, not use of PIC. The default USE
value in the hardened profile should not drive decisions on what we
name USE flags.

You can add the flag to package.use or package.use.mask in the
hardened profile if necessary.

Reply via email to