]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kbuild: userprogs: fix bitsize and target detection on clang
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Thu, 13 Feb 2025 14:55:17 +0000 (15:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:25 +0000 (11:07 +0100)
commit64ccf310c5f9f0ab504317aa9e032f804572dda5
tree62b18f3a36da237f209f3951e8250b8e54147d54
parentd6b7d4badd9e4fd5e9d4fad55c83725af1ec41f1
kbuild: userprogs: fix bitsize and target detection on clang

commit 1b71c2fb04e7a713abc6edde4a412416ff3158f2 upstream.

scripts/Makefile.clang was changed in the linked commit to move --target from
KBUILD_CFLAGS to KBUILD_CPPFLAGS, as that generally has a broader scope.
However that variable is not inspected by the userprogs logic,
breaking cross compilation on clang.

Use both variables to detect bitsize and target arguments for userprogs.

Fixes: feb843a469fb ("kbuild: add $(CLANG_FLAGS) to KBUILD_CPPFLAGS")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Makefile