Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 30 May 2022 19:59:27
Message-Id: 1653940758.903b71810e0b270a7d494e16e2d799fcd95ae50f.sam@gentoo
1 commit: 903b71810e0b270a7d494e16e2d799fcd95ae50f
2 Author: Marek BehĂșn <kabel <AT> kernel <DOT> org>
3 AuthorDate: Mon May 30 11:00:09 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon May 30 19:59:18 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=903b7181
7
8 toolchain.eclass: ensure thumb mode for armv6m
9
10 Currently the eclass ensures thumb mode compilation for libgcc for
11 armv7m targets
12 with
13 [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
14 ...
15 [[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb )
16
17 But libgcc should also be compiled in thumb mode for the armv6m target.
18
19 Add the dash as is done for the armv7 case so that --with-mode=thumb
20 option is added for armv6m.
21
22 Signed-off-by: Marek BehĂșn <kabel <AT> kernel.org>
23 Closes: https://github.com/gentoo/gentoo/pull/25687
24 Signed-off-by: Sam James <sam <AT> gentoo.org>
25
26 eclass/toolchain.eclass | 2 ++
27 1 file changed, 2 insertions(+)
28
29 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
30 index 0ae7f7dd3839..488648a82ab5 100644
31 --- a/eclass/toolchain.eclass
32 +++ b/eclass/toolchain.eclass
33 @@ -1102,6 +1102,8 @@ toolchain_src_configure() {
34 fi
35 done
36
37 + # Convert armv6m to armv6-m
38 + [[ ${arm_arch} == armv6m ]] && arm_arch=armv6-m
39 # Convert armv7{a,r,m} to armv7-{a,r,m}
40 [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
41 # See if this is a valid --with-arch flag