diff --git a/src/build/compile.sh b/src/build/compile.sh index 25d4f44da..0de175ce6 100755 --- a/src/build/compile.sh +++ b/src/build/compile.sh @@ -124,13 +124,17 @@ type $CC >> "$DIR/install.log" 2>&1 || { echo >&2 "[ERROR] Please install \"$CC\ [ -z "$LDFLAGS" ] && LDFLAGS=""; [ -z "$CONFIGURE_FLAGS" ] && CONFIGURE_FLAGS=""; -$CC -O2 -march=$march -mtune=$mtune -fno-gcse $CFLAGS -Q --help=target >> "$DIR/install.log" 2>&1 -if [ $? -ne 0 ]; then - $CC -O2 -fno-gcse $CFLAGS -Q --help=target >> "$DIR/install.log" 2>&1 +if [ "$1" != "crosscompile" ]; then + $CC -O2 -march=$march -mtune=$mtune -fno-gcse $CFLAGS -Q --help=target >> "$DIR/install.log" 2>&1 if [ $? -ne 0 ]; then - export CFLAGS="-O2 -fno-gcse " + $CC -O2 -fno-gcse $CFLAGS -Q --help=target >> "$DIR/install.log" 2>&1 + if [ $? -ne 0 ]; then + export CFLAGS="-O2 -fno-gcse " + else + export CFLAGS="-O2 -fno-gcse $CFLAGS" + fi else - export CFLAGS="-O2 -fno-gcse $CFLAGS" + export CFLAGS="-O2 -march=$march -mtune=$mtune -fno-gcse $CFLAGS" fi else export CFLAGS="-O2 -march=$march -mtune=$mtune -fno-gcse $CFLAGS" diff --git a/src/build/jenkins.sh b/src/build/jenkins.sh index 9e25ed244..ddca91bc6 100644 --- a/src/build/jenkins.sh +++ b/src/build/jenkins.sh @@ -62,7 +62,7 @@ then ./configure --prefix="$COMPILEDIR/mac/libtool" > /dev/null make > /dev/null make install - cd ../ + cd ../ rm -rf libtool-2.4.2 export LIBTOOL="$COMPILEDIR/mac/libtool/bin/libtool" export LIBTOOLIZE="$COMPILEDIR/mac/libtool/bin/libtoolize" @@ -117,7 +117,15 @@ if [ "$CROSSCOMPILE_IOS_ARMV6" = "true" ]; then mkdir -p {$COMPILEDIR,$ARCHIVE}/crosscompile/ios-armv6 cd $COMPILEDIR/crosscompile/ios-armv6 - + curl -L http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz | tar -xz > /dev/null + cd libtool-2.4.2 + ./configure --prefix="$COMPILEDIR/mac/libtool" > /dev/null + make > /dev/null + make install + cd ../ + rm -rf libtool-2.4.2 + export LIBTOOL="$COMPILEDIR/mac/libtool/bin/libtool" + export LIBTOOLIZE="$COMPILEDIR/mac/libtool/bin/libtoolize" PATH="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/:$PATH" $SCRIPT crosscompile ios-armv6 cp -r $COMPILEDIR/crosscompile/ios-armv6/{install.log,bin/*,install_data/*} $ARCHIVE/crosscompile/ios-armv6/ @@ -130,6 +138,15 @@ if [ "$CROSSCOMPILE_IOS_ARMV7" = "true" ]; then mkdir -p {$COMPILEDIR,$ARCHIVE}/crosscompile/ios-armv7 cd $COMPILEDIR/crosscompile/ios-armv7 + curl -L http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz | tar -xz > /dev/null + cd libtool-2.4.2 + ./configure --prefix="$COMPILEDIR/mac/libtool" > /dev/null + make > /dev/null + make install + cd ../ + rm -rf libtool-2.4.2 + export LIBTOOL="$COMPILEDIR/mac/libtool/bin/libtool" + export LIBTOOLIZE="$COMPILEDIR/mac/libtool/bin/libtoolize" PATH="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/:$PATH" $SCRIPT crosscompile ios-armv7 cp -r $COMPILEDIR/crosscompile/ios-armv7/{install.log,bin/*,install_data/*} $ARCHIVE/crosscompile/ios-armv7/