From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B60E220680; Sun, 24 Aug 2025 05:45:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756014302; cv=none; b=OpMVCJpPHNKDlAD1ANDFXT4n1bdJxXgYm9pSsrmsAIjbfKFL3fHgjvMYueZ+IHJgGl8lWJ0VvnHUbVHlMd5H8JTdPqca9AhO7X+eMpS/MT9gUoOqUCUNHbnUHiLMOdR38G0Afk3LpYzhFTwe8VC7VZ9EqLjDpH3r6lKrFq53RZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756014302; c=relaxed/simple; bh=kyRhEHONyMaoLA/pE1TYOXmdFDrU4264Lfo4L4LlRuQ=; h=Subject:To:Cc:From:Date:In-Reply-To:Message-ID:MIME-Version: Content-Type; b=EcDihsDWoc/QCtM0VYOLXP9drTXEcfP1NbEKULsxl+wC543rK9ZqCuVHo34J1MXHx+uEFVuT5GUdAVJrZL8cQEUSKoBBQ7P9zd+RYcukA4hKuM9+FAGKUP/s/Dzx6jVYIrAjVaXn3TN1Ohjgzb0J0vUHl7mfNfUSiowLzThPA0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1dcTJk1n; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1dcTJk1n" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB075C4CEEB; Sun, 24 Aug 2025 05:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756014302; bh=kyRhEHONyMaoLA/pE1TYOXmdFDrU4264Lfo4L4LlRuQ=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=1dcTJk1nYANqYrOS0AoNzT34tNjSpJGJvJ8BaTQsWk+fBZMM99EievIoCfZPg62TQ 7ra8y2WYfOAY9P2lcB15EvNdOTshoUq+oeKbByKCgo/fzHuq4pXVe8bw0DtVQ0nrI8 kflM8co3cZdMr77K/I4nTSEK8FBQYuWg4lL7jCA8= Subject: Patch "kbuild: Add CLANG_FLAGS to as-instr" has been added to the 5.4-stable tree To: gregkh@linuxfoundation.org,llvm@lists.linux.dev,masahiroy@kernel.org,nathan@kernel.org,sashal@kernel.org Cc: From: Date: Sun, 24 Aug 2025 07:44:51 +0200 In-Reply-To: <20250811235151.1108688-5-nathan@kernel.org> Message-ID: <2025082451-tinsel-deliverer-6442@gregkh> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-stable: commit X-Patchwork-Hint: ignore This is a note to let you know that I've just added the patch titled kbuild: Add CLANG_FLAGS to as-instr to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kbuild-add-clang_flags-to-as-instr.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From stable+bounces-167085-greg=kroah.com@vger.kernel.org Tue Aug 12 01:52:35 2025 From: Nathan Chancellor Date: Mon, 11 Aug 2025 16:51:49 -0700 Subject: kbuild: Add CLANG_FLAGS to as-instr To: Greg Kroah-Hartman , Sasha Levin Cc: stable@vger.kernel.org, llvm@lists.linux.dev Message-ID: <20250811235151.1108688-5-nathan@kernel.org> From: Nathan Chancellor commit cff6e7f50bd315e5b39c4e46c704ac587ceb965f upstream. A future change will move CLANG_FLAGS from KBUILD_{A,C}FLAGS to KBUILD_CPPFLAGS so that '--target' is available while preprocessing. When that occurs, the following errors appear multiple times when building ARCH=powerpc powernv_defconfig: ld.lld: error: vmlinux.a(arch/powerpc/kernel/head_64.o):(.text+0x12d4): relocation R_PPC64_ADDR16_HI out of range: -4611686018409717520 is not in [-2147483648, 2147483647]; references '__start___soft_mask_table' ld.lld: error: vmlinux.a(arch/powerpc/kernel/head_64.o):(.text+0x12e8): relocation R_PPC64_ADDR16_HI out of range: -4611686018409717392 is not in [-2147483648, 2147483647]; references '__stop___soft_mask_table' Diffing the .o.cmd files reveals that -DHAVE_AS_ATHIGH=1 is not present anymore, because as-instr only uses KBUILD_AFLAGS, which will no longer contain '--target'. Mirror Kconfig's as-instr and add CLANG_FLAGS explicitly to the invocation to ensure the target information is always present. Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- scripts/Kbuild.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -108,7 +108,7 @@ as-option = $(call try-run,\ # Usage: aflags-y += $(call as-instr,instr,option1,option2) as-instr = $(call try-run,\ - printf "%b\n" "$(1)" | $(CC) -Werror $(KBUILD_AFLAGS) -c -x assembler-with-cpp -o "$$TMP" -,$(2),$(3)) + printf "%b\n" "$(1)" | $(CC) -Werror $(CLANG_FLAGS) $(KBUILD_AFLAGS) -c -x assembler-with-cpp -o "$$TMP" -,$(2),$(3)) # __cc-option # Usage: MY_CFLAGS += $(call __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-march=i586) Patches currently in stable-queue which might be from nathan@kernel.org are queue-5.4/kbuild-add-clang_flags-to-as-instr.patch queue-5.4/wifi-brcmsmac-remove-const-from-tbl_ptr-parameter-in-wlc_lcnphy_common_read_table.patch queue-5.4/mips-include-kbuild_cppflags-in-checkflags-invocation.patch queue-5.4/kbuild-add-clang_flags-to-kbuild_cppflags.patch queue-5.4/ftrace-also-allocate-and-copy-hash-for-reading-of-filter-files.patch queue-5.4/memstick-core-zero-initialize-id_reg-in-h_memstick_read_dev_id.patch queue-5.4/kbuild-update-assembler-calls-to-use-proper-flags-and-language-target.patch queue-5.4/phonet-pep-move-call-to-pn_skb_get_dst_sockaddr-earlier-in-pep_sock_accept.patch queue-5.4/arm-9448-1-use-an-absolute-path-to-unified.h-in-kbuild_aflags.patch queue-5.4/kbuild-add-kbuild_cppflags-to-as-option-invocation.patch queue-5.4/usb-atm-cxacru-merge-cxacru_upload_firmware-into-cxacru_heavy_init.patch