#770423 More GCC multiarch/cross

Package:
gcc
Source:
gcc-defaults
Description:
GNU C compiler
Submitter:
Robert de Bath
Date:
2014-11-21 06:48:07 UTC
Severity:
wishlist
#770423#5
Date:
2014-11-21 06:44:48 UTC
From:
To:
I continue to be impressed on how far multiarch is getting but as always I
wish for more...

I can successfully do this:

# OTHER=armhf
# dpkg --add-architecture $OTHER
# apt-get update
# apt-get install qemu-user-binfmt hello:$OTHER -y
# hello
Hello, world!
# file `which hello`
/usr/bin/hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.26,
BuildID[sha1]=0x4c2e100656ca58942705d1e5318f7a5a76aeea39, stripped
# file `which file`
/usr/bin/file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.26,
BuildID[sha1]=0xd6ffe91c953260380237096e219c9b80e5abb8b7, stripped
#
# apt-get install gcc:$OTHER libc6-dev:$OTHER make:$OTHER -y
# gcc -o hi hi.c
# ./hi
Hi there
# file ./hi
./hi: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked
(uses shared libs), for GNU/Linux 2.6.26,
BuildID[sha1]=0xf4c684569858d35787e15264b18e00fd95e9b849, not stripped
#

It all works wonderfully, except, it replaces the native GCC.

I can do the same with "gcc-mingw-w64-i686", including running the
resulting executable (with wine), BUT that doesn't force the current GCC
to be uninstalled.

So, from here it looks like "surely it's easy to ..."

I see two possible solutions. Making the entire of GCC fully multiarch
or adding matched cross compile sets.

When is this likely to happen ?  :-)
ie: How easy is it really!!

PS: Just in case: # apt-get remove --purge .\*:armhf