Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>
Cc: stable@vger.kernel.org, llvm@lists.linux.dev
Subject: [PATCH 5.4 1/6] ARM: 9448/1: Use an absolute path to unified.h in KBUILD_AFLAGS
Date: Mon, 11 Aug 2025 16:51:46 -0700	[thread overview]
Message-ID: <20250811235151.1108688-2-nathan@kernel.org> (raw)
In-Reply-To: <20250811235151.1108688-1-nathan@kernel.org>

commit 87c4e1459e80bf65066f864c762ef4dc932fad4b upstream.

After commit d5c8d6e0fa61 ("kbuild: Update assembler calls to use proper
flags and language target"), which updated as-instr to use the
'assembler-with-cpp' language option, the Kbuild version of as-instr
always fails internally for arch/arm with

  <command-line>: fatal error: asm/unified.h: No such file or directory
  compilation terminated.

because '-include' flags are now taken into account by the compiler
driver and as-instr does not have '$(LINUXINCLUDE)', so unified.h is not
found.

This went unnoticed at the time of the Kbuild change because the last
use of as-instr in Kbuild that arch/arm could reach was removed in 5.7
by commit 541ad0150ca4 ("arm: Remove 32bit KVM host support") but a
stable backport of the Kbuild change to before that point exposed this
potential issue if one were to be reintroduced.

Follow the general pattern of '-include' paths throughout the tree and
make unified.h absolute using '$(srctree)' to ensure KBUILD_AFLAGS can
be used independently.

Closes: https://lore.kernel.org/CACo-S-1qbCX4WAVFA63dWfHtrRHZBTyyr2js8Lx=Az03XHTTHg@mail.gmail.com/

Cc: stable@vger.kernel.org
Fixes: d5c8d6e0fa61 ("kbuild: Update assembler calls to use proper flags and language target")
Reported-by: KernelCI bot <bot@kernelci.org>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[nathan: Fix conflicts]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/arm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 4f098edfbf20..cb33ed8de5f8 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -136,7 +136,7 @@ endif
 
 # Need -Uarm for gcc < 3.x
 KBUILD_CFLAGS	+=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
-KBUILD_AFLAGS	+=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
+KBUILD_AFLAGS	+=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include $(srctree)/arch/arm/include/asm/unified.h -msoft-float
 
 CHECKFLAGS	+= -D__arm__
 
-- 
2.50.1


  reply	other threads:[~2025-08-11 23:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 23:51 [PATCH 5.4 0/6] Fix build due to clang -Qunused-arguments change Nathan Chancellor
2025-08-11 23:51 ` Nathan Chancellor [this message]
2025-08-12  4:12   ` [PATCH 5.4 1/6] ARM: 9448/1: Use an absolute path to unified.h in KBUILD_AFLAGS Sasha Levin
2025-08-11 23:51 ` [PATCH 5.4 2/6] kbuild: Update assembler calls to use proper flags and language target Nathan Chancellor
2025-08-12  4:12   ` Sasha Levin
2025-08-12 21:18     ` Nathan Chancellor
2025-08-11 23:51 ` [PATCH 5.4 3/6] mips: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation Nathan Chancellor
2025-08-12  4:12   ` Sasha Levin
2025-08-11 23:51 ` [PATCH 5.4 4/6] kbuild: Add CLANG_FLAGS to as-instr Nathan Chancellor
2025-08-12  4:12   ` Sasha Levin
2025-08-11 23:51 ` [PATCH 5.4 5/6] kbuild: add $(CLANG_FLAGS) to KBUILD_CPPFLAGS Nathan Chancellor
2025-08-12  4:12   ` Sasha Levin
2025-08-12 21:11     ` Nathan Chancellor
2025-08-11 23:51 ` [PATCH 5.4 6/6] kbuild: Add KBUILD_CPPFLAGS to as-option invocation Nathan Chancellor
2025-08-12  4:12   ` Sasha Levin

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=20250811235151.1108688-2-nathan@kernel.org \
    --to=nathan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=llvm@lists.linux.dev \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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