source: trunk/config.tests/mac/dwarf2.test@ 7

Last change on this file since 7 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

  • Property svn:executable set to *
File size: 957 bytes
Line 
1#!/bin/sh
2
3DWARF2_SUPPORT=no
4DWARF2_SUPPORT_BROKEN=no
5COMPILER=$1
6VERBOSE=$2
7WORKDIR=$3
8
9touch dwarf2.c
10
11if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>/dev/null 1>&2; then
12 if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>&1 | grep "unsupported" >/dev/null ; then
13 true
14 else
15 DWARF2_SUPPORT=yes
16 fi
17fi
18rm -f dwarf2.c dwarf2.o
19
20# Test for xcode 2.4.0, which has a broken implementation of DWARF
21"$COMPILER" $WORKDIR/xcodeversion.cpp -o xcodeversion -framework Carbon;
22./xcodeversion
23
24if [ "$?" == "1" ]; then
25 DWARF2_SUPPORT_BROKEN=yes
26fi
27
28rm xcodeversion
29
30# done
31if [ "$DWARF2_SUPPORT" != "yes" ]; then
32 [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled."
33 exit 0
34else
35 if [ "$DWARF2_SUPPORT_BROKEN" == "yes" ]; then
36 [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled."
37 exit 0
38 else
39 [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols enabled."
40 exit 1
41 fi
42fi
Note: See TracBrowser for help on using the repository browser.