aboutsummaryrefslogtreecommitdiff
path: root/.builds/freebsd.yml
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-07 17:01:20 -0700
committerMichael Forney <mforney@mforney.org>2019-04-07 17:02:02 -0700
commite6c8bdd965806f2150a20b5cb7b73623a0ec8c83 (patch)
tree55f29ebd31886ec87f5f0badbda64c4103779bd6 /.builds/freebsd.yml
parent969d111ea2542d2f4c593c4947a42f778675b324 (diff)
Add FreeBSD build manifest
Diffstat (limited to '.builds/freebsd.yml')
-rw-r--r--.builds/freebsd.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml
new file mode 100644
index 0000000..fbcf02e
--- /dev/null
+++ b/.builds/freebsd.yml
@@ -0,0 +1,33 @@
+image: freebsd/latest
+sources:
+ - https://git.sr.ht/~mcf/cc
+ - https://github.com/michaelforney/qbe
+packages:
+ - gmake
+tasks:
+ - build: |
+ gmake -C qbe
+ cd cc
+ cat >config.h <<EOF
+ static char *startfiles[] = {"-l", ":crt1.o", "-l", ":crti.o"};
+ static char *endfiles[] = {"-l", ":crtn.o", "-l", "c"};
+ static char *preprocesscmd[] = {
+ "cpp", "-P",
+ "-U", "__GNUC__", "-D", "__GNUC__=3",
+ "-U", "__GNUC_MINOR__", "-D", "__GNUC_MINOR__=3",
+ "-D", "__asm(x)=",
+ "-D", "__attribute__(x)=",
+ "-D", "__inline=",
+ "-D", "_Pragma(x)=",
+ "-D", "_Nullable=",
+ "-D", "_Nonnull=",
+ "-D", "_XLOCALE_INLINE=static inline",
+ "-D", "__NO_TLS",
+ };
+ static char *compilecmd[] = {"cc-qbe"};
+ static char *codegencmd[] = {"qbe"};
+ static char *assemblecmd[] = {"as"};
+ static char *linkcmd[] = {"ld", "-L", "/usr/lib", "--dynamic-linker", "/libexec/ld-elf.so.1"};
+ EOF
+ echo 'CFLAGS=-Wno-parentheses -Wno-switch' >config.mk
+ PATH=$HOME/qbe/obj:$PATH make all check bootstrap