shithub: 9pro

Download patch

ref: 01f919209d51ba37c5b227e9fd790619e709bc92
parent: b263caabdf6de743df2cbd0c94049c19fb294434
author: Sigrid Haflínudóttir <[email protected]>
date: Sun Dec 22 17:04:28 EST 2019

make it easier to compile static binaries with musl

--- a/README.md
+++ b/README.md
@@ -7,6 +7,12 @@
 This is all _WIP_ still.  9pex is working in read-only mode so far but
 lacks proper auth, async IO, some more error control etc.
 
+To build static binaries with musl:
+
+```
+musl-gcc CFLAGS="-Os -s -g0 -static" ./build.sh`
+```
+
 # Why
 
 We can do better.
--- a/build.sh
+++ b/build.sh
@@ -1,2 +1,4 @@
 #!/bin/sh
-gcc -DC9_NO_CLIENT -lrt -O -ggdb -Wall -Wextra -Wshadow -Wpedantic -Werror c9/*.c parg/*.c -Ic9 -Iparg 9pex.c -o 9pex
+set -e
+set -x
+${CC:-gcc} -DC9_NO_CLIENT -lrt -O -ggdb -Wall -Wextra -Wshadow -Wpedantic -Werror $CFLAGS c9/*.c parg/*.c -Ic9 -Iparg 9pex.c -o 9pex