Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native Windows urbit binaries using MingW #4675

Merged
merged 77 commits into from Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
186fe8d
jets: rename jets/c/con.c due to clash with legacy CP/M device names
locpyl-tidnyd Mar 27, 2021
d554c18
vere: request binary mode in fopen/open calls
locpyl-tidnyd Mar 27, 2021
577a267
vere: cleanup and reorder #includes
locpyl-tidnyd Mar 27, 2021
98c002b
u3: fix typo: show suggested loom base if fixed address is unavailable
locpyl-tidnyd Mar 27, 2021
0e47c37
vere: use embedded CA store directly rather than save it to a tempfile
locpyl-tidnyd Mar 27, 2021
0d9de4f
u3: fix patch cleanup
locpyl-tidnyd Mar 27, 2021
bf38e79
u3: centralize use of u3_Signal
locpyl-tidnyd Mar 27, 2021
d31d6f6
u3: rename function to avoid name clash on MingW
locpyl-tidnyd Mar 27, 2021
6ed4b70
vere: replace dprintf (missing on MingW) with snprintf+write
locpyl-tidnyd Mar 27, 2021
ad81a01
libent: use BCryptGenRandom on Windows
locpyl-tidnyd Mar 27, 2021
b105ce9
u3: add U3_OS_PROF macro to gate profiling-related code
locpyl-tidnyd Mar 27, 2021
a9d166c
vere: comment out unused code that doesn't compile on MingW
locpyl-tidnyd Mar 27, 2021
56348ed
vere: add -fcommon to be compatible with gcc 10
locpyl-tidnyd Mar 28, 2021
a2ad636
vere: lmdb: wrap mdb_strerror in mdb_logerror
locpyl-tidnyd Mar 28, 2021
ef0b87a
vere: #include termios.h from vere.h where it is actually used
locpyl-tidnyd Mar 28, 2021
4d14b41
vere: basic MingW compatibility changes
locpyl-tidnyd Mar 28, 2021
00bd797
vere: select dumb terminal with #define rather than Makefile conditional
locpyl-tidnyd Mar 29, 2021
19fc2bc
vere: export term.c:_write() as u3_write_fd(), use in dprintf() repla…
locpyl-tidnyd Mar 29, 2021
d03e487
compat: fix .patch file modes
locpyl-tidnyd Mar 29, 2021
2b5f000
compat: move build-mingw script into configure
locpyl-tidnyd Mar 29, 2021
201f1f3
compat: support build from a tarball that does not contain binary pills
locpyl-tidnyd Mar 29, 2021
c690b57
vere: fix strict builds
locpyl-tidnyd Mar 29, 2021
1c58db2
meta: add mingw build action
locpyl-tidnyd Mar 29, 2021
0d9adff
vere: mingw: build static executables
locpyl-tidnyd Mar 29, 2021
a36193c
compat: mingw: don't export secp256k1 symbols from exe
locpyl-tidnyd Mar 30, 2021
85030ab
vere: revert d554c18dc35253e0158353932944f8563c34b788, set mingw bina…
locpyl-tidnyd Mar 30, 2021
8df8f65
compat: make Makefile more flexible
locpyl-tidnyd Mar 31, 2021
d86fb8d
vere: terminal compatibility
locpyl-tidnyd Mar 31, 2021
56b6274
vere: terminal compatibility
locpyl-tidnyd Mar 31, 2021
24fde4b
vere: allow enable/disable optimizations from ./configure
locpyl-tidnyd Mar 31, 2021
b4a768c
vere: more file portability
locpyl-tidnyd Apr 1, 2021
6ab51c7
vere: fix no-tty mode startup
locpyl-tidnyd Apr 1, 2021
33d1bf5
vere: pipe serf stderr back to lord
locpyl-tidnyd Apr 1, 2021
7d031f4
vere: mingw: terminal compatibility
locpyl-tidnyd Apr 1, 2021
578841d
compat: mingw: implement utimes
locpyl-tidnyd Apr 1, 2021
24d22e9
vere: mingw: basic daemon mode support
locpyl-tidnyd Apr 1, 2021
755d73b
vere: mingw: support invocation w/o .exe suffix
locpyl-tidnyd Apr 1, 2021
4882b00
Merge tag 'urbit-v1.3' into mingw-port
locpyl-tidnyd Apr 2, 2021
d7f4890
vere: portability fixes after urbit-v1.3 merge
locpyl-tidnyd Apr 2, 2021
05df725
vere: merge urbit-v1.4
locpyl-tidnyd Apr 27, 2021
8e8edf5
vere: merge urbit-v1.5 into mingw-port
locpyl-tidnyd Apr 28, 2021
c6f296e
vere: move daemon mode code into compat/*/daemon.c
locpyl-tidnyd Apr 30, 2021
a827577
vere: boot notification in mingw daemon mode
locpyl-tidnyd Apr 30, 2021
90f9c68
vere: mingw: add smoke test to build action
locpyl-tidnyd Apr 30, 2021
ef228a0
compat: mingw: optionally cache dependency artifacts in cachix
locpyl-tidnyd May 2, 2021
8dd35b7
compat: mingw: remap dependency directories
locpyl-tidnyd May 2, 2021
47695e1
compat: mingw: simplify poor-mans-nix-shell.sh
locpyl-tidnyd May 3, 2021
aa2fd31
compat: mingw: fix cmdmake splitting
locpyl-tidnyd May 3, 2021
3865de2
compat: mingw: make smoke test use the same parameters as urbit-tests
locpyl-tidnyd May 3, 2021
5b8bebd
compat: mingw: comment kill(2) stub implementation
locpyl-tidnyd May 4, 2021
678773f
vere: mingw: remove signal(SIGPIPE) calls: Win32 has no SIGPIPE
locpyl-tidnyd May 4, 2021
014a94a
u3: remove unused #include
locpyl-tidnyd May 4, 2021
b7db4d5
compat: always add compat dirs to -I
locpyl-tidnyd May 5, 2021
c708820
build-action: temporarily use PR-specific cache
locpyl-tidnyd May 5, 2021
6ba7f77
compat: mingw: catch Ctrl-C in main process
locpyl-tidnyd May 5, 2021
a9d4306
u3: rsignal refactoring
locpyl-tidnyd May 5, 2021
2adcdaa
compat: mingw: fix signal numbers
locpyl-tidnyd May 6, 2021
3a930d7
compat: mingw: single-thread rsignal implementation
locpyl-tidnyd May 6, 2021
6702dad
vere: mingw: pass Ctrl-C to serf
locpyl-tidnyd May 6, 2021
61a3efc
compat: mingw: make sure .patch files check out without CRLF conversion
locpyl-tidnyd May 6, 2021
9590d23
compat: mingw: default to release build
locpyl-tidnyd May 6, 2021
08c7f7f
mingw: rerun build action
locpyl-tidnyd May 20, 2021
aea35d5
Merge master into mingw-port to make typescript-check.yml happy
locpyl-tidnyd May 20, 2021
934a880
u3: Makefile: include compat/*/*.mk
locpyl-tidnyd Jun 2, 2021
fe5ead8
mingw: add rsignal_raise to rsignal.h; raise on same thread
locpyl-tidnyd Jun 2, 2021
08e4535
vere: get rid of curl typecheck warnings for CURLOPT_WRITEFUNCTION
locpyl-tidnyd Jun 2, 2021
0ccbcd5
vere: mingw: bump curl version and get rid of CURLOPT_SSL_CTX_FUNCTIO…
locpyl-tidnyd Jun 2, 2021
b130a9d
vere: mingw: get rid of libsigsegv
locpyl-tidnyd Jun 2, 2021
3903267
vere: mingw: fix seh_handler_decorator.mk
locpyl-tidnyd Jun 2, 2021
839a68e
vere: ignore more intermediate build files
locpyl-tidnyd Jun 4, 2021
fb2ee65
compat: fix missing newlines at end of file
locpyl-tidnyd Jun 4, 2021
3559394
vere: update argon2u dependency to urbit/argon2@a4c1e3f7
locpyl-tidnyd Jun 4, 2021
a2a993c
compat: mingw: add seh_handler_decorator comments,
locpyl-tidnyd Jun 5, 2021
c6121f3
compat: mingw: put downloaded dependencies under $NIX_STORE
locpyl-tidnyd Jun 5, 2021
e7ac8c0
compat: mingw: fix dependency patch path
locpyl-tidnyd Jun 16, 2021
23634f6
compat: add m1brew
locpyl-tidnyd Jul 2, 2021
5b4b6c6
compat: minor refactoring
locpyl-tidnyd Jul 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -116,3 +116,24 @@ jobs:
- run: nix-build -A hs.urbit-king.components.exes.urbit-king --arg enableStatic true
- run: nix-build -A hs-checks
- run: nix-build shell.nix

