From: Thomas Huth <thuth@redhat.com>
To: Chinmay Rath <rathc@linux.ibm.com>
Cc: npiggin@gmail.com, harshpb@linux.ibm.com, lvivier@redhat.com,
linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
andrew.jones@linux.dev, sbhat@linux.ibm.com
Subject: Re: [kvm-unit-tests RFC PATCH 2/6] configure: Make arch_libdir a first-class entity
Date: Mon, 6 Jul 2026 12:36:26 +0200 [thread overview]
Message-ID: <6e29ac41-383a-416c-bca4-c3d4349beda0@redhat.com> (raw)
In-Reply-To: <efbbe11b-9e02-4878-b61a-f804b491ab4c@linux.ibm.com>
On 03/07/2026 08.46, Chinmay Rath wrote:
>
> On 6/10/26 17:00, Thomas Huth wrote:
>> On 02/06/2026 08.48, Chinmay Rath wrote:
>>> 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 <rathc@linux.ibm.com>
>>> ---
>>> 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
next prev parent reply other threads:[~2026-07-06 10:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 6:48 [kvm-unit-tests RFC PATCH 0/6] powerpc improvements Chinmay Rath
2026-06-02 6:48 ` [kvm-unit-tests RFC PATCH 1/6] powerpc: add pmu tests Chinmay Rath
2026-06-08 12:45 ` Thomas Huth
2026-06-08 13:57 ` Thomas Huth
2026-06-10 9:27 ` Chinmay Rath
2026-06-10 11:33 ` Thomas Huth
2026-06-12 12:27 ` Chinmay Rath
2026-06-02 6:48 ` [kvm-unit-tests RFC PATCH 2/6] configure: Make arch_libdir a first-class entity Chinmay Rath
2026-06-02 15:54 ` Andrew Jones
2026-06-05 8:34 ` Chinmay Rath
2026-06-10 11:30 ` Thomas Huth
2026-07-03 6:46 ` Chinmay Rath
2026-07-06 10:36 ` Thomas Huth [this message]
2026-07-07 6:47 ` Chinmay Rath
2026-06-02 6:48 ` [kvm-unit-tests RFC PATCH 3/6] powerpc: Remove remnants of ppc64 directory and build structure Chinmay Rath
2026-06-02 6:48 ` [kvm-unit-tests RFC PATCH 4/6] powerpc: gitlab CI update Chinmay Rath
2026-06-08 12:48 ` Thomas Huth
2026-06-10 9:36 ` Chinmay Rath
2026-06-02 6:48 ` [kvm-unit-tests RFC PATCH 5/6] scripts/arch-run.bash: Fix run_panic() success exit status Chinmay Rath
2026-06-02 6:48 ` [kvm-unit-tests RFC PATCH 6/6] powerpc: Add a panic test Chinmay Rath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6e29ac41-383a-416c-bca4-c3d4349beda0@redhat.com \
--to=thuth@redhat.com \
--cc=andrew.jones@linux.dev \
--cc=harshpb@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lvivier@redhat.com \
--cc=npiggin@gmail.com \
--cc=rathc@linux.ibm.com \
--cc=sbhat@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox