Skip to content

Instantly share code, notes, and snippets.

View jhuntwork's full-sized avatar
😑

Jeremy Huntwork jhuntwork

😑
View GitHub Profile
$ cat test.c
#include <stdio.h>
int main(int argc, char **argv) {
fprintf(stderr, "Hello, World!\n");
return 0;
}
$ pwd
/home/jeremy/zig-linux-x86_64-0.9.0-dev.1433+4a76523b9
$ ./zig version
@jhuntwork
jhuntwork / check-versions.sh
Last active April 22, 2019 16:16
check-versions.sh
#!/bin/bash -e
# Simple script to list version numbers of critical development tools
# shellcheck disable=SC2034
set -o pipefail
min_bash=3.2
min_binutils=2.25
min_bison=2.7
min_bzip2=1.0.4
### Keybase proof
I hereby claim:
* I am jhuntwork on github.
* I am jhuntwork (https://keybase.io/jhuntwork) on keybase.
* I have a public key ASCxca54eJ3vSzpOpbSexoPFpClalILtnP26qDaiKZSeQQo
To claim this, I am signing this object:
@jhuntwork
jhuntwork / gist:166a88a3f3de091df2789db936fb57d7
Created October 4, 2016 00:24
Python-3.5.2 test failures
======================================================================
FAIL: test_large_year (test.test_time.TestStrftime4dyear)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/lib/python3.5/test/test_time.py", line 560, in test_large_year
return super().test_large_year()
File "/lib/python3.5/test/test_time.py", line 583, in test_large_year
self.assertEqual(self.yearstr(12345), '12345')
AssertionError: '+12345' != '12345'
- +12345
@jhuntwork
jhuntwork / puppet pre-commit
Last active December 25, 2015 00:49
git pre-commit hook script for checking puppet syntax
#!/bin/sh
# Requires puppet and puppet-lint gems
opts="--no-80chars-check --fail-on-warnings"
# Initialize rbenv, if used, without unnecessary bash completions
eval "$(type rbenv >/dev/null 2>&1 && rbenv init - | sed '/rbenv.bash/d')"
error() {
e=1
[ ! -z "$1" ] && printf "$1\n"
@jhuntwork
jhuntwork / libcxxabi.patch
Created June 18, 2013 14:47
Makes libcxxabi link against libcxx and libunwind. Also creates a static library.
diff --git a/lib/buildit b/lib/buildit
index b18491d..36cbe3e 100755
--- a/lib/buildit
+++ b/lib/buildit
@@ -70,7 +70,7 @@ case $TRIPLE in
SOEXT=so
LDSHARED_FLAGS="-o libc++abi.so.1.0 \
-shared -nodefaultlibs -Wl,-soname,libc++abi.so.1 \
- -lpthread -lrt -lc -lstdc++"
+ -lpthread -lrt -lc -lc++ -lunwind"
@jhuntwork
jhuntwork / libcxx-musl_compat.patch
Created June 18, 2013 14:43
Makes libcxx compatible with the musl environment
diff --git a/include/__config b/include/__config
index ca850d3..c467d6e 100644
--- a/include/__config
+++ b/include/__config
@@ -296,14 +296,10 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_C11_FEATURES
#elif defined(__linux__)
#include <features.h>
-#if __GLIBC_PREREQ(2, 15)
#define _LIBCPP_HAS_QUICK_EXIT
@jhuntwork
jhuntwork / compiler-rt-musl_compat.patch
Last active December 18, 2015 14:59
Disable compiler-rt's sanitizer stuff. Largely unnecessary and makes bad assumptions about the environment.
diff --git a/lib/Makefile.mk b/lib/Makefile.mk
index 8054c35..6cb08b1 100644
--- a/lib/Makefile.mk
+++ b/lib/Makefile.mk
@@ -14,14 +14,14 @@ SubDirs :=
SubDirs += i386 ppc x86_64 arm
# Add other submodules.
-SubDirs += asan
+#SubDirs += asan
@jhuntwork
jhuntwork / llvm-musl_compat.patch
Created June 17, 2013 22:01
patch for current llvm git to build with native musl toolchain
diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h
index 4b9c044..01e02d5 100644
--- a/include/llvm/Target/TargetLibraryInfo.h
+++ b/include/llvm/Target/TargetLibraryInfo.h
@@ -243,8 +243,6 @@ namespace llvm {
fmodl,
/// FILE *fopen(const char *filename, const char *mode);
fopen,
- /// FILE *fopen64(const char *filename, const char *opentype)
- fopen64,