summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Brodkin <alexey.brodkin@synopsys.com>2018-11-22 15:06:00 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-23 23:35:18 +0000
commitc4f4c5347c7f1300f30deee11072be09f22aee3d (patch)
treeaef86913baea3487210b5a750f60e7af8e3e796b
parent76276d90ce7fd0effe7c517206472b9dfe0c065c (diff)
downloadpoky-c4f4c5347c7f1300f30deee11072be09f22aee3d.tar.gz
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 (From OE-Core rev: 6d2e44db7ebada41ad1cfc1c98ce9012242ced11) Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-target.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index bc2236fed0..6270059644 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -20,6 +20,7 @@ ARMFPARCHEXT ?= ""
20EXTRA_OECONF_append_armv6 = " --with-arch=armv6${ARMFPARCHEXT}" 20EXTRA_OECONF_append_armv6 = " --with-arch=armv6${ARMFPARCHEXT}"
21EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${ARMFPARCHEXT}" 21EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${ARMFPARCHEXT}"
22EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${ARMFPARCHEXT}" 22EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${ARMFPARCHEXT}"
23EXTRA_OECONF_append_arc = " --with-cpu=${TUNE_PKGARCH}"
23 24
24# libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is 25# libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is
25# set in subdir gcc, so subdir libcc1 can't use it, export it here to 26# set in subdir gcc, so subdir libcc1 can't use it, export it here to