]> code.ossystems Code Review - openembedded-core.git/commit
gcc: Select proper ARC CPU when build for target
authorAlexey Brodkin <alexey.brodkin@synopsys.com>
Thu, 22 Nov 2018 12:06:00 +0000 (15:06 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 Nov 2018 12:19:26 +0000 (12:19 +0000)
commit6d2e44db7ebada41ad1cfc1c98ce9012242ced11
tree3b9f5634b4c0cc9543c43eef32f12eb9f539367c
parent8b31c919814b8bdf25b3381053656523c001ae0d
gcc: Select proper ARC CPU when build for target

By default GCC for ARC is configured with ARC700 CPU.
This means when we don't pass "-mcpu=xxx":
 a) Code will be compiled for ARC700
 b) Libs will used for ARC700

And if we happen to run on ARCv2 core like ARC HSxx we
won't be able to use target gcc w/o "-mcpu=xxx" which
is not very convenient as we want to build "target" toolchain
but not canadian-cross.

Note the trick here is we set TUNE_PKGARCH in just 2 values,
it is either "arc700" for all ARCompact cores (ARC750 & ARC770)
and "archs" for all ARCv2 cores (ARC HS38 & HS48), see [1].
This gives us usable defaults.

For cross-compilation we use TUNE_CCARGS for fine-tuning depending
on which HW features we have on the current target so that
we may have HW feature A & B or B & C or A & B & C, see [2].

[1] https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsys/blob/master/conf/machine/include/tune-arcv2.inc#L4
[2] https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsys/blob/master/conf/machine/include/tune-arcv2.inc#L34

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-target.inc