cc.darwin revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrini: unix wrapper for mac osx cc : 2012-01-20 :
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrinicase " $* " in
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrini*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrini -lm) continue
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder set "$@" "$arg"
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder-v) $CC "$@"; exit ;;
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torriniinit) echo "cc: arguments expected" >&2
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrinicpp) $CC -E "$@"
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroedercc) $CC -DCLK_TCK=100 "$@"
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrinidll) # what a compatibility mess -- surely they can get the apis to play nice
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder trap "rm -f $tmp" EXIT
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder case `MACOSX_DEPLOYMENT_TARGET=10.3 ld -undefined dynamic_lookup 2>&1` in
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrini *undefined*dynamic_lookup*)
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder ld -m -flat_namespace -undefined suppress -dylib -dynamic \
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder -ldylib1.o "$@" -lcc_dynamic -framework System >$tmp 2>&1
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder *) MACOSX_DEPLOYMENT_TARGET=10.3 $CC -Wl,-flat_namespace -dynamiclib -undefined dynamic_lookup "$@" >$tmp 2>&1
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrini egrep -v ' (warning .*multiple definitions|definition) of ' $tmp >&2
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroederld) tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder trap "rm -f $tmp" EXIT
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrini $CC -Wl,-m -DCLK_TCK=100 "$@" >$tmp 2>&1
28ff4d4c01dc43440f7e6fde73ab783e7e0999d6Paolo Torrini egrep -v ' (warning .*multiple definitions of|definition of|as lazy binding|not from earlier dynamic) ' $tmp >&2