New issue
Advanced search Search tips

Issue 819808 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Support 32-bit ARM kernel builds with clang

Project Member Reported by mka@chromium.org, Mar 7 2018

Issue description

Currently it is not possible to build ARM 32-bit kernels with clang. Work with upstream to get this supported and with the CrOS toolchain team if changes in clang are needed.

Note: As of now no CrOS devices based on 32-bit ARM use a kernel built with clang (>= v4.4). Adding support for arm32+clang is only needed if arm32 devices are upgraded to a kernel >= v4.4.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/d2efb53a411b91e6d41236f54642eadab7ed0789

commit d2efb53a411b91e6d41236f54642eadab7ed0789
Author: Matthias Kaehlcke <mka@chromium.org>
Date: Thu Mar 08 03:46:34 2018

arm-generic: Stick to gcc for building the v4.4 kernel

CL:809774 changes the default compiler for v4.4 kernel builds to
Clang. The kernel currently doesn't support the use of Clang for
arm32 builds. Keep using gcc for the arm-generic kernel.

BUG=chromium:702741, chromium:819808
TEST=w/ CL:809774
  emerge-arm-generic chromeos-kernel-4_4
    => build succeeds

Change-Id: I6cc44e70a97878bf1b335d6465cb070c17a03148
Reviewed-on: https://chromium-review.googlesource.com/950125
Commit-Ready: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/d2efb53a411b91e6d41236f54642eadab7ed0789/overlay-arm-generic/profiles/base/package.use

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ae641dbc7ea860fc334b6a6f1969bfef02d13c56

commit ae641dbc7ea860fc334b6a6f1969bfef02d13c56
Author: Matthias Kaehlcke <mka@chromium.org>
Date: Thu Mar 08 03:46:32 2018

cros-kernel2: Don't allow to use Clang for 32-bit ARM kernel builds

As of now the kernel does not support Clang for 32-bit ARM. Make this
explicit, rather than having kernel builds fail with non-obvious
error messages.

BUG=chromium:702741, chromium:819808
TEST=USE=clang emerge-arm-generic chromeos-kernel-4_4
    => fails with:
      die "Building a 32-bit ARM kernel with clang is not supported.";
  USE=clang emerge-kevin chromeos-kernel-4_4
    => build succeeds

Change-Id: I89e9e52301b6d294a873053b395d40db1ee50baa
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/950230
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>

[modify] https://crrev.com/ae641dbc7ea860fc334b6a6f1969bfef02d13c56/eclass/cros-kernel2.eclass

Comment 3 by mka@chromium.org, Mar 20 2018

I was just cc-ed on this upstream patchset to support building 32-bit ARM kernels with clang:

https://lkml.org/lkml/2018/3/20/837

https://patchwork.kernel.org/patch/10298139/

Sign in to add a comment