Commit af81b88
auto.mk: Add RVV feature detection for RISC-V 64-bit
Previously, -march=rv64gcv was unconditionally added for all riscv64
targets, causing compilation failures on RISC-V systems without the
vector extension. Add host CPU and compiler feature detection for RVV,
mirroring the existing pattern for x86_64 (AVX2/BMI2) and AArch64
(SHA3). The host detection parses the ISA string from /proc/cpuinfo
to check for the 'v' extension.
Also add riscv64 to the host_info make target.
Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>1 parent 11b58a7 commit af81b88
2 files changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
273 | 276 | | |
274 | 277 | | |
275 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
| |||
124 | 132 | | |
125 | 133 | | |
126 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
127 | 154 | | |
128 | 155 | | |
129 | 156 | | |
| |||
159 | 186 | | |
160 | 187 | | |
161 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
162 | 192 | | |
| 193 | + | |
163 | 194 | | |
164 | 195 | | |
165 | 196 | | |
| |||
0 commit comments