Skip to content

Commit 7b9f716

Browse files
abrodkingregkh
authored andcommitted
ARC: build: Don't set CROSS_COMPILE in arch's Makefile
commit 40660f1 upstream. There's not much sense in doing that because if user or his build-system didn't set CROSS_COMPILE we still may very well make incorrect guess. But as it turned out setting CROSS_COMPILE is not as harmless as one may think: with recent changes that implemented automatic discovery of __host__ gcc features unconditional setup of CROSS_COMPILE leads to failures on execution of "make xxx_defconfig" with absent cross-compiler, for more info see [1]. Set CROSS_COMPILE as well gets in the way if we want only to build .dtb's (again with absent cross-compiler which is not really needed for building .dtb's), see [2]. Note, we had to change LIBGCC assignment type from ":=" to "=" so that is is resolved on its usage, otherwise if it is resolved at declaration time with missing CROSS_COMPILE we're getting this error message from host GCC: | gcc: error: unrecognized command line option -mmedium-calls | gcc: error: unrecognized command line option -mno-sdata [1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-September/004308.html [2] http://lists.infradead.org/pipermail/linux-snps-arc/2018-September/004320.html Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b6d06b1 commit 7b9f716

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

arch/arc/Makefile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@
66
# published by the Free Software Foundation.
77
#
88

9-
ifeq ($(CROSS_COMPILE),)
10-
ifndef CONFIG_CPU_BIG_ENDIAN
11-
CROSS_COMPILE := arc-linux-
12-
else
13-
CROSS_COMPILE := arceb-linux-
14-
endif
15-
endif
16-
179
KBUILD_DEFCONFIG := nsim_700_defconfig
1810

1911
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
@@ -73,7 +65,7 @@ ldflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB
7365
# --build-id w/o "-marclinux". Default arc-elf32-ld is OK
7466
ldflags-$(upto_gcc44) += -marclinux
7567

76-
LIBGCC := $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
68+
LIBGCC = $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
7769

7870
# Modules with short calls might break for calls into builtin-kernel
7971
KBUILD_CFLAGS_MODULE += -mlong-calls -mno-millicode

0 commit comments

Comments
 (0)