]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc-8: Enable fp arch extention when fpu is available
authorKhem Raj <raj.khem@gmail.com>
Thu, 21 Jun 2018 01:26:07 +0000 (18:26 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Jun 2018 08:33:41 +0000 (09:33 +0100)
This is especially needed when defaulting to hard-float ABI
Fixes errors e.g.
cc1: error: -mfloat-abi=hard: selected processor lacks an FPU

Fixes [YOCTO #12795]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-target.inc
meta/recipes-devtools/gcc/gcc_8.1.bb

index 56e4b95af4c18fa9d28428e5256138b4584737ff..bc2236fed02f05e6f33919e8826f87652cde16ce 100644 (file)
@@ -14,9 +14,12 @@ EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
 # specific). For example, for ARM, ARMv6+ adds atomic instructions that may
 # affect the ABI in the gcc-runtime libs. Since we can't rely on gcc on the
 # target to always be passed -march etc, its built-in default needs to be safe.
-EXTRA_OECONF_append_armv6 = " --with-arch=armv6"
-EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a"
-EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve"
+
+ARMFPARCHEXT ?= ""
+
+EXTRA_OECONF_append_armv6 = " --with-arch=armv6${ARMFPARCHEXT}"
+EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${ARMFPARCHEXT}"
+EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${ARMFPARCHEXT}"
 
 # libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is
 # set in subdir gcc, so subdir libcc1 can't use it, export it here to
index ab208e7026399f1438d1a3a20bf2c5369a84d38f..7d9359058863260e404b12a4fabac5894db14995 100644 (file)
@@ -7,4 +7,8 @@ require gcc-target.inc
 ARM_INSTRUCTION_SET_armv4 = "arm"
 ARM_INSTRUCTION_SET_armv5 = "arm"
 
+ARMFPARCHEXT_armv6 = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+ARMFPARCHEXT_armv7a = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+ARMFPARCHEXT_armv7ve = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+
 BBCLASSEXTEND = "nativesdk"