Skip to content

Instantly share code, notes, and snippets.

@planbnet
Created July 14, 2010 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save planbnet/475766 to your computer and use it in GitHub Desktop.
Save planbnet/475766 to your computer and use it in GitHub Desktop.
Very old iOS cross compile toolchain init script
export IPHONELIBS=/opt/iphone
export COMP_VERSION=4.0.1
export SDK_VERSION=3.0
export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT=${DEVROOT}/SDKs/iPhoneOS${SDK_VERSION}.sdk
export BIN=${DEV}/usr/bin
export PATH=${BIN}:${PATH}
export LIBXML_CFLAGS=" -I${SDKROOT}/usr/include/libxml2"
export CC=$DEVROOT/usr/bin/gcc
export LD=$DEVROOT/usr/bin/ld
export CPP=$DEVROOT/usr/bin/cpp
export CXX=$DEVROOT/usr/bin/g++
export AR=$DEVROOT/usr/bin/ar
#export AR="${IPHONELIBS}/bin/gas-preprocessor.pl"
export AS=$DEVROOT/usr/bin/as
export NM=$DEVROOT/usr/bin/nm
export CXXCPP=$DEVROOT/usr/bin/cpp
export RANLIB=$DEVROOT/usr/bin/ranlib
#export RANLIB="${AR} -s"
export LDFLAGS="-arch armv6 -pipe -no-cpp-precomp -isysroot $SDKROOT -L${IPHONELIBS}/arm/lib"
export CFLAGS="-arch armv6 -pipe -no-cpp-precomp -isysroot $SDKROOT -I${IPHONELIBS}/arm/include"
export CXXFLAGS="-arch armv6 -pipe -no-cpp-precomp -isysroot $SDKROOT -I${IPHONELIBS}/arm/include/"
#export CC="${BIN}/arm-apple-darwin9-gcc-${COMP_VERSION}"
#export CXX="${BIN}/arm-apple-darwin9-g++-${COMP_VERSION}"
#export CPPFLAGS=$CFLAGS
#export CPP="$BIN/cpp $CPPFLAGS"
alias conf="./configure --prefix=${IPHONELIBS} --host=arm-apple-darwin9 --enable-shared=no"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment