Needed for KERNEL_CLANG_VERSION if TARGET_KERNEL_CLANG_VERSION hasn't been set by the device config
It's boring to change it on each Google change ...
Change-Id: I1d682611cbf6c60d7ae6227b0b5afde591adf471
Linux kernel 6.11 has removed support for old libc versions by commit
[1]. The commit message implies it's done as part of retiring
RHEL/CentOS 7, CentOS 7 includes glibc 2.17, All glibc available from
AOSP are NOT newer than that version.
Before there's a better solution, use libc sysroot from host.
[1]: 3914cdde89
Change-Id: I9210a9b4742304214d90f7d319b06167f0508052
The issue of the multi-lined, wrongly expanded LINUX_COMPILER macro is
back (at least for kernel 4.14).
Funnily enough, setting "--hip-path=/dev/null", or using any other file
or directory that exists, would still make clang happy and give a
message stating that it detected HIP anyways:
Found HIP installation: /dev/null, version 3.5.0
To get around this issue, without doing monumental backports and
avoiding warnings from "-Wunused-command-line-argument", set
"HIP_PATH=none", where "none" simply indicates a non-existing
file/directory.
Change-Id: Ia97d69425716d28208ba344bde79a910e5f75c84
Signed-off-by: voidanix <voidanix@keyedlimepie.org>
This reverts commit 2baeb4fb8b.
CPATH is used for both host and target. Meaning that system headers
will be used for target compilation. It is also a higher priority than
isystem, which is used for the compiler include paths, making this
override the compiler headers.
Change-Id: I4d836698f25d2d97d917d323a22ee359b937fcb4
Starting with android common kernel 6.6, rust is enabled for arm64 gki.
It currently looks for rust version 1.73.0, so that was selected as the
default. This was only added for the clang compile path as gki requires
clang.
Change-Id: Ie7b57568d74cfb4a28a94c8dc8f4b5c622044317
Current logic defaults to no gcc if kernel major version is greater than
or equal to 5 and kernel minor version is greater than or equal to 10.
Meaning kernel version 6.1 does not qualify because 1 is less than 10.
So additionally check if kernel major version is greater than or equal
to 6 and ignore minor version for that case.
Change-Id: Id72cb9e100c6fed014d696f4a3a88f6cafcd3932
This fixes the following warnings:
13:04:54 Disallowed PATH tool "pahole" used: []string{"pahole", "--version"}
13:04:54 See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.
"pahole" is not allowed to be used. See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.
/home/bgcngm/android/lineage/kernel/oneplus/sm8550/scripts/pahole-flags.sh: 12: [: Illegal number:
/home/bgcngm/android/lineage/kernel/oneplus/sm8550/scripts/pahole-flags.sh: 16: [: Illegal number:
/home/bgcngm/android/lineage/kernel/oneplus/sm8550/scripts/pahole-flags.sh: 20: [: Illegal number:
Change-Id: Ice2a3753301a7b7782037fd35544e2831b258650
Make the conditions accurately reflect the comment:
"5.10+ can fully compile without GCC by default".
Change-Id: Ia9070871c23a710ba5b461ad522db241183e34d1
android11-5.4 kernel can fully compile with LLVM with a few cherrypicks
from android12-5.4 and android12-5.10
Change-Id: Ib71935d284ad78f1c23d039c15bfc5e0314a19eb
Darwin kernel build is not supported for >=5.10
and non-standard clang versions.
Another side effect is that it causes LD_LIBRARY_PATH
to get overwritten, which breaks certain configurations.
Let's just get rid of it since AOSP darwin build is no longer supported.
Change-Id: I9ac642996b90937bd9c52138fb06bf1eff901c8b
* GCC has been completely removed in AOSP but we keep it
for compatibility reasons with older kernels until they
are adapted to remove all the dependencies to GCC.
* Most updated 4.19+ kernels should be able to use LLVM
binutils out of the box. 4.14 is possible with a few patches
and 4.9 with even more patches.
* Make this the default and allow devices opting out by using
TARGET_KERNEL_LLVM_BINUTILS := false
Change-Id: I569cf290b41aaf2dc16ff9cc4cc6dc461f0d504e
* Remove KERNEL_LD from kernel.mk, we simply set LD in BoardConfigKernel
* Add llvm-ar in path allowlist (used by LTO)
Change-Id: I76addb6f9d8d413edb1832dba23082ffb6d5ebc3
On some devices we might want to build just the *.dtb files
that we actually need instead of the every dtb that exists.
Change-Id: Id7a152499d4ee1dd08f79d34cc34bfe959313515
gs101 uses DTBO_OBJ/arch/arm64/boot/dts/google/dtbo.img
vs DTBO_OBJ/arch/arm/boot/dtbo.img on previous devices.
Change-Id: I945d31cb093fae97385cf84c273088ee7a4edf0b
Avoids:
$ lunch lineage_sdk_phone_x86
grep: build/make/target/board/emulator_x86/Makefile: No such file or directory (x4)
Change-Id: Ie803d5ca93e6e7ae94625e7ee3ab0bf337e0515d
* Currently, because DTC_EXT make flag is in the
kernel task the only way to override it is to
have TARGET_KERNEL_ADDITIONAL_FLAGS come after.
Change-Id: If62ed979581dc07eafd4628ce2b2d799388d3704
* GCC was deprecated awhile ago, the large majority
of devices should now be using this. Clang should
be opt out as opposed to opt in.
Change-Id: Ie388aff8eca189663f2f615f7d059e47eaf2dce3
* TARGET_FORCE_PREBUILT_KERNEL should be useful when you don't have ready kernel sources (OEM releasing broken sources or releasing them lately)
* It lets you use kernel sources for userspace generated headers (generated_kernel_headers) while keeping using prebuilt kernel
* Keep in mind that generated kernel headers may not align with the ABI of kernel you're including
* This commit also partially revert commit a836d79, where TARGET_KERNEL_SOURCE would have been unset if TARGET_PREBUILT_KERNEL was defined (we already check in kernel.mk if kernel sources are present anyway)
Change-Id: I84acae890dabb5b9dbd48143ad58f6420c0cef75
* android-11 removed M4 from the Allowed list, and provided a
prebuilt binary in prebuilts/build-tools
Change-Id: I83d033ecd35a0e2318210e47309fcc010843347f
* Remove the separate dtbo.mk task and merge it
in kernel.mk
* Merge in-kernel and separated DTBO image generation
Change-Id: I2cae84095cbd3d68abbe1899a9cae34c8a1e5fc9
Our build/make changes break incremenetal builds with prebuilt dtb dir
(see discussion here: https://android-review.googlesource.com/c/platform/build/+/1134337/1/core/Makefile )
Instead of using the AOSP recipe, just define our own and use it by not defining
BOARD_PREBUILT_DTBIMAGE_DIR
Change-Id: If579b1670db447557b6f76ca79ecec22661c4080