commit: 903b71810e0b270a7d494e16e2d799fcd95ae50f
Author: Marek BehĂșn <kabel <AT> kernel <DOT> org>
AuthorDate: Mon May 30 11:00:09 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 30 19:59:18 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=903b7181
toolchain.eclass: ensure thumb mode for armv6m
Currently the eclass ensures thumb mode compilation for libgcc for
armv7m targets
with
[[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
...
[[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb )
But libgcc should also be compiled in thumb mode for the armv6m target.
Add the dash as is done for the armv7 case so that --with-mode=thumb
option is added for armv6m.
Signed-off-by: Marek BehĂșn <kabel <AT> kernel.org>
Closes: https://github.com/gentoo/gentoo/pull/25687
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 0ae7f7dd3839..488648a82ab5 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1102,6 +1102,8 @@ toolchain_src_configure() {
fi
done
+ # Convert armv6m to armv6-m
+ [[ ${arm_arch} == armv6m ]] && arm_arch=armv6-m
# Convert armv7{a,r,m} to armv7-{a,r,m}
[[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
# See if this is a valid --with-arch flag