aro: define arch macros for riscv

Fixes some test failure:

test
+- test-standalone
   +- standalone_test_cases
      +- standalone_test_cases.glibc_compat
         +- CheckObject
            +- compile exe native-linux-gnu.2.38 Debug native-linux-gnu.2.38 64 errors
test/standalone/glibc_compat/glibc_runtime_check.zig:11:18: error: C import failed
const c_malloc = @cImport(
                 ^~~~~~~~
referenced by:
    checkReallocarray: test/standalone/glibc_compat/glibc_runtime_check.zig:46:27
    main: test/standalone/glibc_compat/glibc_runtime_check.zig:112:26
    4 reference(s) hidden; use '-freference-trace=6' to see all references
error: translation failure
build/stage3/lib/zig/libc/include/riscv-linux-gnu/bits/wordsize.h:22:3: error: unsupported ABI
This commit is contained in:
Sertonix
2026-01-11 20:50:13 +01:00
committed by Alex Rønne Petersen
parent 9dd2716229
commit 47cc233f22
+3
View File
@@ -838,6 +838,9 @@ fn generateSystemDefines(comp: *Compilation, w: *Io.Writer) !void {
try define(w, "__VX__");
}
},
.riscv32, .riscv32be, .riscv64, .riscv64be => {
try w.print("#define __riscv_xlen {d}\n", .{ptr_width});
},
else => {},
}