1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-09-12 23:36:00 +00:00

platformtest.sh: Detect clang compilers

This commit is contained in:
Alexander Barton
2013-10-20 15:25:19 +02:00
parent 62865f7e19
commit beb9f65dc8
2 changed files with 6 additions and 3 deletions

View File

@@ -120,11 +120,12 @@ if [ -r "Makefile" ]; then
fi
else
# Non-GCC compiler
$CC --version 2>&1 | grep -i "LLVM" >/dev/null
$CC --version 2>&1 | grep -i "clang" >/dev/null
if [ $? -eq 0 ]; then
COMPILER=$($CC --version 2>/dev/null | head -1 \
| cut -d'(' -f1 | sed -e 's/version //g' \
| sed -e 's/Apple /A-/g')
| cut -d'(' -f1 | cut -d'-' -f1 \
| sed -e 's/version //g' | sed -e 's/Apple /A-/g' \
| sed -e 's/Debian //g' | sed -e 's/LLVM /clang /g')
fi
$CC -version 2>&1 | grep -i "tcc" >/dev/null
if [ $? -eq 0 ]; then