[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQTNU0GopxtHCYLDGrV5mDnkMfTydiW2SAHW3uV_bCc9w@mail.gmail.com>
Date: Wed, 18 Jun 2025 11:37:24 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-kbuild@...r.kernel.org, Nicolas Schier <nicolas@...sle.eu>
Subject: Re: as-instr in Kbuild broken for arch/arm
On Wed, Jun 18, 2025 at 5:04 AM Nathan Chancellor <nathan@...nel.org> wrote:
>
> Hi Masahiro,
>
> I backported commit d5c8d6e0fa61 ("kbuild: Update assembler calls to use
> proper flags and language target") to 5.4 due to an upstream clang
> change that necessitates this [1] but it causes a failure for as-instr
> with arm [2] because arch/arm/Makefile uses '-include asm/unified.h' for
> KBUILD_AFLAGS but LINUXINCLUDE is not present in the as-instr command,
> resulting in
>
> <built-in>:1:10: fatal error: 'asm/unified.h' file not found
> 1 | #include "asm/unified.h"
> | ^~~~~~~~~~~~~~~
> 1 error generated.
>
> There does not appear to be any uses of as-instr within Kbuild (as
> opposed to Kconfig) for arch/arm after commit 541ad0150ca4 ("arm: Remove
> 32bit KVM host support") in 5.7 but as far as I can tell, it is still
> possible to hit this issue in upstream if one were to be added.
>
> I see two obvious solutions but I am not sure what you would prefer.
The latter because this is more consistent with the existing cases.
The answer is in LINUXINCLUDE itself.
-include $(srctree)/include/linux/compiler-version.h \
-include $(srctree)/include/linux/kconfig.h
If we include them in a relative path, we would do:
-include linux/compiler-version.h \
-include linux/kconfig.h
Apparently, we always did this in an absolute path.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists