From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Leon Romanovsky <leonro@nvidia.com>,
Vineet Gupta <vgupta@kernel.org>, Sasha Levin <sashal@kernel.org>,
linux-snps-arc@lists.infradead.org
Subject: [PATCH AUTOSEL 5.4 6/6] ARC: build: Try to guess GCC variant of cross compiler
Date: Fri, 20 Dec 2024 12:14:20 -0500 [thread overview]
Message-ID: <20241220171420.512513-6-sashal@kernel.org> (raw)
In-Reply-To: <20241220171420.512513-1-sashal@kernel.org>
From: Leon Romanovsky <leonro@nvidia.com>
[ Upstream commit 824927e88456331c7a999fdf5d9d27923b619590 ]
ARC GCC compiler is packaged starting from Fedora 39i and the GCC
variant of cross compile tools has arc-linux-gnu- prefix and not
arc-linux-. This is causing that CROSS_COMPILE variable is left unset.
This change allows builds without need to supply CROSS_COMPILE argument
if distro package is used.
Before this change:
$ make -j 128 ARCH=arc W=1 drivers/infiniband/hw/mlx4/
gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
gcc: error: unrecognized command-line option ‘-mmedium-calls’
gcc: error: unrecognized command-line option ‘-mlock’
gcc: error: unrecognized command-line option ‘-munaligned-access’
[1] https://packages.fedoraproject.org/pkgs/cross-gcc/gcc-arc-linux-gnu/index.html
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 6f05e509889f..d72d9f4dfc3d 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -6,7 +6,7 @@
KBUILD_DEFCONFIG := nsim_hs_defconfig
ifeq ($(CROSS_COMPILE),)
-CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux-)
+CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux- arc-linux-gnu-)
endif
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
--
2.39.5
prev parent reply other threads:[~2024-12-20 17:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 17:14 [PATCH AUTOSEL 5.4 1/6] wifi: mac80211: wake the queues in case of failure in resume Sasha Levin
2024-12-20 17:14 ` [PATCH AUTOSEL 5.4 2/6] sound: usb: format: don't warn that raw DSD is unsupported Sasha Levin
2024-12-20 17:14 ` [PATCH AUTOSEL 5.4 3/6] bpf: fix potential error return Sasha Levin
2024-12-20 17:14 ` [PATCH AUTOSEL 5.4 4/6] net: usb: qmi_wwan: add Telit FE910C04 compositions Sasha Levin
2024-12-20 17:14 ` [PATCH AUTOSEL 5.4 5/6] irqchip/gic: Correct declaration of *percpu_base pointer in union gic_base Sasha Levin
2024-12-20 17:14 ` Sasha Levin [this message]
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=20241220171420.512513-6-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=stable@vger.kernel.org \
--cc=vgupta@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