[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a2fa1a31-e8bb-4659-9631-398b564e7c2b@app.fastmail.com>
Date: Fri, 28 Jul 2023 22:56:38 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Nathan Chancellor" <nathan@...nel.org>
Cc: "Tiezhu Yang" <yangtiezhu@...ngson.cn>,
linux-arm-kernel@...ts.infradead.org,
linux-riscv@...ts.infradead.org, loongarch@...ts.linux.dev,
Linux-Arch <linux-arch@...r.kernel.org>, bpf@...r.kernel.org,
linux-perf-users@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v3 1/2] asm-generic: Unify uapi bitsperlong.h for arm64, riscv and
loongarch
On Fri, Jul 28, 2023, at 19:31, Nathan Chancellor wrote:
> On Fri, Jul 28, 2023 at 01:00:30PM +0200, Arnd Bergmann wrote:
>>
>> of the uapi version. The sanity check in the kernel-side header
>> is intended to cross-check the CONFIG_64BIT value against the
>> __BITS_PER_LONG constant from the header.
>>
>> My first guess would be that this only worked by accident if the headers
>> defaulted to "#define __BITS_PER_LONG 32" in and #undef CONFIG_64BIT"
>> when include/generated/autoconf.h, but now the __BITS_PER_LONG value
>> is actually correct.
>
> That seems like a reasonable theory. I am still busy looking into other
> things today but I can try to double back to this on Monday if you don't
> make any progress.
I tried reproducing this today on arm64 Debian with linux-6.5-rc3
and clang-14.0.6 but I don't see the problem here. With 'make V=1'
I see command for building scripts/sorttable is
clang -Wp,-MMD,scripts/.sorttable.d -Wall -Wmissing-prototypes \
-Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 \
-I./tools/include -I./tools/arch/x86/include -DUNWINDER_ORC_ENABLED \
-o scripts/sorttable scripts/sorttable.c -lpthread
which does create an arm64 executable but includes the x86 headers,
which is clearly a bug by itself, it just doesn't trigger the problem
for me.
I also noticed that your command line includes CROSS_COMPILE=x86_64-linux-
rather than CROSS_COMPILE=x86_64-linux-gnu-, and I think we've had
problems with that in the past, when "clang --target=x86_64-linux"
fails to find the glibc system headers.
Arnd
Powered by blists - more mailing lists