ANDROID: kleaf: fix kselftests build for arm 32bit
When the kselftests are built for 32b ARM, we use the compiler flag '--target=arm-linux-androideabi31' but do not specify the default CPU target. This causes calls to '__sync_bool_compare_and_swap' in the kselftest harness to be expanded to a libcall to '__sync_val_compare_and_swap_1'. This function is explicitly deprecated by GCC's own docs, and LLVM's compiler-rt does not provide it, resulting in a linkage failure when building the selftests for arm32. Explicitly specify a target CPU so that LLVM can expand this intrinsic call inline properly. The kernel should look to use (the admittedly less ergonomic) '__atomic_compare_exchange' instead. Bug: 342476493 Suggested-by:Nick Desaulniers <ndesaulniers@google.com> Suggested-by:
Yifan Hong <elsk@google.com> Change-Id: Ife1137ed4a19c48403e1a8c6a8af39d7e19f53b0 Signed-off-by:
Carlos Llamas <cmllamas@google.com>
Loading
Please sign in to comment