first pass to move from llvm-gcc-4.2 to clang
This commit is contained in:
parent
07944c3a70
commit
395c40b9af
5 changed files with 18 additions and 22 deletions
|
@ -13,7 +13,7 @@ try $(dirname $0)/build-sdlmixer.sh
|
|||
try $(dirname $0)/build-libjpeg.sh
|
||||
try $(dirname $0)/build-pil.sh
|
||||
try $(dirname $0)/build-kivy.sh
|
||||
try $(dirname $0)/build-pyobjus.sh
|
||||
#try $(dirname $0)/build-pyobjus.sh
|
||||
|
||||
echo '== Build done'
|
||||
echo "Available libraries in $BUILDROOT/lib"
|
||||
|
|
|
@ -13,7 +13,7 @@ if [ ! -d $TMPROOT/libffi-$FFI_VERSION ]; then
|
|||
try mv libffi-$FFI_VERSION $TMPROOT
|
||||
fi
|
||||
|
||||
if [ -f $TMPROOT/libffi-$FFI_VERSION/Release-iphoneos/libffi.a ]; then
|
||||
if [ -f $TMPROOT/libffi-$FFI_VERSION/build/Release-iphoneos/libffi.a ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
|
|
|
@ -40,13 +40,13 @@ echo "Building for iOS ======================================================="
|
|||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-xcompile.patch
|
||||
|
||||
# set up environment variables for cross compilation
|
||||
export CPPFLAGS="-I$IOSSDKROOT/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I$IOSSDKROOT/usr/include/"
|
||||
#export CPPFLAGS="-I$IOSSDKROOT/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I$IOSSDKROOT/usr/include/"
|
||||
export CPP="$CCACHE /usr/bin/cpp $CPPFLAGS"
|
||||
export MACOSX_DEPLOYMENT_TARGET=
|
||||
|
||||
# make a link to a differently named library for who knows what reason
|
||||
mkdir extralibs||echo "foo"
|
||||
ln -s "$IOSSDKROOT/usr/lib/libgcc_s.1.dylib" extralibs/libgcc_s.10.4.dylib || echo "sdf"
|
||||
#mkdir extralibs||echo "foo"
|
||||
#ln -s "$IOSSDKROOT/usr/lib/libgcc_s.1.dylib" extralibs/libgcc_s.10.4.dylib || echo "sdf"
|
||||
|
||||
# Copy our setup for modules
|
||||
try cp $KIVYIOSROOT/src/python_files/ModulesSetup Modules/Setup.local
|
||||
|
|
|
@ -79,14 +79,18 @@ fi
|
|||
|
||||
|
||||
# flags for arm compilation
|
||||
export ARM_CC="$CCACHE $DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2"
|
||||
export ARM_AR="$DEVROOT/usr/bin/ar"
|
||||
export ARM_LD="$DEVROOT/usr/bin/ld"
|
||||
export ARM_CFLAGS="-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8"
|
||||
#export ARM_CC="$CCACHE $DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2"
|
||||
#export ARM_AR="$DEVROOT/usr/bin/ar"
|
||||
#export ARM_LD="$DEVROOT/usr/bin/ld"
|
||||
export ARM_CC=$(xcrun -find -sdk iphoneos clang)
|
||||
export ARM_AR=$(xcrun -find -sdk iphoneos ar)
|
||||
export ARM_LD=$(xcrun -find -sdk iphoneos ld)
|
||||
|
||||
export ARM_CFLAGS="-arch armv7"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -pipe -no-cpp-precomp"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -isysroot $IOSSDKROOT"
|
||||
export ARM_CFLAGS="$ARM_CFLAGS -miphoneos-version-min=$SDKVER"
|
||||
export ARM_LDFLAGS="-isysroot $IOSSDKROOT"
|
||||
export ARM_LDFLAGS="-arch armv7 -isysroot $IOSSDKROOT"
|
||||
export ARM_LDFLAGS="$ARM_LDFLAGS -miphoneos-version-min=$SDKVER"
|
||||
|
||||
# uncomment this line if you want debugging stuff
|
||||
|
|
|
@ -48,6 +48,9 @@ while i < len(sys.argv):
|
|||
|
||||
if opt.startswith("-D"):
|
||||
continue
|
||||
|
||||
if opt.startswith('-arch'):
|
||||
continue
|
||||
|
||||
if opt.startswith("-"):
|
||||
print sys.argv
|
||||
|
@ -69,16 +72,5 @@ f.close()
|
|||
|
||||
print 'Liblink redirect linking with', objects
|
||||
subprocess.call([
|
||||
'%s/usr/bin/ld' % environ.get('DEVROOT'), '-r',
|
||||
environ.get('ARM_LD'), '-r',
|
||||
'-o', output + '.o', '-arch', 'armv7'] + objects)
|
||||
'''
|
||||
subprocess.call([
|
||||
"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2",
|
||||
"-isysroot", environ.get('IOSSDKROOT'),
|
||||
"-r", "-march=armv7", "-mcpu=arm176jzf", "-mcpu=cortex-a8", "-o", output + ".o" ] + objects)
|
||||
'''
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue