Gentoo Archives: gentoo-dev

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

Replies