scripts/detect_cc.sh: fix indentation
Use tabs consistently. Change-Id: I4d50f553047105f0e0b4859a20e93d275494aff0 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
6d6d1161c7
commit
5d6509e008
@ -4,7 +4,7 @@ set -e
|
|||||||
|
|
||||||
function err()
|
function err()
|
||||||
{
|
{
|
||||||
echo "$@" >&2
|
echo "$@" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
function usage()
|
function usage()
|
||||||
@ -19,7 +19,7 @@ function usage()
|
|||||||
err " -h, --help Display this help and exit"
|
err " -h, --help Display this help and exit"
|
||||||
err " --cc=path C compiler to use"
|
err " --cc=path C compiler to use"
|
||||||
err " --cxx=path C++ compiler to use"
|
err " --cxx=path C++ compiler to use"
|
||||||
err " --lto=[y|n] Attempt to configure for LTO"
|
err " --lto=[y|n] Attempt to configure for LTO"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,22 +57,22 @@ CXX_TYPE=$($CXX -v 2>&1 | grep version | awk '{print $1}')
|
|||||||
LD_TYPE=$(ld -v 2>&1 | awk '{print $2}')
|
LD_TYPE=$(ld -v 2>&1 | awk '{print $2}')
|
||||||
|
|
||||||
if [ "$CC_TYPE" != "$CXX_TYPE" ]; then
|
if [ "$CC_TYPE" != "$CXX_TYPE" ]; then
|
||||||
err "C compiler is $CC_TYPE but C++ compiler is $CXX_TYPE"
|
err "C compiler is $CC_TYPE but C++ compiler is $CXX_TYPE"
|
||||||
err "This may result in errors"
|
err "This may result in errors"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CCAR="ar"
|
CCAR="ar"
|
||||||
if [ "$LTO" = "y" ]; then
|
if [ "$LTO" = "y" ]; then
|
||||||
if [ "$CC_TYPE" = "clang" ]; then
|
if [ "$CC_TYPE" = "clang" ]; then
|
||||||
if [ "$LD_TYPE" != "gold" ]; then
|
if [ "$LD_TYPE" != "gold" ]; then
|
||||||
err "Using LTO with clang requires the gold linker."
|
err "Using LTO with clang requires the gold linker."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
CCAR="llvm-ar"
|
CCAR="llvm-ar"
|
||||||
else
|
else
|
||||||
CCAR="gcc-ar"
|
CCAR="gcc-ar"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "CC=$CC"
|
echo "CC=$CC"
|
||||||
|
Loading…
Reference in New Issue
Block a user