| 1 |
From 88bc675eab98cea388daf40396686178ca5fcdb3 Mon Sep 17 00:00:00 2001 |
| 2 |
From: Peter Marheine <[email protected]> |
| 3 |
Date: Mon, 15 Aug 2022 11:01:50 +1000 |
| 4 |
Subject: [PATCH] riscv: elf-multilib: add rv32iafc to defaults |
| 5 |
|
| 6 |
rv32iafc-ilp32 is compatible with rv32iac-ilp32 for library |
| 7 |
implementation, so add a reuse rule allowing the default configuration |
| 8 |
to support rv32iafc. |
| 9 |
|
| 10 |
-IAFC is an unusual configuration (much less common than -IMAFC), but |
| 11 |
multilib reuse has essentially no cost: this change is useful to users |
| 12 |
of platforms that support hardware floating-point but cannot use |
| 13 |
hardware multiply/divide for any reason. To avoid generating a new set |
| 14 |
of libraries this is limited to the soft-float ABI. |
| 15 |
|
| 16 |
Tested by verifying that `gcc -march=rv32iafc -mabi=ilp32 |
| 17 |
--print-search-dirs` refers to the rv32iac/ilp32 library directory as |
| 18 |
expected, rather than just the root library directory as occurs when an |
| 19 |
unsupported target is selected (for instance, rv32id). |
| 20 |
|
| 21 |
Signed-off-by: Peter Marheine <[email protected]> |
| 22 |
--- |
| 23 |
gcc/config/riscv/t-elf-multilib | 6 ++++-- |
| 24 |
1 file changed, 4 insertions(+), 2 deletions(-) |
| 25 |
|
| 26 |
diff --git a/gcc/config/riscv/t-elf-multilib b/gcc/config/riscv/t-elf-multilib |
| 27 |
index 19f9434616c..6e74b1811be 100644 |
| 28 |
--- a/gcc/config/riscv/t-elf-multilib |
| 29 |
+++ b/gcc/config/riscv/t-elf-multilib |
| 30 |
@@ -1,11 +1,12 @@ |
| 31 |
# This file was generated by multilib-generator with the command: |
| 32 |
-# ./multilib-generator rv32i-ilp32--c rv32im-ilp32--c rv32iac-ilp32-- rv32imac-ilp32-- rv32imafc-ilp32f-rv32imafdc- rv64imac-lp64-- rv64imafdc-lp64d-- |
| 33 |
-MULTILIB_OPTIONS = march=rv32i/march=rv32ic/march=rv32im/march=rv32imc/march=rv32iac/march=rv32imac/march=rv32imafc/march=rv32imafdc/march=rv32gc/march=rv64imac/march=rv64imafdc/march=rv64gc mabi=ilp32/mabi=ilp32f/mabi=lp64/mabi=lp64d |
| 34 |
+# ./multilib-generator rv32i-ilp32--c rv32im-ilp32--c rv32iac-ilp32--f rv32imac-ilp32-- rv32imafc-ilp32f-rv32imafdc- rv64imac-lp64-- rv64imafdc-lp64d-- |
| 35 |
+MULTILIB_OPTIONS = march=rv32i/march=rv32ic/march=rv32im/march=rv32imc/march=rv32iac/march=rv32iafc/march=rv32imac/march=rv32imafc/march=rv32imafdc/march=rv32gc/march=rv64imac/march=rv64imafdc/march=rv64gc mabi=ilp32/mabi=ilp32f/mabi=lp64/mabi=lp64d |
| 36 |
MULTILIB_DIRNAMES = rv32i \ |
| 37 |
rv32ic \ |
| 38 |
rv32im \ |
| 39 |
rv32imc \ |
| 40 |
rv32iac \ |
| 41 |
+rv32iafc \ |
| 42 |
rv32imac \ |
| 43 |
rv32imafc \ |
| 44 |
rv32imafdc \ |
| 45 |
@@ -25,6 +26,7 @@ march=rv64imac/mabi=lp64 \ |
| 46 |
march=rv64imafdc/mabi=lp64d |
| 47 |
MULTILIB_REUSE = march.rv32i/mabi.ilp32=march.rv32ic/mabi.ilp32 \ |
| 48 |
march.rv32im/mabi.ilp32=march.rv32imc/mabi.ilp32 \ |
| 49 |
+march.rv32iac/mabi.ilp32=march.rv32iafc/mabi.ilp32 \ |
| 50 |
march.rv32imafc/mabi.ilp32f=march.rv32imafdc/mabi.ilp32f \ |
| 51 |
march.rv32imafc/mabi.ilp32f=march.rv32gc/mabi.ilp32f \ |
| 52 |
march.rv64imafdc/mabi.lp64d=march.rv64gc/mabi.lp64d |
| 53 |
-- |
| 54 |
2.37.1.595.g718a3a8f04-goog |
| 55 |
|