On Mon, May 25, 2020 at 3:18 PM Michał Górny <mgo...@gentoo.org> wrote:
>
> On Mon, 2020-05-25 at 19:49 +0200, Alexis Ballier wrote:
> > On Mon, 25 May 2020 11:26:26 -0400
> > Mike Gilbert <flop...@gentoo.org> wrote:
> >
> > > 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.
> >
> > ... but using a global well documented useflag instead of a local
> > invention should drive such decisions.
>
> What 'global well documented useflag'?

It's neither global, nor well-documented, but several packages do
define it locally.

profiles % grep ":pic " use.local.desc
app-arch/gzip:pic - disable optimized assembly code that is not PIC friendly
app-benchmarks/ramspeed:pic - Force shared libraries to be built as
PIC (this is slower)
dev-libs/gmp:pic - Force static libraries to be built as PIC to avoid TEXTRELs.
gnome-base/orbit:pic - Force libname-server-2 to be built as PIC;
needed on hardened systems
media-libs/x264:pic - disable optimized assembly code that is not PIC friendly
media-libs/x265:pic - Disable optimized assembly code that is not PIC friendly
media-libs/xvid:pic - disable optimized assembly code that is not PIC friendly
media-video/ffmpeg:pic - Force shared libraries to be built as PIC
(this is slower)
media-video/transcode:pic - disable optimized assembly code that is
not PIC friendly
www-client/chromium:pic - Disable optimized assembly code that is not
PIC friendly

I suspect this flag got copy/pasted between various packages related
to ffmpeg. That's certainly how chromium ended up with it.

Personally, I think it should be renamed to "asm" or something similar
in the majority of cases where it actually disables all use of
assembly code.

Reply via email to