summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2024-12-03 14:37:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-09 13:28:49 +0100
commitf4539c3cab4423b99c793adcb25fb472602ee032 (patch)
tree6e9ca1a96bf0f8f4d67241f4a725144ad9b4369a /arch
parent84142875b293424707ee048daa38d7500af7f3d1 (diff)
downloadlinux-f4539c3cab4423b99c793adcb25fb472602ee032.tar.gz
linux-f4539c3cab4423b99c793adcb25fb472602ee032.tar.bz2
linux-f4539c3cab4423b99c793adcb25fb472602ee032.zip
ARC: build: Try to guess GCC variant of cross compiler
[ 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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 8782a03f24a8..60b7a7723b1e 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -6,7 +6,7 @@
KBUILD_DEFCONFIG := haps_hs_smp_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__