From 3ec39b1881535d7a0727b5afd6b78d816b556b73 Mon Sep 17 00:00:00 2001 From: Philipp van Kempen Date: Tue, 19 Dec 2023 11:51:11 +0100 Subject: [PATCH] target/riscv/utils.py: merge imafd to g when joining extensions --- mlonmcu/target/riscv/util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mlonmcu/target/riscv/util.py b/mlonmcu/target/riscv/util.py index 488bf5246..1838de5f1 100644 --- a/mlonmcu/target/riscv/util.py +++ b/mlonmcu/target/riscv/util.py @@ -87,9 +87,12 @@ def _get_index(x): return extensions_new -def join_extensions(exts): +def join_extensions(exts, merge=True): sep = "" ret = "" + if merge: + if "i" in exts and "m" in exts and "a" in exts and "f" in exts and "d" in exts: + exts = ["g"] + [e for e in exts if e not in "imafd"] for ext in exts: length = len(ext) if sep == "_":