Skip to content
Snippets Groups Projects
Commit 849a6fb4 authored by Markus Blatt's avatar Markus Blatt
Browse files

[dunecontrol,bugfix] Make compiler error during multiarch detection non-fatal again.


The compiler might exit with nonzero exit code if given non-existent
options. Therefore we need to use set +e during this to make dunecontrol
to continue running even the options are not supported.
(cherry picked from commit 28a0a956)

Signed-off-by: default avatarMarkus Blatt <markus@dr-blatt.de>
parent 45183a5b
No related branches found
No related tags found
No related merge requests found
......@@ -233,7 +233,7 @@ extract_multiarch(){
my_cxx_compiler=`echo $CONFIGURE_FLAGS | $GREP CXX| sed "s/.*CXX=[\"']\?\([$NOBLANK^'^\"]*\)[\"']\?.*/\1/"`
fi
if test "x$my_cxx_compiler" == "x"; then
set +e
set +e #error in the multiarch detection should not be fatal.
$(which cc &>/dev/null)
if test $? -eq "0"; then
my_cxx_compiler=cc
......@@ -241,11 +241,11 @@ extract_multiarch(){
my_cxx_compiler=gcc
fi
fi
set -e
multiarch=$($my_cxx_compiler --print-multiarch 2>/dev/null)
if test $? -gt 0; then
multiarch=$($my_cxx_compiler -v 2>&1| $GREP target | sed "s/.*target=\([a-z0-9_-]\+\)/\1/")
fi
set -e # set to old value.
export MULTIARCH_LIBDIR="lib/$multiarch"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment