Commit eca5347d authored by Carlos Llamas's avatar Carlos Llamas Committed by Treehugger Robot
Browse files

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: default avatarNick Desaulniers <ndesaulniers@google.com>
Suggested-by: default avatarYifan Hong <elsk@google.com>
Change-Id: Ife1137ed4a19c48403e1a8c6a8af39d7e19f53b0
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
parent d10af859
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment