[Ksummit-discuss] [CORE TOPIC] More useful types in the linux kernel

Linus Walleij linus.walleij at linaro.org
Fri Jul 22 12:44:17 UTC 2016


On Fri, Jul 22, 2016 at 1:19 PM, David Howells <dhowells at redhat.com> wrote:

I'm just gonna hijack this to ask a question...

> I currently maintain a set of 26 cross-compilers (ppc64 is a box of symlinks)
> for building the kernel and bootloaders with gcc on Fedora:
(...)
>         gcc-arm-linux-gnu.x86_64                     5.3.1-2.fc23   updates

I've tested this thing and it works flawlessly with the kernel.
Also U-boot recently supplies its own div64 routine and dropped
the dependency on libgcc.a (IIRC).

So it works, but still of course this thing is there:

rpm -ql gcc-arm-linux-gnu-6.1.1-1.fc24.x86_64
(...)
/usr/lib/gcc/arm-linux-gnueabi/6.1.1/libgcc.a

Also this:

/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtbegin.o
/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtbeginS.o
/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtbeginT.o
/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtend.o
/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtendS.o
/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtfastmath.o

I suspect these things are implicitly compiled for one and only one ISA?
I honestly don't know how to even check which one. Does it use
hardfloat? Or has this problem of targetting several ISAs with a .a
file been fixes since I looked at it last?

I need to cross-compile ARMv4, ARMv5, ARMv6, ARMv7 and
ARMv8 for my systems. (Sorry for all old crap I'm keeping it's just
my job...)

That ABI problem is then manifolded if I would want to do anything
userspace, so I keep a whole range of tailored cross compilers and
prebuilt C libraries around that I know "just work", but I guess will
grow increasingly hard to maintain and it feels pretty unelegant at
times.

Is there a way for a distribution to provide a proper set of
ISA-specific stuff alongside a crosscompiler, if the crosscompiler
supports several different ISAs, like the ARMvN variants do?

Yours,
Linus Walleij


More information about the Ksummit-discuss mailing list