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

Re: Multiarch question



Den 09. juni 2011 12:18, skrev Michael Wild:
> Hi all
> 
> I have a question concerning multiarch [1,2]. From what I read it is
> conceivable to have something like this on a system:
> 
> /usr/{lib,include}/i386-linux-gnu
> /usr/{lib,include}/x86_64-linux-gnu
> /usr/{lib,include}/x86_64-kfreebsd-gnu
> /usr/{lib,include}/sparc64-linux-gnu

I think only lib is addressed by multiarch at present, include dirs
aren't. Until cross-compilation is addressed in the spec, headers should
follow normal cross-compilation rules (/usr/$arch/include).

Ref: http://lists.debian.org/debian-devel/2011/04/msg01003.html

> Particularly, the case where both linux and kfreebsd directories are
> present is of interest. How would one tell gcc to use the foreign kernel?

gcc doesn't use a kernel. Do you mean cross-compilation? Multiarch
doesn't explicitly address ways to use foreign arches, so you would
cross-compile exactly the same way as before. (You do know how a
cross-compiler is configured, right?)

In general, it's *native* compilation that would change; libs would be
installed into /usr/lib/$(dpkg-architecture -qDEB_BUILD_MULTIARCH)
instead of plain /usr/lib (and some fields would be added to
debian/control, of course). If that's done, users will be able to
install packages from foreign arches in parallel with the same packages
for their native arches, if they like. Not much else would change.

I suppose that a (native) linker might want to look in /usr/lib/$arch in
addition to plain /usr/lib. Debian's toolchain probably do now.

> The background of this question is that at the moment Clang is
> completely broken w.r.t. multiarch and I'm looking into fixing it.

Well, maybe you should say what the problem is...


Reply to: