diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2009-03-23 09:34:13 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-23 09:34:13 (GMT) |
commit | 67ad0519fd165acee4a4d2a94fa502e9e4847bd0 (patch) | |
tree | 1dbf50b3dff8d5ca7e9344733968c72704eb15ff /config.tests/mac/dwarf2.test | |
download | Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.zip Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.gz Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.bz2 |
Long live Qt!
Diffstat (limited to 'config.tests/mac/dwarf2.test')
-rwxr-xr-x | config.tests/mac/dwarf2.test | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/config.tests/mac/dwarf2.test b/config.tests/mac/dwarf2.test new file mode 100755 index 0000000..a640b11 --- /dev/null +++ b/config.tests/mac/dwarf2.test @@ -0,0 +1,42 @@ +#!/bin/sh + +DWARF2_SUPPORT=no +DWARF2_SUPPORT_BROKEN=no +COMPILER=$1 +VERBOSE=$2 +WORKDIR=$3 + +touch dwarf2.c + +if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>/dev/null 1>&2; then + if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>&1 | grep "unsupported" >/dev/null ; then + true + else + DWARF2_SUPPORT=yes + fi +fi +rm -f dwarf2.c dwarf2.o + +# Test for xcode 2.4.0, which has a broken implementation of DWARF +"$COMPILER" $WORKDIR/xcodeversion.cpp -o xcodeversion -framework Carbon; +./xcodeversion + +if [ "$?" == "1" ]; then + DWARF2_SUPPORT_BROKEN=yes +fi + +rm xcodeversion + +# done +if [ "$DWARF2_SUPPORT" != "yes" ]; then + [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled." + exit 0 +else + if [ "$DWARF2_SUPPORT_BROKEN" == "yes" ]; then + [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled." + exit 0 + else + [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols enabled." + exit 1 + fi +fi |