oclang/ogcc wrapper: check if '-mmacosx-version-min=' is already given through the invocation command

This commit is contained in:
Thomas Pöchtrager 2013-12-03 20:18:20 +01:00
parent e7160ea10a
commit 8a5c32021e
2 changed files with 14 additions and 2 deletions

View File

@ -22,6 +22,16 @@ else
COMPILER="clang" COMPILER="clang"
fi fi
if [ $# -gt 0 ]; then
for p in "$@"
do
if [[ "$p" == -mmacosx-version-min=* ]]; then
OSXCROSS_OSX_VERSION_MIN="default"
break
fi
done
fi
if [ "$OSXCROSS_OSX_VERSION_MIN" != "default" ]; then if [ "$OSXCROSS_OSX_VERSION_MIN" != "default" ]; then
OSX_VERSION_MIN_OPT="-mmacosx-version-min=$OSXCROSS_OSX_VERSION_MIN" OSX_VERSION_MIN_OPT="-mmacosx-version-min=$OSXCROSS_OSX_VERSION_MIN"
else else

View File

@ -31,8 +31,10 @@ if [ $# -gt 0 ]; then
do do
if [ "$p" == "-arch" ] || [ "$p" == "-m32" ] || [ "$p" == "-m64" ]; then if [ "$p" == "-arch" ] || [ "$p" == "-m32" ] || [ "$p" == "-m64" ]; then
ARCHGIVEN=1 ARCHGIVEN=1
break fi
fi if [[ "$p" == -mmacosx-version-min=* ]]; then
OSXCROSS_OSX_VERSION_MIN="default"
fi
done done
if [ $ARCHGIVEN -eq 0 ]; then if [ $ARCHGIVEN -eq 0 ]; then