ci: add build coverage for riscv64 (#42431)

This commit is contained in:
Yu Watanabe
2026-06-02 23:34:20 +09:00
committed by GitHub
4 changed files with 30 additions and 3 deletions
+3
View File
@@ -96,6 +96,9 @@ if [[ -n "$CROSS_ARCH" ]]; then
armhf)
triplet=arm-linux-gnueabihf
;;
riscv64)
triplet=riscv64-linux-gnu
;;
*)
fatal "Unsupported cross architecture: $CROSS_ARCH"
;;
+3
View File
@@ -42,6 +42,9 @@ jobs:
- env: { COMPILER: "gcc", COMPILER_VERSION: "13", LINKER: "bfd", CROSS_ARCH: "armhf" }
runner: [ ubuntu-24.04-arm ]
python-version: ''
- env: { COMPILER: "gcc", COMPILER_VERSION: "13", LINKER: "bfd", CROSS_ARCH: "riscv64" }
runner: [ ubuntu-24.04-arm ]
python-version: ''
- env: { COMPILER: "clang", COMPILER_VERSION: "18", LINKER: "lld" }
runner: [ ubuntu-24.04-s390x ]
python-version: ''
+21
View File
@@ -0,0 +1,21 @@
[binaries]
c = 'riscv64-linux-gnu-gcc'
cpp = 'riscv64-linux-gnu-g++'
ar = 'riscv64-linux-gnu-gcc-ar'
nm = 'riscv64-linux-gnu-gcc-nm'
strip = 'riscv64-linux-gnu-strip'
pkgconfig = 'pkg-config'
[properties]
needs_exe_wrapper = true
pkg_config_libdir = '/usr/lib/riscv64-linux-gnu/pkgconfig:/usr/share/pkgconfig'
c_args = ['-O2', '-pipe', '-g', '-feliminate-unused-debug-types']
c_link_args = ['-fuse-ld=bfd', '-Wl,-O1', '-Wl,--hash-style=gnu', '-Wl,--as-needed', '-Wl,-z,relro,-z,now,-z,noexecstack']
cpp_args = []
cpp_link_args = ['-fuse-ld=bfd', '-Wl,-O1', '-Wl,--hash-style=gnu', '-Wl,--as-needed', '-Wl,-z,relro,-z,now,-z,noexecstack']
[host_machine]
system = 'linux'
cpu_family = 'riscv64'
cpu = 'riscv64'
endian = 'little'
+3 -3
View File
@@ -357,8 +357,8 @@ static int dynamic_user_realize(
r = dynamic_user_pop(d, &num, &uid_lock_fd);
if (r < 0) {
int new_uid_lock_fd;
uid_t new_uid;
int new_uid_lock_fd = -EBADF; /* avoid false maybe-uninitialized warning */
uid_t new_uid = UID_INVALID; /* avoid false maybe-uninitialized warning */
if (r != -EAGAIN)
return r;
@@ -465,7 +465,7 @@ static int dynamic_user_realize(
int dynamic_user_current(DynamicUser *d, uid_t *ret) {
_cleanup_close_ int lock_fd = -EBADF;
uid_t uid;
uid_t uid = UID_INVALID; /* avoid false maybe-uninitialized warning */
int r;
assert(d);