Merge branch 'master' of ssh://openpandora.org/srv/git/pandora-misc
authorNils Kneuper <crazy-ivanovic@gmx.net>
Mon, 13 Feb 2012 17:08:04 +0000 (18:08 +0100)
committerNils Kneuper <crazy-ivanovic@gmx.net>
Mon, 13 Feb 2012 17:08:04 +0000 (18:08 +0100)
sdk_installer/openpandora_toolchain.sh

index 979cb8a..b939992 100755 (executable)
 #   even include some useless things) but only a small number of binaries that
 #   can't be run on the host architecture.
 # * Should be rather easy to keep in sync with upsteam (aka openpandora.org)
-#   version changes.
+#   version changes simply by rerunning the script.
 #
-# The latest version of this script should be available in this forum thread:
+# The latest version of this script should be available in the openpandora.org
+# git repository:
+# http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-misc.git;a=tree;f=sdk_installer
+# 
+# Some more (partly historical) information about this installer script is
+# available in the following forum thread:
 # http://www.gp32x.com/board/index.php?/topic/58443-crosscompiler-toolchain-based-on-openpandora-org-ipks/
 #
 # This script was initially based upon the scripts provided in these threads:
 # http://www.gp32x.com/board/index.php?/topic/52343-pandora-sdk-installer/
 # http://www.gp32x.com/board/index.php?/topic/55453-pandora-sdk-installer-with-opkg/
 #
-# Copyright (C) 2011 by Nils Kneuper <crazy-ivanovic@gmx.net>
+# Copyright (C) 2011, 2012 by Nils Kneuper <crazy-ivanovic@gmx.net>
 #
 #
 # How to use:
@@ -47,7 +52,8 @@
 #   files. Those 700MB will be downloaded using your internetconnection.
 #
 # Known limitations:
-# * This toolchain won't work on a pure 64bit system.
+# * This toolchain won't work on a pure 64bit system (common systems also
+#   install 32bit libs, so this most likely does not affect you!).
 # * Whitespaces as well as quotes won't work inside the path to your PNDSDK_DIR.
 # * It will not automagically install the deps you need later on to run it, some
 #   hints what might be required are at the end of this comment section.
@@ -69,7 +75,7 @@
 # Getting the deps for Gentoo:
 # * If you are using amd64 make sure that the useflag "multilib" is selected.
 # * All required dependencies for this script to work should already be
-# * available.
+#   available.
 #
 #
 # TODO:
@@ -97,7 +103,8 @@ PNDSDK_DIR=$HOME/pandora-dev
 # Don't edit the line below, it depends on the codesourcery toolchain!
 #PNDSDK=$PNDSDK_DIR/arm-2009q3
 #PNDSDK=$PNDSDK_DIR/arm-2010.09
-PNDSDK=$PNDSDK_DIR/arm-2011.03
+#PNDSDK=$PNDSDK_DIR/arm-2011.03
+PNDSDK=$PNDSDK_DIR/arm-2011.09
 USEFUL_TOOLS_DIR=$PNDSDK_DIR/sdk_utils
 
 TARGET_SYS=arm-none-linux-gnueabi
@@ -109,9 +116,12 @@ TARGET_SYS=arm-none-linux-gnueabi
 #TOOLCHAIN_URL=http://www.codesourcery.com/sgpp/lite/arm/portal/package7851/public/arm-none-linux-gnueabi/arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
 #TOOLCHAIN_TARBALL_NAME=arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
 #TOOLCHAIN_MD5=f9dbd7a2daf20724e013cc4b5b64d62f
-TOOLCHAIN_URL=http://www.codesourcery.com/sgpp/lite/arm/portal/package8739/public/arm-none-linux-gnueabi/arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
-TOOLCHAIN_TARBALL_NAME=arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
-TOOLCHAIN_MD5=63d93a9f7fe9ff007bc69adfadc7c4ab
+#TOOLCHAIN_URL=http://www.codesourcery.com/sgpp/lite/arm/portal/package8739/public/arm-none-linux-gnueabi/arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
+#TOOLCHAIN_TARBALL_NAME=arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
+#TOOLCHAIN_MD5=63d93a9f7fe9ff007bc69adfadc7c4ab
+TOOLCHAIN_URL=http://sourcery.mentor.com/sgpp/lite/arm/portal/package9728/public/arm-none-linux-gnueabi/arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_TARBALL_NAME=arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_MD5=56d9a77654d012914e703dc8d9383246
 OPKG_VERSION=opkg-0.1.8
 OPKG_ARCHIVE_MD5=c714ce0e4863bf1315e3b6913ffe3299
 OPKG_ARCHIVE=$OPKG_VERSION.tar.gz
@@ -753,11 +763,11 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
 
 #usage sample with the sample case "wesnoth":
