--- build.sh.orig	2016-08-16 13:30:06.000000000 -0500
+++ build.sh	2016-08-28 14:46:33.000000000 -0500
@@ -37,7 +37,6 @@
 	plat_cflags="$plat_cflags -include ../src/compat/macosx.h"
 	plat_cflags="$plat_cflags -DAT_SYMLINK_NOFOLLOW=0x100"
 	plat_cflags="$plat_cflags -DAT_REMOVEDIR=0x200"
-	CC=clang
 	;;
 	FreeBSD)
 	plat_files="$plat_files ../src/compat/dummy.c"
@@ -77,7 +76,7 @@
 $CC $CFLAGS -c ../src/sqlite3/sqlite3.c -DSQLITE_TEMP_STORE=2 -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION $plat_cflags
 
 echo "  bootstrap LD tup $LDFLAGS"
-echo "const char *tup_version(void) {return \"$label\";}" | $CC -x c -c - -o tup_version.o
+echo "const char *tup_version(void) {return \"$label\";}" | $CC $CFLAGS -x c -c - -o tup_version.o
 $CC *.o -o tup -lpthread $plat_ldflags $LDFLAGS
 
 cd ..
