Handling optimization flags in Debian packages
On Sun, Apr 04, 2010 at 23:49:59 (CEST), Felipe Sateler wrote:
> On 04/04/10 16:29, Tiago Bortoletto Vaz wrote:
>> Hi all,
>> I've faced an issue (#557550) which is much probably caused by a CPU
>> which doesn't support SSE2 instructions. I'm not sure about the best
>> way to address this. Any suggestion will be very welcome. Actually I
>> can see the following workarounds:
>> 1) consider that most of CPUs support this flag, so tell the reporter
>> to compile the package by him/herself.
>> 2) remove this specific flag during package building, ending with a
>> non-optimized software available for all users.
>> 3) create a specific -sse2 (or -non-sse2) package.
>> 4) ask the upstream to code runtime checks before using SSE2 specific
>> instructions (is that possible?).
> 5) Build twice, install both binaries in /usr/lib/package, and ship a
> wrapper script that calls the appropriate binary depending on the CPU
6) If the sse2 using code is placed in a shared library, then compile
twice, place the non-sse2 using version in /usr/lib, and the sse2 enabled
version in /usr/lib/i686/sse2. The dynamic linker /lib/ld-linux.so will
automatically pick up the correct version using the information provided
by the kernel.
FWIW, this is the approach I've sucessfully implemented in libavcodec.
Does anyone know if this works on kFreeBSD as well and cares to submit a
patch for ffmpeg? Especially for avcodec, this makes a significant
difference in nearly every media player application.
Reinhard Tartler, KeyID 945348A4
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact email@example.com
|All times are GMT. The time now is 03:53 PM.|
VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.