ARC: build: Get rid of toolchain check
authorAlexey Brodkin <abrodkin@synopsys.com>
Thu, 13 Sep 2018 20:24:28 +0000 (23:24 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Thu, 13 Sep 2018 21:48:05 +0000 (14:48 -0700)
commit615f64458ad890ef94abc879a66d8b27236e733a
treea940a367df1e3e05ade2b456635478748898d647
parent00a99339f0a30b593d06f31499c4bbd965979567
ARC: build: Get rid of toolchain check

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>
arch/arc/Makefile