Big endian arm and arm64 kernel images fail to build with Google toolchain |
|||
Issue description
Attempts to build big endian arm64 or arm images fail with endianness mismatch errors.
Example:
/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.27.0/ld.bfd.real: arch/arm/mach-rockchip/sleep.o: compiled for a big endian system and target is little endian
/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.27.0/ld.bfd.real: failed to merge target specific data of file arch/arm/mach-rockchip/sleep.o
Problem appears to be that linker flags are not set correctly in the arm/arm64 kernel Makefiles to match our toolchain configuration. For arm64, the problem has been fixed upstream with kernel commit 3d6a7b99e3fa ("arm64: ensure the kernel is compiled for LP64"). For arm, the solution is currently unknown.
,
Oct 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/399e7d01120fe60dd93b7f64c7536f4a48256970 commit 399e7d01120fe60dd93b7f64c7536f4a48256970 Author: Andrew Pinski <apinski@cavium.com> Date: Fri Oct 06 04:24:45 2017 BACKPORT: arm64: ensure the kernel is compiled for LP64 The kernel needs to be compiled as a LP64 binary for ARM64, even when using a compiler that defaults to code-generation for the ILP32 ABI. Consequently, we need to explicitly pass '-mabi=lp64' (supported on gcc-4.9 and newer). BUG= chromium:772028 TEST=Build and run Change-Id: I886c57b1a0d0966a372f682cdc323786a1bd01c1 Signed-off-by: Andrew Pinski <Andrew.Pinski@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> Reviewed-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> [backport: Context conflicts] Signed-off-by: Guenter Roeck <groeck@chromium.org> (cherry picked from commit 3d6a7b99e3fa29b92d6288487e057e0a596bd2b0) Reviewed-on: https://chromium-review.googlesource.com/702679 Reviewed-by: Dmitry Torokhov <dtor@chromium.org> [modify] https://crrev.com/399e7d01120fe60dd93b7f64c7536f4a48256970/arch/arm64/Makefile
,
Oct 31
Given that gcc is on its way out, this will likely never be fixed. |
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Oct 6 2017