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
This commit is contained in:
parent
840dacc718
commit
16c915ec18
8
tools/configure
vendored
8
tools/configure
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user