From 36f28382dba6030f2b16a790be85dbfbeff8790f Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 12 Dec 2017 20:07:38 -0500 Subject: [PATCH] configure: Properly test for set crossToolsPrefix and targetArchs. Now you can specify a --build-cross-tools and then override just GCC from it with a following --use-clang in the same configure invocation. --- configure | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 5368bf9c3e..922665c76d 100755 --- a/configure +++ b/configure @@ -699,10 +699,14 @@ while [ $# -gt 0 ] ; do ;; esac get_build_tool_path clang clang - if [ -n "crossToolsPrefix_$targetArch" ]; then + if [ -z `get_variable "crossToolsPrefix_$targetArch"` ] \ + && [ -z `get_variable buildCrossToolsMachine_$targetArch` ]; then set_variable crossToolsPrefix_$targetArch llvm- fi - targetArchs="$targetArchs $targetArch" + if ! test "${targetArchs#*$targetArch}" != "$targetArchs"; then + # we have not already added this arch to targetArchs, so add it now + targetArchs="$targetArchs $targetArch" + fi HAIKU_PACKAGING_ARCHS= shift 2 ;;