diff options
-rw-r--r-- | .builds/alpine-riscv64.yml | 27 | ||||
-rw-r--r-- | .builds/musl-riscv64.diff | 16 |
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]; + }; |