Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/riscv:master commit in: eclass/
Date: Sun, 28 Apr 2019 10:24:08
Message-Id: 1556447014.b42744dd8d41b9a471b0f99fe8d9e7cb8f806a9a.dilfridge@gentoo
1 commit: b42744dd8d41b9a471b0f99fe8d9e7cb8f806a9a
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 28 10:23:34 2019 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 28 10:23:34 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/riscv.git/commit/?id=b42744dd
7
8 eclass: filter -march in gcc build for riscv
9
10 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
11
12 eclass/toolchain.eclass | 5 +++++
13 1 file changed, 5 insertions(+)
14
15 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
16 index be94db8..ff66986 100644
17 --- a/eclass/toolchain.eclass
18 +++ b/eclass/toolchain.eclass
19 @@ -1513,6 +1513,11 @@ gcc_do_filter_flags() {
20 # dont want to funk ourselves
21 filter-flags '-mabi*' -m31 -m32 -m64
22
23 + # on riscv, only specific combinations of march and mabi work... so we need
24 + # to strip both and trust the compiler to do the right thing, otherwise
25 + # multilib build fails
26 + [[ $(tc-arch) == riscv* ]] && filter-flags '-march*'
27 +
28 filter-flags -frecord-gcc-switches # 490738
29 filter-flags -mno-rtm -mno-htm # 506202