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

Bug#666743: gcc-4.6: please provide a multiarch:foreign compiler interface



Package: gcc-4.6
Version: 4.6.3-1
Severity: wishlist

Dear gcc maintainers,

Motivation
~~~~~~~~~~
I would like to install ghc:i386 and gcc:amd64. Currently this is not
possible, because ghc depends on gcc and gcc is not multiarch:foreign
(which is correct of course). So can this work at all? I believe yes.
What ghc:i386 really wants is a C compiler producing i386 binaries and
such a compiler exists (gcc -m32).

Solution
~~~~~~~~
The gcc -m32 syntax is in no way generic (like /lib32 wasn't), but there
exists a generic syntax employing architecture triplets. For instance
gcc can be invoked as x86_64-linux-gnu-gcc on amd64. Other flavours such
as x86_64-w64-mingw32-gcc (gcc-mingw-w64) already exist. It would only
be natural to provide i386-linux-gnu-gcc (on amd64) as well. There would
have to be a multiarch:foreign package that can be depended upon (maybe
called gcc-i386?). With n architectures this would result in n^2 binary
packages (one for each host and target architecture combination).
ghc:$host would have to switch its dependency to gcc-$host. In addition
this change should make cross compilation radically easier.

I am aware that this task is huge. Is this feature worth the effort? Is
the drafted solution applicable? Are there other prerequisites needed
before changes to the gcc packages can be done?

Thanks for considering

Helmut



Reply to: