Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 05 May 2021 20:05:45
Message-Id: 1620245125.9745b8f75443e0580b6f194b3100d91d5ebdb765.floppym@gentoo
1 commit: 9745b8f75443e0580b6f194b3100d91d5ebdb765
2 Author: David Michael <fedora.dm0 <AT> gmail <DOT> com>
3 AuthorDate: Mon May 3 12:56:19 2021 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Wed May 5 20:05:25 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9745b8f7
7
8 meson.eclass: include riscv bitness in cpu_family
9
10 This makes cpu_family identify RISC-V systems as either "riscv64"
11 or "riscv32" to match the given tuple, or it will leave it as
12 "riscv" when the tuple has an unknown cpu field.
13
14 This fixes the expected values of cpu_family in meson projects:
15 https://mesonbuild.com/Reference-tables.html#cpu-families
16
17 Signed-off-by: David Michael <fedora.dm0 <AT> gmail.com>
18 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
19
20 eclass/meson.eclass | 7 ++++++-
21 1 file changed, 6 insertions(+), 1 deletion(-)
22
23 diff --git a/eclass/meson.eclass b/eclass/meson.eclass
24 index d0ce5adb355..d87d61f44ae 100644
25 --- a/eclass/meson.eclass
26 +++ b/eclass/meson.eclass
27 @@ -1,4 +1,4 @@
28 -# Copyright 2017-2020 Gentoo Authors
29 +# Copyright 2017-2021 Gentoo Authors
30 # Distributed under the terms of the GNU General Public License v2
31
32 # @ECLASS: meson.eclass
33 @@ -142,6 +142,11 @@ _meson_get_machine_info() {
34 case ${cpu_family} in
35 amd64) cpu_family=x86_64 ;;
36 arm64) cpu_family=aarch64 ;;
37 + riscv)
38 + case ${tuple} in
39 + riscv32*) cpu_family=riscv32 ;;
40 + riscv64*) cpu_family=riscv64 ;;
41 + esac ;;
42 esac
43
44 # This may require adjustment based on CFLAGS