public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Nathan Chancellor" <nathan@kernel.org>
Cc: "Tiezhu Yang" <yangtiezhu@loongson.cn>,
	linux-arm-kernel@lists.infradead.org,
	linux-riscv@lists.infradead.org, loongarch@lists.linux.dev,
	Linux-Arch <linux-arch@vger.kernel.org>,
	bpf@vger.kernel.org, linux-perf-users@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH v3 1/2] asm-generic: Unify uapi bitsperlong.h for arm64, riscv and loongarch
Date: Fri, 28 Jul 2023 22:56:38 +0200	[thread overview]
Message-ID: <a2fa1a31-e8bb-4659-9631-398b564e7c2b@app.fastmail.com> (raw)
In-Reply-To: <20230728173103.GA1299743@dev-arch.thelio-3990X>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-07-28 20:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 14:13 [PATCH v3 0/2] Unify uapi bitsperlong.h Tiezhu Yang
2023-06-22 14:13 ` [PATCH v3 1/2] asm-generic: Unify uapi bitsperlong.h for arm64, riscv and loongarch Tiezhu Yang
2023-07-27 21:36   ` Nathan Chancellor
2023-07-28 11:00     ` Arnd Bergmann
2023-07-28 17:31       ` Nathan Chancellor
2023-07-28 20:56         ` Arnd Bergmann [this message]
2023-07-28 23:44           ` Nathan Chancellor
2023-07-29  7:59             ` Arnd Bergmann
2023-07-29 17:46               ` Nathan Chancellor
2023-07-29 21:12                 ` Arnd Bergmann
2023-07-31 16:04                   ` Nathan Chancellor
2023-06-22 14:13 ` [PATCH v3 2/2] tools arch: Remove uapi bitsperlong.h of hexagon and microblaze Tiezhu Yang
2023-06-22 15:09 ` [PATCH v3 0/2] Unify uapi bitsperlong.h Arnd Bergmann
2023-07-14 18:34   ` Ian Rogers
2023-07-14 19:56     ` Arnd Bergmann

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=a2fa1a31-e8bb-4659-9631-398b564e7c2b@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=bpf@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=loongarch@lists.linux.dev \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=nathan@kernel.org \
    --cc=yangtiezhu@loongson.cn \
    /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