Skip to content

Add ILP32 support in aarch64

Gustavo Zacarias buildroot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 5 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 5 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Buildroot] [PATCH 0/5] Add ILP32 support in aarch64
Quoted 3 lines · Bamvor Zhang
Quoted 2 lines

1) You're using -mabi unconditionally.
Current default gcc is 4.8.x which doesn't understand -mabi for aarch64.

Yes.

This is bad for the scenario where gcc = default = 4.8.x and we use lp64 (default as well).
Since you're setting BR2_GCC_TARGET_ABI to lp64 in patch 4 and this is used in package/gcc/gcc.mk it causes breakage for: internal toolchain, aarch64 BE or LE, lp64.
Just make it empty, it's the default for gcc and that won't change:

arch/Config.in.aarch64 -> default "" if BR2_AARCH64_LP64

It's not "pretty" but it works just fine and reflects previous behaviour.

Quoted 4 lines
Quoted 2 lines

This will only fix the ILP32 problem, doesn't help for -mabi=lp64 though (point 1).

Well, do you mean I should handle -mabi=lp64 as well? It is the default api in aarch64 gcc 4.9.x. It may be useful when build the kernel.

See solution above.

Quoted 7 lines
Quoted 4 lines

3) ILP32 little endian doesn't build with gcc 4.9.x/binutils 2.25/glibc 2.20: it results in an internal compiler error while building glibc, so very likely gcc's fault. This should be handled as well, by fixing it or disabling the internal toolchain backend for this combination.

I guess linaro has the patch in it while I hope I could deal with it after the external toolchain patches is accept. Do you comfortable with only external toolchain support at this time?

Yes that's not a problem, it'll probably be part of some future release and then we can unleash it.
Or add the patch(es) if they're small and non-intrusive. Regardless it may be an external-only option at this point since ILP32 is labelled as beta all over the place.
Regards.