mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Darwin builds: handle different possible form for SDKROOT.
Modifying build_llvm to handle SDKROOT being the name of an SDK rather than a path. This will still work if SDKROOT is a path. rdar://problem/15162322 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201560 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4bcb985295
commit
eb720cc3a1
@ -89,6 +89,8 @@ else
|
|||||||
LLVM_VERSION="$LLVM_SUBMIT_VERSION-$LLVM_SUBMIT_SUBVERSION"
|
LLVM_VERSION="$LLVM_SUBMIT_VERSION-$LLVM_SUBMIT_SUBVERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SDKROOT_PATH=`xcodebuild -version -sdk $SDKROOT Path`
|
||||||
|
|
||||||
# Figure out how many make processes to run.
|
# Figure out how many make processes to run.
|
||||||
SYSCTL=`sysctl -n hw.activecpu`
|
SYSCTL=`sysctl -n hw.activecpu`
|
||||||
# sysctl -n hw.* does not work when invoked via B&I chroot /BuildRoot.
|
# sysctl -n hw.* does not work when invoked via B&I chroot /BuildRoot.
|
||||||
@ -109,7 +111,7 @@ COMMON_CONFIGURE_OPTS="\
|
|||||||
|
|
||||||
COMMON_MAKEFLAGS="\
|
COMMON_MAKEFLAGS="\
|
||||||
UNIVERSAL=1 \
|
UNIVERSAL=1 \
|
||||||
UNIVERSAL_SDK_PATH=$SDKROOT \
|
UNIVERSAL_SDK_PATH=$SDKROOT_PATH \
|
||||||
NO_RUNTIME_LIBS=1 \
|
NO_RUNTIME_LIBS=1 \
|
||||||
DISABLE_EDIS=1 \
|
DISABLE_EDIS=1 \
|
||||||
REQUIRES_RTTI=1 \
|
REQUIRES_RTTI=1 \
|
||||||
@ -141,7 +143,7 @@ if [ "$ARM_HOSTED_BUILD" = yes ]; then
|
|||||||
T=`xcrun -sdk $SDKROOT -find ${prog}`
|
T=`xcrun -sdk $SDKROOT -find ${prog}`
|
||||||
ln -s $T $DIR/bin/$prog
|
ln -s $T $DIR/bin/$prog
|
||||||
echo '#!/bin/sh' > $P || exit 1
|
echo '#!/bin/sh' > $P || exit 1
|
||||||
echo 'exec '$T' -arch armv7 -isysroot '${SDKROOT}' "$@"' >> $P || exit 1
|
echo 'exec '$T' -arch armv7 -isysroot '${SDKROOT_PATH}' "$@"' >> $P || exit 1
|
||||||
chmod a+x $P || exit 1
|
chmod a+x $P || exit 1
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -193,8 +195,8 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $SDKROOT ]; then
|
if [ $SDKROOT_PATH ]; then
|
||||||
CPPFLAGS="$CPPFLAGS -isysroot $SDKROOT"
|
CPPFLAGS="$CPPFLAGS -isysroot $SDKROOT_PATH"
|
||||||
fi
|
fi
|
||||||
for host in $HOSTS; do :; done
|
for host in $HOSTS; do :; done
|
||||||
CPPFLAGS="$CPPFLAGS -arch $host"
|
CPPFLAGS="$CPPFLAGS -arch $host"
|
||||||
|
Loading…
Reference in New Issue
Block a user