Skip to contentSkip to conversation

gcc-target: Enable fp arch extention when fpu is available

PATCH Superseded Khem Raj 2 participants 3 messages Jun 20, 2018 – Jun 21, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 gcc-target: Enable fp arch extention when fpu is available

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]

---
 meta/recipes-devtools/gcc/gcc-target.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-devtools/gcc/gcc-target.inc +3 -3
index 56e4b95af4..92cad28b7a 100644
@@ -14,9 +14,9 @@ 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"
+EXTRA_OECONF_append_armv6 = " --with-arch=armv6${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
 
 # 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
Signature · 1 line
2.17.1
#1 lore raw
Quoted 17 lines · Khem Raj

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]

---
 meta/recipes-devtools/gcc/gcc-target.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-devtools/gcc/gcc-target.inc +0 -0
index 56e4b95af4..92cad28b7a 100644

meta/recipes-devtools/gcc/gcc-target.inc EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu" · line 19

Quoted 9 lines
meta/recipes-devtools/gcc/gcc-target.inc +3 -3
@@ -14,9 +14,9 @@ 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"
+EXTRA_OECONF_append_armv6 = " --with-arch=armv6${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"

Does this work for gcc7?

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-target.inc +0 -1
 # 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
--

2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#2 lore raw

No, it wont AFAICT, I guess we need to move this into gcc-8.0.bb

Quoted 41 lines · Andre McCurdy
Quoted 17 lines · Khem Raj

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]

---
 meta/recipes-devtools/gcc/gcc-target.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-devtools/gcc/gcc-target.inc +0 -0
index 56e4b95af4..92cad28b7a 100644

meta/recipes-devtools/gcc/gcc-target.inc EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu" · line 19

Quoted 9 lines
meta/recipes-devtools/gcc/gcc-target.inc +3 -3
@@ -14,9 +14,9 @@ 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"
+EXTRA_OECONF_append_armv6 = " --with-arch=armv6${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"

Does this work for gcc7?

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-target.inc +0 -1
 # 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
--

2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core