diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-02-02 22:54:48 +0000 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2016-02-02 22:54:48 +0000 |
commit | 16c915ec1826dcef2e58ecc055a3f5dfcefb235a (patch) | |
tree | c6fbf34939875915312f4b73a6973404c4da4efe | |
parent | 840dacc718ca8e0785542a14a164d7c6b2ae1983 (diff) | |
download | rockbox-16c915ec1826dcef2e58ecc055a3f5dfcefb235a.tar.gz 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-x | tools/configure | 8 |
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() { | |||
51 | 51 | ||
52 | prefixtools () { | 52 | prefixtools () { |
53 | prefix="$1" | 53 | prefix="$1" |
54 | if [ -n "$ARG_COMPILER_PREFIX" ]; then | ||
55 | echo "WARNING: asked to override target toolchain $1 with $ARG_COMPILER_PREFIX" | ||
56 | echo "WARNING: overriding the toolchain means you are running an untested configuration" | ||
57 | echo "WARNING: you build might be broken because of that" | ||
58 | prefix="$ARG_COMPILER_PREFIX" | ||
59 | fi | ||
54 | CC=${prefix}gcc | 60 | CC=${prefix}gcc |
55 | CPP=${prefix}cpp | 61 | CPP=${prefix}cpp |
56 | WINDRES=${prefix}windres | 62 | WINDRES=${prefix}windres |
@@ -1229,6 +1235,7 @@ help() { | |||
1229 | behavior of falling back to them if no native thread | 1235 | behavior of falling back to them if no native thread |
1230 | support was found. | 1236 | support was found. |
1231 | --prefix Target installation directory | 1237 | --prefix Target installation directory |
1238 | --compiler-prefix Override compiler prefix (inherently dangerous) | ||
1232 | --help Shows this message (must not be used with other options) | 1239 | --help Shows this message (must not be used with other options) |
1233 | 1240 | ||
1234 | EOF | 1241 | EOF |
@@ -1271,6 +1278,7 @@ for arg in "$@"; do | |||
1271 | --no-sdl-threads) | 1278 | --no-sdl-threads) |
1272 | ARG_THREAD_SUPPORT=0;; | 1279 | ARG_THREAD_SUPPORT=0;; |
1273 | --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;; | 1280 | --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;; |
1281 | --compiler-prefix=*) ARG_COMPILER_PREFIX=`echo "$arg" | cut -d = -f 2`;; | ||
1274 | --help) help;; | 1282 | --help) help;; |
1275 | *) err=1; echo "[ERROR] Option '$arg' unsupported";; | 1283 | *) err=1; echo "[ERROR] Option '$arg' unsupported";; |
1276 | esac | 1284 | esac |