Skip to content

Commit b6d06b1

Browse files
abrodkingregkh
authored andcommitted
ARC: build: Get rid of toolchain check
commit 615f644 upstream. This check is very naive: we simply test if GCC invoked without "-mcpu=XXX" has ARC700 define set. In that case we think that GCC was built with "--with-cpu=arc700" and has libgcc built for ARC700. Otherwise if ARC700 is not defined we think that everythng was built for ARCv2. But in reality our life is much more interesting. 1. Regardless of GCC configuration (i.e. what we pass in "--with-cpu" it may generate code for any ARC core). 2. libgcc might be built with explicitly specified "--mcpu=YYY" That's exactly what happens in case of multilibbed toolchains: - GCC is configured with default settings - All the libs built for many different CPU flavors I.e. that check gets in the way of usage of multilibbed toolchains. And even non-multilibbed toolchains are affected. OpenEmbedded also builds GCC without "--with-cpu" because each and every target component later is compiled with explicitly set "-mcpu=ZZZ". Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 541500a commit b6d06b1

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

arch/arc/Makefile

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,6 @@ cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
2020
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
2121
cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs
2222

23-
is_700 = $(shell $(CC) -dM -E - < /dev/null | grep -q "ARC700" && echo 1 || echo 0)
24-
25-
ifdef CONFIG_ISA_ARCOMPACT
26-
ifeq ($(is_700), 0)
27-
$(error Toolchain not configured for ARCompact builds)
28-
endif
29-
endif
30-
31-
ifdef CONFIG_ISA_ARCV2
32-
ifeq ($(is_700), 1)
33-
$(error Toolchain not configured for ARCv2 builds)
34-
endif
35-
endif
36-
3723
ifdef CONFIG_ARC_CURR_IN_REG
3824
# For a global register defintion, make sure it gets passed to every file
3925
# We had a customer reported bug where some code built in kernel was NOT using

0 commit comments

Comments
 (0)