diff options
Diffstat (limited to 'ports')
-rw-r--r-- | ports/cproc/files/config.h | 26 | ||||
-rw-r--r-- | ports/cproc/files/config.mk | 5 | ||||
-rw-r--r-- | ports/cproc/patches/0-cloexec.patch | 17 | ||||
-rwxr-xr-x | ports/cproc/port | 13 | ||||
-rw-r--r-- | ports/cproc/sha256sums | 1 | ||||
-rwxr-xr-x | ports/qbe/port | 13 | ||||
-rw-r--r-- | ports/qbe/sha256sums | 1 |
7 files changed, 76 insertions, 0 deletions
diff --git a/ports/cproc/files/config.h b/ports/cproc/files/config.h new file mode 100644 index 0000000..18b2b1e --- /dev/null +++ b/ports/cproc/files/config.h @@ -0,0 +1,26 @@ +static const char target[] = "x86_64-camellia"; +static const char *const startfiles[] = {"-l", ":crt0.o"}; +static const char *const endfiles[] = {"-l", "c"}; +static const char *const preprocesscmd[] = { + "cpp", + + /* clear preprocessor GNU C version */ + "-U", "__GNUC__", + "-U", "__GNUC_MINOR__", + + /* we don't yet support these optional features */ + "-D", "__STDC_NO_ATOMICS__", + "-D", "__STDC_NO_COMPLEX__", + "-D", "__STDC_NO_VLA__", + "-U", "__SIZEOF_INT128__", + + /* we don't generate position-independent code */ + "-U", "__PIC__", + + /* ignore attributes and extension markers */ + "-D", "__attribute__(x)=", + "-D", "__extension__=", +}; +static const char *const codegencmd[] = {"qbe"}; +static const char *const assemblecmd[] = {"as"}; +static const char *const linkcmd[] = {"ld", "-no-dynamic-linker", "-pie"}; diff --git a/ports/cproc/files/config.mk b/ports/cproc/files/config.mk new file mode 100644 index 0000000..b58d14f --- /dev/null +++ b/ports/cproc/files/config.mk @@ -0,0 +1,5 @@ +PREFIX=/usr/ +BINDIR=$(PREFIX)/bin +CC=cc +CFLAGS=-std=c99 -Wall -Wpedantic -Wno-parentheses -Wno-switch -g -pipe +LDFLAGS= diff --git a/ports/cproc/patches/0-cloexec.patch b/ports/cproc/patches/0-cloexec.patch new file mode 100644 index 0000000..4102e05 --- /dev/null +++ b/ports/cproc/patches/0-cloexec.patch @@ -0,0 +1,17 @@ +--- driver.c.orig ++++ driver.c +@@ -165,12 +165,10 @@ spawnphase(struct stageinfo *phase, int *fd, char *input, char *output, bool las + goto err1; + } + if (fcntl(pipefd[0], F_SETFD, FD_CLOEXEC) < 0) { +- ret = errno; +- goto err2; ++ warn("fcntl(..., F_SETFD, FD_CLOEXEC):"); + } + if (fcntl(pipefd[1], F_SETFD, FD_CLOEXEC) < 0) { +- ret = errno; +- goto err2; ++ warn("fcntl(..., F_SETFD, FD_CLOEXEC):"); + } + ret = posix_spawn_file_actions_adddup2(&actions, pipefd[1], 1); + if (ret) diff --git a/ports/cproc/port b/ports/cproc/port new file mode 100755 index 0000000..54f649e --- /dev/null +++ b/ports/cproc/port @@ -0,0 +1,13 @@ +#!/bin/sh +. ports/pre + +pkg=cproc +tarball=michaelforney-cproc-0985a78.tar.gz +tarball_dir=michaelforney-cproc-0985a78 +url=https://github.com/michaelforney/cproc/tarball/0985a7893a4b5de63a67ebab445892d9fffe275b + +relink() { + rm $tarball_dir/cproc +} + +. ports/post diff --git a/ports/cproc/sha256sums b/ports/cproc/sha256sums new file mode 100644 index 0000000..568912f --- /dev/null +++ b/ports/cproc/sha256sums @@ -0,0 +1 @@ +cf9a4de550303eedcc8b8ee22f11b085a9387b911fa16a6fa7551382a3d7a1ea michaelforney-cproc-0985a78.tar.gz diff --git a/ports/qbe/port b/ports/qbe/port new file mode 100755 index 0000000..4cec799 --- /dev/null +++ b/ports/qbe/port @@ -0,0 +1,13 @@ +#!/bin/sh +. ports/pre + +pkg=qbe +tarball=qbe-1.1.tar.xz +tarball_dir=qbe-1.1 +url=https://c9x.me/compile/release/$tarball + +relink() { + rm $tarball_dir/qbe +} + +. ports/post diff --git a/ports/qbe/sha256sums b/ports/qbe/sha256sums new file mode 100644 index 0000000..f95f50b --- /dev/null +++ b/ports/qbe/sha256sums @@ -0,0 +1 @@ +7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c qbe-1.1.tar.xz |