mingw:
runs-on: windows-latest
defaults:
run:
shell: C:\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -here -c ". <(cygpath '{0}')"
working-directory: ./pkg/urbit

steps:
- uses: actions/checkout@v2
with:
lfs: true

# echo suppresses pacman prompt
- run: echo|./configure
env:
CACHIX_CACHE: locpyl-tidnyd-test1
locpyl-tidnyd marked this conversation as resolved.
Show resolved Hide resolved
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

- run: make build/urbit build/urbit-worker
- run: build/urbit -l -d -B ../../bin/solid.pill -F bus && curl -f --data '{"source":{"dojo":"+hood/exit"},"sink":{"app":"hood"}}' http://localhost:12321
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -54,6 +54,7 @@ release/
dist/
out/
work/
pkg/*/*.a
*.o

# Landscape Dev
Expand Down
90 changes: 90 additions & 0 deletions nix/sources-pmnsh.json
@@ -0,0 +1,90 @@
{
"curl": {
"branch": "master",
"description": "A command line tool and library for transferring data with URL syntax",
"homepage": "http://curl.se/",
"pmnsh": {
"include": "include",
"lib": "lib/.libs",
"prepare": "autoreconf -vfi && ./configure --disable-shared --disable-ldap --disable-rtsp --without-brotli --without-libidn2 --without-libpsl --without-nghttp2 --with-openssl",
"make": "-C lib libcurl.la"
},
"owner": "curl",
"repo": "curl",
"rev": "curl-7_77_0",
"type": "tarball",
"url": "https://github.com/curl/curl/archive/curl-7_77_0.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"lmdb": {
"branch": "mdb.master",
"description": "LMDB library",
"homepage": "http://www.lmdb.tech/",
"pmnsh": {
"strip": 2,
"make": "liblmdb.a"
},
"owner": "LMDB",
"repo": "lmdb",
"rev": "48a7fed59a8aae623deff415dda27097198ca0c1",
"type": "tarball",
"url": "https://github.com/LMDB/lmdb/archive/48a7fed59a8aae623deff415dda27097198ca0c1.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"secp256k1": {
"branch": "master",
"description": "Optimized C library for ECDSA signatures and secret/public key operations on curve secp256k1.",
"homepage": null,
"pmnsh": {
"include": "include",
"lib": ".libs",
"prepare": "./autogen.sh && ./configure --disable-shared --enable-module-recovery CFLAGS=-DSECP256K1_API=",
"make": "libsecp256k1.la"
},
"owner": "bitcoin-core",
"repo": "secp256k1",
"rev": "26de4dfeb1f1436dae1fcf17f57bdaa43540f940",
"type": "tarball",
"url": "https://github.com/bitcoin-core/secp256k1/archive/26de4dfeb1f1436dae1fcf17f57bdaa43540f940.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"uv": {
"branch": "v1.x",
"description": "Cross-platform asynchronous I/O",
"homepage": "http://libuv.org/",
"pmnsh": {
"include": "include",
"lib": ".libs",
"prepare": "./autogen.sh && ./configure --disable-shared",
"make": "libuv.la",
"compat": {
"m1brew": false
}
},
"owner": "libuv",
"repo": "libuv",
"rev": "v1.40.0",
"type": "tarball",
"url": "https://github.com/libuv/libuv/archive/v1.40.0.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"ent": {
"pmnsh": {
"prepare": "./configure"
}
},
"ge-additions": {
"pmnsh": {
"make": "CFLAGS=-I../ed25519"
}
},
"libaes_siv": {
"pmnsh": {
"compat": {
"m1brew": {
"make": "CFLAGS=$(pkg-config --cflags openssl)"
}
}
}
}
}
49 changes: 43 additions & 6 deletions nix/sources.json
Expand Up @@ -3,18 +3,26 @@
"branch": "master",
"description": "With argon2u. Based off https://github.com/P-H-C/phc-winner-argon2",
"homepage": "",
"pmnsh": {
"include": ["include", "src/blake2"],
"make": "libargon2.a"
},
"owner": "urbit",
"repo": "argon2",
"rev": "4da94a611ee62bad87ab2b131ffda3bcc0723d9c",
"sha256": "0bqq1hg367l4jkb6cqhxlblpvdbwz3l586qsfakwzfd9wdvnm3yc",
"rev": "a4c1e3f7138c2e577376beb99f964cf71e1c8b1b",
"sha256": "1j8a15fx2kn5aa3scmb5qnsfk627kfvsq5ppz9j0pv2d1xck527x",
"type": "tarball",
"url": "https://github.com/urbit/argon2/archive/4da94a611ee62bad87ab2b131ffda3bcc0723d9c.tar.gz",
"url": "https://github.com/urbit/argon2/archive/a4c1e3f7138c2e577376beb99f964cf71e1c8b1b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"ed25519": {
"branch": "master",
"description": "Submodule included by Urbit",
"homepage": null,
"pmnsh": {
"strip": 1,
"make": "all"
},
"owner": "urbit",
"repo": "ed25519",
"rev": "76385f2ebbbc9580a9c236952d68d11d73a6135c",
Expand All @@ -27,12 +35,22 @@
"branch": "master",
"description": "H2O - the optimized HTTP/1, HTTP/2, HTTP/3 server",
"homepage": "https://h2o.examp1e.net",
"pmnsh": {
"include": "include",
"prepare": "cmake .",
"make": "libh2o",
"compat": {
"mingw": {
"prepare": "cmake -G\"MSYS Makefiles\" ."
}
}
},
"owner": "h2o",
"repo": "h2o",
"rev": "v2.2.4",
"sha256": "0176x0bzjry19zs074a9i5vhncc842xikmx43wj61jky318nq4w4",
"rev": "v2.2.6",
"sha256": "0qni676wqvxx0sl0pw9j0ph7zf2krrzqc1zwj73mgpdnsr8rsib7",
"type": "tarball",
"url": "https://github.com/h2o/h2o/archive/v2.2.4.tar.gz",
"url": "https://github.com/h2o/h2o/archive/v2.2.6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"hackage.nix": {
Expand Down Expand Up @@ -63,6 +81,9 @@
"branch": "master",
"description": null,
"homepage": null,
"pmnsh": {
"make": "libscrypt.a CFLAGS_EXTRA=-ffast-math"
},
"owner": "urbit",
"repo": "libscrypt",
"rev": "029693ff1cbe4f69d3a2da87d0f4f034f92cc0c2",
Expand All @@ -75,6 +96,9 @@
"branch": "master",
"description": null,
"homepage": null,
"pmnsh": {
"make": "static"
},
"owner": "urbit",
"repo": "murmur3",
"rev": "71a75d57ca4e7ca0f7fc2fd84abd93595b0624ca",
Expand Down Expand Up @@ -111,6 +135,19 @@
"branch": "master",
"description": null,
"homepage": null,
"pmnsh": {
"include": "source/include",
"compat": {
"m1brew": {
"lib": "build/template-FAST_INT64",
"make": "-C build/template-FAST_INT64 libsoftfloat3.a"
},
"mingw": {
"lib": "build/Win64-MinGW-w64",
"make": "-C build/Win64-MinGW-w64 libsoftfloat3.a"
}
}
},
"owner": "urbit",
"repo": "berkeley-softfloat-3",
"rev": "ec4c7e31b32e07aad80e52f65ff46ac6d6aad986",
Expand Down
1 change: 1 addition & 0 deletions pkg/ent/configure
Expand Up @@ -7,6 +7,7 @@ log () {
for impl in ENT_GETENTROPY_UNISTD \
ENT_GETENTROPY_SYSRANDOM \
ENT_GETRANDOM_SYSCALL \
ENT_GETENTROPY_BCRYPTGENRANDOM \
ENT_DEV_URANDOM
do
export IMPL=$impl
locpyl-tidnyd marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
12 changes: 11 additions & 1 deletion pkg/ent/ent.c
Expand Up @@ -57,6 +57,16 @@ int ent_getentropy(void* buf, size_t len) {
return 0;
}


// Use `BCryptGenRandom` on Windows ////////////////////////////////////////////

#elif defined(ENT_GETENTROPY_BCRYPTGENRANDOM)
#include <windows.h>
#include <bcrypt.h>
int ent_getentropy(void* buf, size_t len) {
return BCryptGenRandom(NULL, (PUCHAR)buf, len, BCRYPT_USE_SYSTEM_PREFERRED_RNG);
}

#else
#error "One of these must be set: ENT_DEV_URANDOM, ENT_GETENTROPY_UNISTD, ENT_GETENTROPY_SYSRANDOM, ENT_GETRANDOM_SYSCALL"
#error "One of these must be set: ENT_GETENTROPY_BCRYPTGENRANDOM, ENT_DEV_URANDOM, ENT_GETENTROPY_UNISTD, ENT_GETENTROPY_SYSRANDOM, ENT_GETRANDOM_SYSCALL"
#endif
1 change: 1 addition & 0 deletions pkg/urbit/.gitattributes
Expand Up @@ -3,3 +3,4 @@
tests export-ignore
hashtable_tests export-ignore
shell.nix export-ignore
*.patch -text
2 changes: 2 additions & 0 deletions pkg/urbit/.gitignore
@@ -1,3 +1,5 @@
# Configuration Result
/config.mk
/include/config.h
/include/ca-bundle.h
/include/ivory.h
13 changes: 9 additions & 4 deletions pkg/urbit/Makefile
@@ -1,4 +1,5 @@
include config.mk
include $(foreach dir,$(compat),$(wildcard compat/$(dir)/*.mk))

jets = jets/tree.c $(wildcard jets/*/*.c)
noun = $(wildcard noun/*.c)
Expand All @@ -9,7 +10,9 @@ worker = $(wildcard worker/*.c)
tests = $(wildcard tests/*.c)
bench = $(wildcard bench/*.c)

common = $(jets) $(noun) $(ur) $(vere)
compat := $(foreach dir,$(compat),$(wildcard compat/$(dir)/*.c))

common = $(jets) $(noun) $(ur) $(vere) $(compat)
headers = $(shell find include -type f)

common_objs = $(shell echo $(common) | sed 's/\.c/.o/g')
Expand All @@ -29,7 +32,7 @@ CFLAGS := $(CFLAGS)

################################################################################

.PHONY: all test clean mkproper
.PHONY: all test clean mrproper

################################################################################

Expand Down Expand Up @@ -74,9 +77,11 @@ build/urbit-worker: $(common_objs) $(worker_objs)
@mkdir -p ./build
@$(CC) $^ $(LDFLAGS) -o $@

%.o: %.c $(headers)
# CCDEPS and CCEXTRA are empty except in MingW build,
# which uses them to inject a C source transform step
%.o: %.c $(headers) $(CCDEPS)
@echo CC $<
@$(CC) -I./include $(CFLAGS) -c $< -o $@
@$(CC) -I./include $(CFLAGS) $< $(CCEXTRA) -c -o $@
locpyl-tidnyd marked this conversation as resolved.
Show resolved Hide resolved

tags: $(all_srcs) $(headers)
ctags $^
22 changes: 22 additions & 0 deletions pkg/urbit/compat/create-include-files.sh
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# support running off a tarball that doesn't contain binary pills
(( $($1 ../../bin/ivory.pill) > 512 )) || curl -L https://github.com/urbit/urbit/raw/urbit-v$URBIT_VERSION/bin/ivory.pill > ../../bin/ivory.pill

poor_mans_xxd () {
cch=0
echo "unsigned char $2[] = {"
while IFS='' read line
do
for i in $line
do
echo -n " 0x$i,"
cch=$((cch+1))
done
echo
done < <(od -An -v -tx1 $1)
echo "};"
echo "unsigned int $2_len = $cch;"
}

[ -e include/ca-bundle.h ] || poor_mans_xxd $2 include_ca_bundle_crt >include/ca-bundle.h
[ -e include/ivory.h ] || poor_mans_xxd ../../bin/ivory.pill u3_Ivory_pill >include/ivory.h
14 changes: 14 additions & 0 deletions pkg/urbit/compat/m1brew/compat.mk
@@ -0,0 +1,14 @@
# paths to brew packages
CFLAGS := $(CFLAGS) -I/opt/homebrew/include
LDFLAGS := $(LDFLAGS) -L/opt/homebrew/lib
# force linker to use static libraries
LDFLAGS := $(shell compat/m1brew/use-static-libs.sh $(LDFLAGS))
# add extra osx libraries
LDFLAGS := $(LDFLAGS) -framework SystemConfiguration

ifdef debug
CFLAGS := $(CFLAGS) -O0 -g
else
# clang hangs on noun/allocate.c if -g is specified with -O3
CFLAGS := $(CFLAGS) -O3
endif
13 changes: 13 additions & 0 deletions pkg/urbit/compat/m1brew/ed25519.patch
@@ -0,0 +1,13 @@
diff --git a/Makefile b/Makefile
new file mode 100644
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,8 @@
+.PHONY: all clean
+
+all: *.c *.h
+ $(CC) -c -O3 -Wall -Werror *.c
+ $(AR) rcs libed25519.a *.o
+
+clean:
+ rm -f *.o *.a
12 changes: 12 additions & 0 deletions pkg/urbit/compat/m1brew/ent.patch
@@ -0,0 +1,12 @@
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -15,7 +15,7 @@ do
log "Trying IMPL=$IMPL"

if IMPL=$impl make >/dev/null 2>/dev/null
- then sed -i 's|$(error IMPL must be set)|IMPL='"$impl"'|' Makefile
+ then sed -i "" 's|$(error IMPL must be set)|IMPL='"$impl"'|' Makefile
log "IMPL=$IMPL works"
exit 0
else log "IMPL=$IMPL failed"
17 changes: 17 additions & 0 deletions pkg/urbit/compat/m1brew/libscrypt.patch
@@ -0,0 +1,17 @@
diff --git a/Makefile b/Makefile
index 783c537..3156ee2 100644
--- a/Makefile
+++ b/Makefile
@@ -12,10 +12,9 @@ LDFLAGS_EXTRA?=-Wl,-z,relro

all: reference

-OBJS= crypto_scrypt-nosse.o sha256.o crypto-mcf.o b64.o crypto-scrypt-saltgen.o crypto_scrypt-check.o crypto_scrypt-hash.o slowequals.o
+OBJS= crypto_scrypt-nosse.o sha256.o crypto-mcf.o b64.o slowequals.o

-libscrypt.so.0: $(OBJS)
- $(CC) $(LDFLAGS) -shared -o libscrypt.so.0 $(OBJS) -lm -lc
+libscrypt.a: $(OBJS)
ar rcs libscrypt.a $(OBJS)

reference: libscrypt.so.0 main.o crypto_scrypt-hexconvert.o
13 changes: 13 additions & 0 deletions pkg/urbit/compat/m1brew/murmur3.patch
@@ -0,0 +1,13 @@
diff --git a/makefile b/makefile
--- a/makefile
+++ b/makefile
@@ -12,5 +12,9 @@ shared: murmur3.c murmur3.h
$(CC) -fPIC -O3 -c murmur3.c
$(CC) -shared -Wl,--export-dynamic murmur3.o -o libmurmur3.so

+static: murmur3.c murmur3.h
+ $(CC) -fPIC -O3 -c murmur3.c
+ $(AR) rcs libmurmur3.a murmur3.o
+
clean:
rm -rf example *.o *.so