arch/arm64/kvm/hyp/nvhe/hyp-reloc.S:5:11: error: unknown relocation name
.reloc 0, R_AARCH64_PREL32, __hyp_section_.hyp.text + 0x2fe8
^
Thanks
Jindong
On Tue, Mar 30, 2021 at 6:36 PM Jindong Yue <jindo...@nxp.com> wrote:
>
> Hello andorid-llvm team:
Hi Jindong,
> I met one kernel build error using clang11 assembler, when I switched to use GNU as or clang12, the build error gone.
Moving to clang for the assembler for the kernel should only be done
for devices launching on Android 12 (S).
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/BINUTILS_KERNEL_DEPRECATION.md
has directions.
prebuilts/gas/linux-x86/ should not be necessary; either LLVM_IAS=1
can be used, or the old GAS can be used from prebuilts/gcc/. See
also:
https://source.android.com/devices/architecture/kernel/android-common#feature-and-launch-kernels
LLVM_IAS=1 is only support for S "launch kernels." It sounds like
you're trying to use LLVM_IAS=1 on an older kernel or platform
release.
> My android platform code is based on android-11.0.0_r32 tag, kernel is merged with common/android12-5.10 branch, clang11 version is clang-r383902b, clang12 version is clang-r412851.
> For GNU as, I need add "prebuilts/gas/linux-x86" git and remove "LLVM_IAS=1";
> For clang12, I need add clang-r412851 from master branch to android11 branch.
> So in such case, should I use GNU as or clang12 as?
> Is it possible to add clang-r412851 to AOSP android11 branch?
No, the android11 release is done.
On Wed, Mar 31, 2021 at 6:37 PM Jindong Yue <jindo...@nxp.com> wrote:
>
> Thanks for your guide, I have tried to use the master branch of platform/prebuilts/clang/host/linux-x86.git, but I indeed met some build errors when "m bootimage" as below. Should I use another branch or specific revision? Or is it a bug? Thanks.
This looks like you perhaps updated the _platform_ manifest to use a
newer version of prebuilts/clang/host/linux-x86/. My recommendation
was to update the _kernel_ manifest. This depends on building the
kernel image separately from the platform. Google does not build the
kernel as part of the platform builds, and I don't it's recommended or
even supported. This helps ensure kernel headers aren't accidentally
included from kernel sources, rather than bionic (IIUC).
For such kernel builds, android blueprint .bp files are not involved
as part of the build. Your errors below look like new fields that
exist in Android.bp in AOSP, but probably not supported in R release.