In Mesa sources, there is configs/linux-dri and configs/linux-dri-x86 , and one of them resets PIC_FLAGS = and another has PIC_FLAGS = -fPIC , and starting of opengl applications indeed is slower if -fPIC isn't used. Not a biggie, but I still think there could be USE flag "pic" for Mesa that sets this or not, for people that wants to still use it. prelink -amR of course complains if that isn't used, like.. a LOT, since many applications use libGL.so.1.2 Reproducible: Always Steps to Reproduce:
I'm assuming these are the upstream files. Which one sets -fPIC?
Actually PIC slowed things down for libGL, which is the reason it isn't used.
I don't see any slowdown, and prelink stopped complaining. configs/linux-dri sets -fPIC configs/linux-dri-x86 unsets -fPIC Yes, upstream files.
(In reply to comment #3) > I don't see any slowdown, and prelink stopped complaining. I assume by "see" you mean you didn't do any actual testing with numbers to compare. And no, glxgears doesn't count.
No I don't have glxgears installed, as it isn't even modularized yet. I mean UT2004 gaming FPS. it's same. Starting of OpenGL application seems a bit faster, like game called neverball. I used to compile these from upstream by hand with -fPIC and to be honest I didn't even notice it was "missing" now, until prelink flooded my terminal with "Cannot prelink against non-PIC shared library libGL.so.1"
Yes prelink will make starting faster, but I'm talking about runtime.
We could go on and on about that, and get no one to provide decent benchmarking information. :) But it would be pretty trivial to add that USE into mesa ebuild.. --cut-- if use pic; then echo "PIC_FLAGS = -fPIC" >> ${HOSTCONF} else echo "PIC FLAGS =" >> ${HOSTCONF} fi --cut-- ..for people loving fast startup times :)
Mesa is technically part of the modular release, so we can leave it on the modular tracker.
I asked Adam Jackson about this today: < ajax> i've seen a lot of numbers saying PIC is no slower, and very little saying it < ajax> 's faster < ajax> the assembly dispatch takes care of >99% of the performance problems that non-PIC libGL is supposed to solve < ajax> if anyone complains, please point them to me, preferably with testcase and numbers in hand He quite strongly recommended to force PIC on. If there are no objections we may as well do this.
It's got -fPIC by default in 6.4.1.
-fPIC didn't solve prelinking: prelink: /usr/bin/glxgears: Cannot prelink against non-PIC shared library /usr/lib/opengl/xorg-x11/lib/libGL.so.1.2 -fno-PIC should be optional with use flag.
I still have this problem by running "prelink -amR" (Cannot prelink against non-PIC shared library /usr/lib/opengl/xorg-x11/lib/libGL.so.1.2). A workaround is to compile media-libs/mesa with "-nptl": are this bug and/or bug #136115 really fixed? regards Guglie