Gentoo Archives: gentoo-dev

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

Replies