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

[dunecontrol,release] Support multiarch detection with clang

clang does not support -print-multiarch. Therefore we try to
extract the "Target:" line from clang -v.
parent 63a24c54
No related branches found
No related tags found
No related merge requests found
...@@ -244,7 +244,10 @@ extract_multiarch(){ ...@@ -244,7 +244,10 @@ extract_multiarch(){
fi fi
multiarch=$($my_cxx_compiler --print-multiarch 2>/dev/null) multiarch=$($my_cxx_compiler --print-multiarch 2>/dev/null)
if test $? -gt 0; then if test $? -gt 0; then
multiarch=$($my_cxx_compiler -v 2>&1| $GREP target | $SED "s/.*target=\([a-z0-9_-]*\)/\1/") for i in "target=" "Target:"; do
multiarch=$($my_cxx_compiler -v 2>&1| $GREP "$i" | $SED "s/.*$i[$BLANK]*\([a-z0-9_-]*\)/\1/" | $SED "s/-[a-z]*-linux-gnu/-linux-gnu/")
if test -n "$multiarch"; then break; fi
done
fi fi
set -e # set to old value. set -e # set to old value.
export MULTIARCH_LIBDIR="lib/$multiarch" export MULTIARCH_LIBDIR="lib/$multiarch"
......
...@@ -171,7 +171,10 @@ extract_multiarch_pkg_config_path(){ ...@@ -171,7 +171,10 @@ extract_multiarch_pkg_config_path(){
fi fi
multiarch=$($my_cxx_compiler --print-multiarch 2>/dev/null) multiarch=$($my_cxx_compiler --print-multiarch 2>/dev/null)
if test $? -gt 0; then if test $? -gt 0; then
multiarch=$($my_cxx_compiler -v 2>&1| $GREP target | sed "s/.*target=\([a-z0-9_-]*\)/\1/") for i in "target=" "Target:"; do
multiarch=$($my_cxx_compiler -v 2>&1| $GREP "$i" | sed "s/.*$i[$BLANK]*\([a-z0-9_-]*\)/\1/" | $SED "s/-[a-z]*-linux-gnu/-linux-gnu/")
if test -n "$multiarch"; then break; fi
done
fi fi
set -e # set to old value. set -e # set to old value.
export MULTIARCH_LIBDIR="lib/$multiarch" 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