-#current 1.8 setup:
-#PATH=$PNDSDK/usr/bin:\$PATH CFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=soft -ffast-math -fsingle-precision-constant -fno-inline-functions" CXXFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=soft -ffast-math -fsingle-precision-constant -fno-inline-functions" cmake -DCMAKE_BUILD_TYPE=release -DENABLE_STRICT_COMPILATION=off -DCMAKE_TOOLCHAIN_FILE=$USEFUL_TOOLS_DIR/PandoraToolchain.cmake -DPKG_CONFIG_EXECUTABLE=$PNDSDK/bin/arm-none-linux-gnueabi-pkg-config -DSDL_CONFIG=$PNDSDK/usr/bin/sdl-config -DLUA_MATH_LIBRARY=$PNDSDK/arm-none-linux-gnueabi/libc/usr/lib/libm.so -DPREFERENCES_DIR=wesnoth-1.8_userdata ../wesnoth-1.8.x
+#current 1.10 setup:
+#PATH=$PNDSDK/usr/bin:\$PATH CFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -fno-inline-functions" CXXFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softf -fno-inline-functions" cmake -DCMAKE_BUILD_TYPE=release -DENABLE_STRICT_COMPILATION=off -DCMAKE_TOOLCHAIN_FILE=$USEFUL_TOOLS_DIR/PandoraToolchain.cmake -DPKG_CONFIG_EXECUTABLE=$PNDSDK/bin/arm-none-linux-gnueabi-pkg-config -DSDL_CONFIG=$PNDSDK/usr/bin/sdl-config -DLIBINTL_INCLUDE_DIR=$PNDSDK/arm-none-linux-gnueabi/libc/usr/include/ -DPREFERENCES_DIR=wesnoth-1.10_userdata ../wesnoth-1.10.x
 #
-#current 1.9 setup:
-#PATH=$PNDSDK/usr/bin:\$PATH CFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=soft -ffast-math -fsingle-precision-constant -fno-inline-functions" CXXFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=soft -ffast-math -fsingle-precision-constant -fno-inline-functions" cmake -DCMAKE_BUILD_TYPE=release -DENABLE_STRICT_COMPILATION=off -DCMAKE_TOOLCHAIN_FILE=$USEFUL_TOOLS_DIR/PandoraToolchain.cmake -DPKG_CONFIG_EXECUTABLE=$PNDSDK/bin/arm-none-linux-gnueabi-pkg-config -DSDL_CONFIG=$PNDSDK/usr/bin/sdl-config -DLIBINTL_INCLUDE_DIR=$PNDSDK/arm-none-linux-gnueabi/libc/usr/include/ -DPREFERENCES_DIR=wesnoth-1.9_userdata ../wesnoth-1.9.x
+#current 1.11 setup:
+#PATH=$PNDSDK/usr/bin:\$PATH CFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -fno-inline-functions" CXXFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -fno-inline-functions" cmake -DCMAKE_BUILD_TYPE=release -DENABLE_STRICT_COMPILATION=off -DCMAKE_TOOLCHAIN_FILE=$USEFUL_TOOLS_DIR/PandoraToolchain.cmake -DPKG_CONFIG_EXECUTABLE=$PNDSDK/bin/arm-none-linux-gnueabi-pkg-config -DSDL_CONFIG=$PNDSDK/usr/bin/sdl-config -DLIBINTL_INCLUDE_DIR=$PNDSDK/arm-none-linux-gnueabi/libc/usr/include/ -DPREFERENCES_DIR=wesnoth-1.11_userdata ../wesnoth-1.11.x
 _END_
        
        cecho "Creating $USEFUL_TOOLS_DIR/pandora_configure.sh" $green
@@ -787,8 +797,8 @@ LIBTOOL_SYSROOT_PATH=\$PNDSDK \\
 PKG_CONFIG_PATH=\$PNDSDK/usr/lib/pkgconfig \\
 PKG_CONFIG=\$PNDSDK/bin/arm-none-linux-gnueabi-pkg-config \\
 CPATH="\$PNDSDK/usr/include:\$CPATH" \\
-CFLAGS="-DPANDORA -Os -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -ffast-math -fsingle-precision-constant" \\
-CPPFLAGS="-DPANDORA -Os -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -ffast-math -fsingle-precision-constant" \\
+CFLAGS="-DPANDORA -Os -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -ffast-math" \\
+CPPFLAGS="-DPANDORA -Os -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -ffast-math" \\
 CXXFLAGS="-I\$PNDSDK/usr/include" \\
 LDFLAGS="-L\$PNDSDK/usr/lib -Wl,-rpath,\$PNDSDK/usr/lib" \\
 CXX=\$CROSSTOOL-g++ \\
@@ -1925,7 +1935,7 @@ QMAKE_CFLAGS_DEPS += -M
 #QMAKE_CFLAGS_HIDESYMS   += -fvisibility=hidden
 QMAKE_CFLAGS           += -pipe
 QMAKE_CFLAGS_RELEASE    += -fno-omit-frame-pointer -fno-optimize-sibling-calls
-QMAKE_CFLAGS_RELEASE   += -DPANDORA -Os -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -ffast-math -fsingle-precision-constant
+QMAKE_CFLAGS_RELEASE   += -DPANDORA -Os -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -ffast-math
 QMAKE_CFLAGS_SHLIB     += -fPIC
 QMAKE_CFLAGS_STATIC_LIB        += -fPIC
 QMAKE_CFLAGS_THREAD    += -D_REENTRANT