Commit Graph

11 Commits

Author SHA1 Message Date
Yifan Hong
dac17bb8f7 ANDROID: kleaf: move NDK_TRIPLE for arm to build.config.constants.
... so it can be read by Bazel @kernel_toolchain_info
later.

Test: TH
Bug: 272164611
Change-Id: I04648f8fb28537544287797673810946dedb58f3
Signed-off-by: Yifan Hong <elsk@google.com>
2023-05-09 22:36:11 +00:00
Nick Desaulniers
766ce14553 ANDROID: build.config: set NDK_TRIPLE
In order to support CONFIG_UAPI_HEADER_TEST=y with a bionic sysroot
using prebuilt bionic from the NDK, we need to set a different target
triple for USERCFLAGS than what's used when cross compiling the kernel
(so that the correct headers and libc.{a|so} are found+used).

Bug: 190019968
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ib3e60c41b862cda9f79ff8d2c812aaa8bfb571af
2022-04-05 14:09:03 -07:00
Nick Desaulniers
edce52103b ANDROID: remove stale variables from build.config files
LLVM_IAS=1 is implied by LLVM=1 as of LLVM_IAS as of v5.15-rc1 via
commit f12b034afe ("scripts/Makefile.clang: default to LLVM_IAS=1").

CROSS_COMPILE is no longer necessary when building with LLVM=1 as of
v5.15-rc1 via:
commit 231ad7f409 ("Makefile: infer --target from ARCH for CC=clang")

There is no need for CROSS_COMPILE_COMPAT as of v5.16-rc1 via
commit 3e6f8d1fa1 ("arm64: vdso32: require CROSS_COMPILE_COMPAT for gcc+bfd")
when LLVM=1 is set.

LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN was a temporary dependency until
LLVM_IAS=1 was enabled for all architectures. With LLVM_IAS=1 (implied
by LLVM=1), nothing in this directory is used and the variable can be
removed.

It doesn't hurt to respecify any of the above, but they are no longer
necessary.

Bug: 209655537
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I361b05ea9f36da933e6712150650f476b093d0a7
2021-12-09 23:48:18 +00:00
Nick Desaulniers
e35d771d9c Revert "Revert "ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for arm""
This reverts commit bf26739cc6.

It enables LLVM_IAS=1 for ARCH=arm. It was previously submitted out of
order from the rest of the series, due to mistaken use of Rebase in
gerrit UI.

Bug: 183031914
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ib483f71e9cad17ba9eed1bfc077e3dc90f449d13
2021-03-19 17:27:06 -07:00
Nick Desaulniers
bf26739cc6 Revert "ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for arm"
This reverts commit db43b1c9b5.

aosp/1560153 was rebased out of order from the rest of the commits in
the series it depended on, then autosubmitted. Revert and reland in
order.

Bug: 141693040
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Id894232c7350d601d2b29d9f7310bd0af54c0719
2021-03-19 11:33:33 -07:00
Nick Desaulniers
db43b1c9b5 ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for arm
Step 8 of:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/BINUTILS_KERNEL_DEPRECATION.md

Bug: 141693040
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I092cc14194fae5fba42c9a09b8eb8dd2adcb1377
2021-03-19 17:43:18 +00:00
Alistair Delva
523c132fd6 ANDROID: ARM: Use zImage instead of Image
Nothing seems to support booting uncompressed ARM 32-bit kernels, and
everything supports zImage, so change the default on 32-bit to zImage.

More information about this:
http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html

Bug: 165410044
Test: booted zImage on cuttlefish
Change-Id: I130d38737643dc092900e57e117ac268f6a9bd07
Signed-off-by: Alistair Delva <adelva@google.com>
2020-11-13 15:56:44 +00:00
Nick Desaulniers
2c71673913 Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple"
This reverts commit e145f7b103.

AOSP's distribution of GNU binutils always had a curious target triple
prefix on the binaries.  Now that GNU binutils is deprecated for Android
Common Kernels, we can now remove this out of tree workaround. Now
building Android kernels with LLVM matches upstream (see
Documentation/kbuild/llvm.rst).

Bug: 118439987
Bug: 120440614
Bug: 141693040
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Iecaa3264a440f795f2f3a44bdf74fe28ad4ed1cc
2020-11-10 10:53:26 -08:00
Nick Desaulniers
0482d56a8f ANDROID: move builds to use gas prebuilts
Completes stage 5 of:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/BINUTILS_KERNEL_DEPRECATION.md

Bug: 141693040
Test: remove host binutils (easy for cross compiling, hard for host
tools), rebuild multiple configs including cuttlefish configs which rely
on these.
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ia88f4f6572049c0173742aee95df824c0f31c050
2020-09-30 20:08:29 +00:00
Alistair Delva
b194c75018 ANDROID: Specify MAKE_GOALS and optimize targets
The default goals for an ARCH=arm64 kernel will build all of the dtb
files available in the tree, and hard-codes the generation of a
gzip-compressed Image artifact. For GKI, we want to support various
compression methods (gz, lz4 and uncompressed) and this can be handled
outside of kbuild where compressor flags can be tuned. Also, GKI does
not need to build any dtb files because it is board-neutral, and in most
cases the dtbs will come from downstream kernels, not ACK.

On arm and aarch64, this suppresses the generation of the useless gzip
compressed Image artifact, and dtbs on the gki configs, which do not make
sense. The x86 defaults were already optimal but make them match
aarch64. On db845c, this builds only the needed dtb file and a compressed
artifact for backwards compatibility.

Bug: 152546767
Change-Id: If90ea331fc7564358b77a777fb367d7d2f95e6a6
Signed-off-by: Alistair Delva <adelva@google.com>
2020-03-27 01:55:37 +00:00
Alistair Delva
619982ebe2 ANDROID: Add build.config files for ARM 32-bit
Enables us to catch build-breaks for 32-bit ARM with an allmodconfig
build in continuous integration testing.

Bug: 151459448
Change-Id: I825a18771c214e6389fc2755fce20c8fc2531695
Signed-off-by: Alistair Delva <adelva@google.com>
2020-03-13 21:43:21 +00:00