: unix wrapper for macOS cc : 2020-05-13 : HOSTTYPE=darwin.generic case " $* " in *" -dumpmachine "*) echo $HOSTTYPE; exit ;; esac CC=/usr/bin/cc op=init for arg do case $op in init) op=ld set '' ;; esac case $arg in -c) op=cc ;; -E) op=cpp continue ;; -G) op=dll continue ;; -lc) continue ;; -lm) continue ;; -O) continue ;; esac set "$@" "$arg" done case $# in 0) ;; *) shift ;; esac case $* in -v) $CC "$@"; exit ;; esac case $op in init) echo "cc: arguments expected" >&2 exit 1 ;; cpp) $CC -E "$@" ;; cc) $CC -DSHOPT_SPAWN=0 -D_ast_int8_t=int64_t -D_lib_memccpy \ -Wno-unused-value -Wno-parentheses "$@" ;; dll) $CC -Wl,-flat_namespace -dynamiclib -undefined dynamic_lookup "$@" ;; ld) $CC -Wl,-search_paths_first "$@" ;; esac