From 0397fb9dcc850ee65d1a1259f41182ec79d9da3d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Apr 2020 13:24:49 +0200 Subject: [PATCH] build.sh: add --target option Just in case somebody wants to build a x86 WinCE compiler. --- build.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 87a0fb8..f20247d 100755 --- a/build.sh +++ b/build.sh @@ -43,6 +43,7 @@ Usage: $0 [OPTIONS] ... --prefix=PREFIX install toolchain in PREFIX [$ac_default_prefix] --host=HOST host on which the toolchain will run [BUILD] + --target=TARGET configure for building compilers for TARGET [arm-mingw32ce] -j, --parallelism PARALLELISM Pass PARALLELISM as -jPARALLELISM to make invocations. --components=LIST specify which components to build @@ -102,6 +103,11 @@ do --host=*) host=$ac_optarg ;; + --target) + ac_prev=target ;; + --target=*) + target=$ac_optarg ;; + --incremental) incremental=yes ;; @@ -455,9 +461,14 @@ while [ -n "$1" ]; do shift done -export TARGET="arm-mingw32ce" -#export TARGET="arm-wince-mingw32ce" +if [ "x${target}" != "x" ]; then + export TARGET="${target}" +else + export TARGET="arm-mingw32ce" +fi + export BUILD=`sh ${BASE_DIRECTORY}/gcc/config.guess` + if [ "x${host}" != "x" ]; then export HOST="${host}" else