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 528F4335BA7; Mon, 18 Aug 2025 13:51:40 +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=1755525100; cv=none; b=QAFtoKJ29hj/YfaZmaM+RoIxEErcSADLDnAwim09OArt/9GURdbE5NdDQ3Lf3dv/APUokYvAGZgrSpbYQQMS/i5O7Y4PpaevMO80QaVgR3+UXW97pA3OrSUZjXINfjeUHky7QM0PE060zG9fnmHSHXquBvVVd7brYMSWYmW3SeA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755525100; c=relaxed/simple; bh=2IIopFkMQnsgPKS5pFbrSQrFmHTriIv47VLFJTNKmfg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YOIHxTkez9sQjhK4QyXr/ZlM1oV+OZBJJbrBc0OBIi8CL4MGaMD8aoH++5uvsQhIEbP8/TYo5xSAuaKQbwqS7PCTY1+ny2jFPFtZC6BX7ohaDBHPIHVJRx9RCsUvXbKHWTegWrftj/6wpNQUpFXVV6evXBsCWk5E+qrD4R8ejwo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dXkCiUGw; 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="dXkCiUGw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE608C4CEEB; Mon, 18 Aug 2025 13:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755525100; bh=2IIopFkMQnsgPKS5pFbrSQrFmHTriIv47VLFJTNKmfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dXkCiUGw+w2D9ddCwysssqlEVBzRTffng+diHF4JizUfpijdnX0bjpF0BMLR+Fc5N PLJTYvT+WvCSrjZ/1iKAWPq6SDS32yKxqL5e1CZCPN9ehj15EgZ/brKRn63lriArp5 qkmc4dclVuPkNWIaWSXZOjH/DTbmWYaz67akcjuo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Sasha Levin Subject: [PATCH 6.16 158/570] tools/build: Fix s390(x) cross-compilation with clang Date: Mon, 18 Aug 2025 14:42:25 +0200 Message-ID: <20250818124511.899621991@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124505.781598737@linuxfoundation.org> References: <20250818124505.781598737@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Weißschuh [ Upstream commit a40f0cdce78be8a559ee8a85c908049c65a410b2 ] The heuristic to derive a clang target triple from a GCC one does not work for s390. GCC uses "s390-linux" while clang expects "s390x-linux" or "powerz-linux". Add an explicit override. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250620-tools-cross-s390-v2-1-ecda886e00e5@linutronix.de Signed-off-by: Thomas Weißschuh Signed-off-by: Sasha Levin --- tools/scripts/Makefile.include | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 5158250988ce..ded48263dd5e 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -101,7 +101,9 @@ else ifneq ($(CROSS_COMPILE),) # Allow userspace to override CLANG_CROSS_FLAGS to specify their own # sysroots and flags or to avoid the GCC call in pure Clang builds. ifeq ($(CLANG_CROSS_FLAGS),) -CLANG_CROSS_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%)) +CLANG_TARGET := $(notdir $(CROSS_COMPILE:%-=%)) +CLANG_TARGET := $(subst s390-linux,s390x-linux,$(CLANG_TARGET)) +CLANG_CROSS_FLAGS := --target=$(CLANG_TARGET) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)gcc 2>/dev/null)) ifneq ($(GCC_TOOLCHAIN_DIR),) CLANG_CROSS_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) -- 2.39.5