Re: [kvm-unit-tests RFC PATCH 2/6] configure: Make arch_libdir a first-class entity
From: Thomas Huth <hidden>
Date: 2026-07-06 10:36:32
Also in:
kvm
On 03/07/2026 08.46, Chinmay Rath wrote:
On 6/10/26 17:00, Thomas Huth wrote:quoted
On 02/06/2026 08.48, Chinmay Rath wrote:quoted
From: Nicholas Piggin <npiggin@gmail.com> arch_libdir was brought in to improve the heuristic determination of the lib/ directory based on arch and testdir names, but it did not entirely clean that mess up. Remove the arch_libdir->arch->testdir heuristic and just require everybody sets arch_libdir correctly. Fail if the lib/arch or lib/arch/asm directories can not be found. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Chinmay Rath <redacted> --- Makefile | 2 +- configure | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-)FYI, this patch seems to trigger yet another issue with Clang (I used v21): clang -no-integrated-as -std=gnu99 -ffreestanding -O2 -msoft-float -mno- altivec -I /root/kvm-unit-tests/lib -I /root/kvm-unit-tests/lib/libfdt -I lib -Wa,-mregnames -fverbose-asm -S -o lib/powerpc/asm-offsets.s lib/ powerpc/asm-offsets.c lib/powerpc/asm-offsets.c:10:10: error: 'asm/smp.h' file not found with <angled> include; use "quotes" instead 10 | #include <asm/smp.h> | ^~~~~~~~~~~ | "asm/smp.h" In file included from lib/powerpc/asm-offsets.c:10: lib/powerpc/asm/smp.h:5:10: fatal error: 'asm/processor.h' file not found 5 | #include <asm/processor.h> | ^~~~~~~~~~~~~~~~~ 2 errors generated. Could you please have a look?Hi Thomas, back from traveling and looked into this. I am using Clang v21 as well : # clang --version clang version 21.1.8 (Fedora 21.1.8-4.fc43) Target: ppc64le-redhat-linux-gnu Thread model: posix InstalledDir: /usr/bin Configuration file: /etc/clang/ppc64le-redhat-linux-gnu-clang.cfg I see the above file, asm-offsets.s being generated properly without any error during the make process (used the extra flags for make that I have mentioned in my other reply). Snippet from make : cat powerpc/boot_rom.bin.tmp >> powerpc/boot_rom.bin rm -f powerpc/boot_rom.bin.tmp clang -no-integrated-as -Wa,-mpower10 -std=gnu99 -ffreestanding -O2 -msoft- float -mno-altivec -I /root/chins/git/kvm-unit-tests/lib -I /root/chins/ git/kvm-unit-tests/lib/libfdt -I lib -Wa,-mregnames -fverbose-asm -S -o lib/ powerpc/asm-offsets.s /root/chins/git/kvm-unit-tests/lib/powerpc/asm-offsets.c (set -e; echo "#ifndef __ASM_OFFSETS_H__"; echo "#define __ASM_OFFSETS_H__"; echo "/*"; echo " * Generated file. DO NOT MODIFY."; echo " *"; echo " */"; echo ""; sed -ne 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; /^->/ {s:->#\(.*\):/* \1 */:; s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}' lib/powerpc/asm-offsets.s; echo ""; echo "#endif" ) > lib/ powerpc/asm-offsets.h cp -f lib/powerpc/asm-offsets.h lib/generated/ clang -no-integrated-as -Wa,-mpower10 -std=gnu99 -ffreestanding -O2 -msoft- float -mno-altivec -I /root/chins/git/kvm-unit-tests/lib -I /root/chins/ git/kvm-unit-tests/lib/libfdt -I lib -Wa,-mregnames -g -MMD -MP -MF powerpc/.selftest.d -fno-strict-aliasing -fno-common -Wall -Wwrite-strings - Wempty-body -Wuninitialized -Wignored-qualifiers -Wno-missing-braces -Werror -fomit-frame-pointer -fno-stack-protector -Wno-frame-address -fno-pic -Wunused-but-set-parameter -Wno-override-init -Wmissing-prototypes - Wstrict-prototypes -mlittle-endian -c -o powerpc/selftest.o /root/chins/ git/kvm-unit-tests/powerpc/selftest.c Infact, if I just execute that single command independently to build asm- offsets.s, it works as well.
Ok, I finally got access to a POWER system again and tried to reproduce the issue, but I also cannot reproduce it anymore. No clue how I managed to get into that situation, but looks like it was rather due to a messed up build tree than due to your patch. So sorry for the trouble, and please go ahead and simply ignore my objection here. Thanks, Thomas