blob: 17198927e7cf48d56bfa7aa90de1b23079e16234 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
image: alpine/latest
packages:
- qemu-aarch64
- qemu-openrc
sources:
- https://git.sr.ht/~mcf/cc
- https://git.sr.ht/~mcf/qbe
environment:
PATH: $HOME/qbe/obj:$HOME/aarch64-linux-musl-cross/bin:$PATH
tasks:
- setup: |
# work around bugs in qemu-binfmt
sudo sed -i -e '/qemu_suffix:=/d' -e 's/printf/env &/' /etc/init.d/qemu-binfmt
sudo /etc/init.d/qemu-binfmt start
curl -O http://musl.cc/aarch64-linux-musl-cross.tgz
tar --warning=no-unknown-keyword -xzf aarch64-linux-musl-cross.tgz
- build: |
cd qbe
cat >config.h <<EOF
#define Defasm Gaself
#define Deftgt T_arm64
EOF
make
cd ../cc
./configure \
--target=aarch64-linux-musl \
--with-ldso="$HOME/aarch64-linux-musl-cross/aarch64-linux-musl/lib/libc.so"
make all check bootstrap
file stage2/cc stage2/cc-qbe
|