Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@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 19:18:11
Message-Id: 27588af6a6e7f838e907d51849bb007ecdebac25.camel@gentoo.org
In Reply to: Re: [gentoo-dev] Re: [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/ by Alexis Ballier
1 On Mon, 2020-05-25 at 19:49 +0200, Alexis Ballier wrote:
2 > On Mon, 25 May 2020 11:26:26 -0400
3 > Mike Gilbert <floppym@g.o> wrote:
4 >
5 > > On Mon, May 25, 2020 at 9:13 AM Alexis Ballier <aballier@g.o>
6 > > wrote:
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 > > > You got it wrong here it seems: USE=pic does not control whether
24 > > > the toolchain produces PIC or not. Shared libs always are, and have
25 > > > always been, built that way on Gentoo.
26 > > > In this case, USE=pic means "no matter what it costs, I do not want
27 > > > textrels", for the cases of hand written assembly that has to be
28 > > > rewritten to support PIC. And, still in this case, this costs a lot
29 > > > of performance, so it is enabled by default on hardened profiles
30 > > > and not others.
31 > > > Textrels work fine (on some architectures), they disallow W^X and
32 > > > force each process using the shared lib to make a "copy" at runtime
33 > > > in order to resolve relocations, so are not desirable but sometimes
34 > > > the cost outweights the gain.
35 > > >
36 > > > Plus, profiles/features/hardened enables pic by default but knows
37 > > > nothing about USE=asm so this is a regression for them.
38 > >
39 > > The USE flag toggles use of assembly, not use of PIC. The default USE
40 > > value in the hardened profile should not drive decisions on what we
41 > > name USE flags.
42 >
43 > ... but using a global well documented useflag instead of a local
44 > invention should drive such decisions.
45
46 What 'global well documented useflag'?
47
48 --
49 Best regards,
50 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies