[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging for multiarch i386 sse2/non-sse2



Le 19/08/2013 03:05, Wookey a écrit :
> +++ Henrique de Moraes Holschuh [2013-08-18 21:39 -0300]:
>> On Sun, 18 Aug 2013, Adam Borowski wrote:
>>> C - ship both versions on i386 and switch between them on runtime
>>
>> The linker can select at runtime different sets of libraries depending on
>> some cpu flags.  I think it can do that for SSE2 just fine, you'd build two
>> libs: one without interesting intructions, and other with them, and place
>> them/name them appropriately for that to work, all in the same binary
>> package.
> 
> Right, but be careful not to confuse this functionality with
> multiarch. It's called 'multilib'. They both do essentially the same
> job (selecting libraries to load by paths), but with different
> paths/layouts and selection mechanisms. Multiarch paths are one per
> 'arch', which normally means an ABI, not an ISA. multilib paths form a
> matrix of all possible options so rapidly get out of hand if you have
> more than a couple. 
Oh, ok, thanks for pointing out the difference between multilib and
multiarch. Things get clearer now.


>> I think the glibc package does that, you might want to take a look at it.
> 
> Various packages in debian illustrate the techniques for packaging
> multiple ISA flavours. (mplayer, eglibc). I'm not sure that any of
> them use multilib paths to do this - they just use package naming so
> you choose whether to install 'libc6' or 'libc6-i686' (in the same
> paths). They are alternatives, not something than can be installed
> side by side in multilib locations and selected at runtime by the
> linker. (I haven't actually checked the package contents to confirm
> this).
> 
> Things could be packaged using multilib locations if you thought it
> was worth the effort. 

I had a look to eglibc source package. I can tell some dark magic is at
work in this package. But as I need only a small fragment of it, I'll
probably be able to extract it.

The result would be a "lib" package on all architectures, with sse2
enabled only on amd64 arch, and a "lib-sse2" package, recommended by
"lib", only present on "i386" arch.

The good news for me being that I can easily prepare a first version of
the package without multilib, and add the -sse2 version later without
breaking anything.

Thank you all for your help!

-- 
fabien


Reply to: