FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 04-05-2010, 09:47 AM
Reinhard Tartler
 
Default 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
> flags.

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.


--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87mxxi1b9h.fsf@faui44a.informatik.uni-erlangen.de">http://lists.debian.org/87mxxi1b9h.fsf@faui44a.informatik.uni-erlangen.de
 

Thread Tools




All times are GMT. The time now is 12:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org