aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2024-04-21 18:07:43 -0700
committerMichael Forney <mforney@mforney.org>2024-04-21 18:13:41 -0700
commit633591d45fb790188ad9ca38e131d09df999cce3 (patch)
tree1e2e41805c43710e9b96bc9dc9da08a4ec84919e
parent593ca07956c6abc8bffcd2a2c5c06c521952f737 (diff)
CI: Add alpine-riscv64 builder
-rw-r--r--.builds/alpine-riscv64.yml27
-rw-r--r--.builds/musl-riscv64.diff16
2 files changed, 43 insertions, 0 deletions
diff --git a/.builds/alpine-riscv64.yml b/.builds/alpine-riscv64.yml
new file mode 100644
index 0000000..8a7540d
--- /dev/null
+++ b/.builds/alpine-riscv64.yml
@@ -0,0 +1,27 @@
+image: alpine/latest
+packages:
+- qemu-riscv64
+- qemu-openrc
+sources:
+- https://git.sr.ht/~mcf/cproc
+- git://c9x.me/qbe.git
+tasks:
+- setup: |
+ sudo /etc/init.d/qemu-binfmt start
+ curl -O http://musl.cc/riscv64-linux-musl-cross.tgz
+ tar --warning=no-unknown-keyword -xzf riscv64-linux-musl-cross.tgz
+ patch -p0 -d riscv64-linux-musl-cross/riscv64-linux-musl/include < cproc/.builds/musl-riscv64.diff
+- build: |
+ PATH=$HOME/qbe:$HOME/riscv64-linux-musl-cross/bin:$PATH
+ make -C qbe
+ cd cproc
+ ./configure \
+ --target=riscv64-linux-musl \
+ --with-ldso="$HOME/riscv64-linux-musl-cross/riscv64-linux-musl/lib/libc.so" \
+ CFLAGS='-std=c11'
+ make all check bootstrap
+ file stage2/cproc stage2/cproc-qbe
+triggers:
+- action: email
+ condition: failure
+ to: "<~mcf/cproc-builds@lists.sr.ht>"
diff --git a/.builds/musl-riscv64.diff b/.builds/musl-riscv64.diff
new file mode 100644
index 0000000..ec72afa
--- /dev/null
+++ b/.builds/musl-riscv64.diff
@@ -0,0 +1,16 @@
+--- bits/signal.h.orig
++++ bits/signal.h
+@@ -19,7 +19,12 @@
+ };
+
+ struct __riscv_mc_q_ext_state {
+- unsigned long long __f[64] __attribute__((aligned(16)));
++#if __STDC_VERSION__ >= 201112L
++ _Alignas(16)
++#else
++ __attribute__((__aligned__(16)))
++#endif
++ unsigned long long __f[64];
+ unsigned int __fcsr;
+ unsigned int __reserved[3];
+ };