summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Behún <kabel@kernel.org>2022-05-30 13:00:09 +0200
committerSam James <sam@gentoo.org>2022-05-30 20:59:18 +0100
commit903b71810e0b270a7d494e16e2d799fcd95ae50f (patch)
tree3202dcba4c9c3370de4d24f91429742b239cd4e5
parenttoolchain.eclass: add comment above LTO logic (diff)
downloadgentoo-903b7181.tar.gz
gentoo-903b7181.tar.bz2
gentoo-903b7181.zip
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@kernel.org> Closes: https://github.com/gentoo/gentoo/pull/25687 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--eclass/toolchain.eclass2
1 files changed, 2 insertions, 0 deletions
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