mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Build on more darwin/macOS versions
src/cmd/INIT/cc.darwin*: - Build on ancient Mac OS X gcc versions (darwin 7+, Mac OS X 10.3+), more recent gcc versions (darwin 11+, Mac OS X 10.7+), as well as current clang versions. So there are now three cc.darwin* wrapper scripts for these different darwin versions. bin/package, src/cmd/INIT/package.sh: - Differentiate the host ID and pick the correct Darwin script based on the detected OS release version.
This commit is contained in:
parent
04b9171858
commit
7a8a46700c
4 changed files with 83 additions and 4 deletions
|
@ -2396,7 +2396,10 @@ int main()
|
|||
case $lhs in
|
||||
bsdi) lhs=bsd ;;
|
||||
darwin) case $(/usr/bin/cc --version) in
|
||||
*'(GCC)'*) lhs=${lhs}_old ;;
|
||||
*'(GCC)'*) case $rel in
|
||||
[0-9].*|10.*) lhs=darwin07 ;;
|
||||
*) lhs=darwin11 ;;
|
||||
esac ;;
|
||||
esac
|
||||
;;
|
||||
freebsd) case $rel in
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
: unix wrapper for mac osx cc : 2012-01-20 :
|
||||
: unix wrapper for Mac OS X 10.3-10.6 (Darwin 7-10) cc : 2012-01-20 :
|
||||
|
||||
HOSTTYPE=darwin.generic
|
||||
HOSTTYPE=darwin07.generic
|
||||
|
||||
case " $* " in
|
||||
*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
|
73
src/cmd/INIT/cc.darwin11
Executable file
73
src/cmd/INIT/cc.darwin11
Executable file
|
@ -0,0 +1,73 @@
|
|||
: unix wrapper for Mac OS X 10.7 (Darwin 11) cc : 2013-11-07 :
|
||||
|
||||
HOSTTYPE=darwin11.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 -DCLK_TCK=100 "$@"
|
||||
;;
|
||||
dll) # what a compatibility mess -- surely they can get the apis to play nice
|
||||
tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
|
||||
trap "rm -f $tmp" EXIT
|
||||
case `MACOSX_DEPLOYMENT_TARGET=10.7 ld -undefined dynamic_lookup 2>&1` in
|
||||
*undefined*dynamic_lookup*)
|
||||
ld -m -flat_namespace -undefined suppress -dylib -dynamic \
|
||||
-ldylib1.o "$@" -lcc_dynamic -framework System >$tmp 2>&1
|
||||
status=$?
|
||||
;;
|
||||
*) MACOSX_DEPLOYMENT_TARGET=10.7 $CC -Wl,-flat_namespace -dynamiclib -undefined dynamic_lookup "$@" >$tmp 2>&1
|
||||
status=$?
|
||||
;;
|
||||
esac
|
||||
egrep -v ' (warning .*multiple definitions|definition) of ' $tmp >&2
|
||||
exit $status
|
||||
;;
|
||||
ld) tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
|
||||
trap "rm -f $tmp" EXIT
|
||||
$CC -Wl,-m -DCLK_TCK=100 "$@" >$tmp 2>&1
|
||||
status=$?
|
||||
egrep -v ' (warning .*multiple definitions of|definition of|as lazy binding|not from earlier dynamic) ' $tmp >&2
|
||||
exit $status
|
||||
;;
|
||||
esac
|
|
@ -2395,7 +2395,10 @@ int main()
|
|||
case $lhs in
|
||||
bsdi) lhs=bsd ;;
|
||||
darwin) case $(/usr/bin/cc --version) in
|
||||
*'(GCC)'*) lhs=${lhs}_old ;;
|
||||
*'(GCC)'*) case $rel in
|
||||
[0-9].*|10.*) lhs=darwin07 ;;
|
||||
*) lhs=darwin11 ;;
|
||||
esac ;;
|
||||
esac
|
||||
;;
|
||||
freebsd) case $rel in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue