summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-02-02 22:54:48 +0000
committerAmaury Pouly <amaury.pouly@gmail.com>2016-02-02 22:54:48 +0000
commit16c915ec1826dcef2e58ecc055a3f5dfcefb235a (patch)
treec6fbf34939875915312f4b73a6973404c4da4efe
parent840dacc718ca8e0785542a14a164d7c6b2ae1983 (diff)
downloadrockbox-16c915ec1826dcef2e58ecc055a3f5dfcefb235a.tar.gz
rockbox-16c915ec1826dcef2e58ecc055a3f5dfcefb235a.tar.bz2
rockbox-16c915ec1826dcef2e58ecc055a3f5dfcefb235a.zip
configure: allow for compiler toolchain override (with warnings)
The current configure script unfortunately does not allow one to use another toolchain than the one hardwire in the script. Although this is good to ensure working builds, it can be burden when one wants to either test other compilers, does not want to have to multiple redundant compilers or when the compiler install script fails for unknown reasons (MIPS I'm looking at you). The syntax is simple, for example: /path/to/configure --compiler-prefix arm-none-eabi- Also 'make reconf' will properly keep the prefix. Change-Id: I5ee3bc61afa10193586ddd3aef694a8ac08854e2
-rwxr-xr-xtools/configure8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/configure b/tools/configure
index ec8350212a..efad8a7c46 100755
--- a/tools/configure
+++ b/tools/configure
@@ -51,6 +51,12 @@ input() {
prefixtools () {
prefix="$1"
+ if [ -n "$ARG_COMPILER_PREFIX" ]; then
+ echo "WARNING: asked to override target toolchain $1 with $ARG_COMPILER_PREFIX"
+ echo "WARNING: overriding the toolchain means you are running an untested configuration"
+ echo "WARNING: you build might be broken because of that"
+ prefix="$ARG_COMPILER_PREFIX"
+ fi
CC=${prefix}gcc
CPP=${prefix}cpp
WINDRES=${prefix}windres
@@ -1229,6 +1235,7 @@ help() {
behavior of falling back to them if no native thread
support was found.
--prefix Target installation directory
+ --compiler-prefix Override compiler prefix (inherently dangerous)
--help Shows this message (must not be used with other options)
EOF
@@ -1271,6 +1278,7 @@ for arg in "$@"; do
--no-sdl-threads)
ARG_THREAD_SUPPORT=0;;
--prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
+ --compiler-prefix=*) ARG_COMPILER_PREFIX=`echo "$arg" | cut -d = -f 2`;;
--help) help;;
*) err=1; echo "[ERROR] Option '$arg' unsupported";;
esac