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

Re: Multiarch question



Michael Wild <themiwi@users.sourceforge.net> writes:

> 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
>
> Particularly, the case where both linux and kfreebsd directories are
> present is of interest. How would one tell gcc to use the foreign kernel?
>
> 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.
>
> Thanks for any hints
>
> Michael

i386-linux-gnu-gcc automatically uses /usr/{lib,include}/i386-linux-gnu.
x86_64-linux-gnu-gcc automatically uses /usr/{lib,include}/x86_64-linux-gnu.
and so on...

What you are talking about here is cross-compiling. The special case of
gcc -m32/-m64 on some archs might even go away and just use cross
compilers for that as well.

Note: Don't use the GNU triplet for the multiarch dir. Use
dpkg-architecture -qDEB_HOST_MULTIARCH.

MfG
        Goswin


Reply to: