diff options
author | Qt by Nokia <qt-info@nokia.com> | 2011-04-27 12:05:43 +0200 |
---|---|---|
committer | axis <qt-info@nokia.com> | 2011-04-27 12:05:43 +0200 |
commit | 38be0d13830efd2d98281c645c3a60afe05ffece (patch) | |
tree | 6ea73f3ec77f7d153333779883e8120f82820abe /config.tests/mac/dwarf2.test |
Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://qt.gitorious.org/qt/pages/GitIntroductionWithQt
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12
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 0000000000..a640b113de --- /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 |