source: trunk/config.tests/unix/objcopy.test@ 497

Last change on this file since 497 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: 1.0 KB
Line 
1#!/bin/sh
2
3TEST_PATH=`dirname $0`
4SEP_DEBUG_SUPPORT=no
5COMPILER=$1
6QMAKE_OBJCOPY=$2
7VERBOSE=$3
8
9if [ -n "$QMAKE_OBJCOPY" ]; then
10 echo "int main() { return 0; }" > objcopy_test.cpp
11 if $TEST_PATH/which.test "$QMAKE_OBJCOPY" >/dev/null 2>&1 && $COMPILER -g -o objcopy_test objcopy_test.cpp >/dev/null 2>&1; then
12 "$QMAKE_OBJCOPY" --only-keep-debug objcopy_test objcopy_test.debug >/dev/null 2>&1 \
13 && "$QMAKE_OBJCOPY" --strip-debug objcopy_test >/dev/null 2>&1 \
14 && "$QMAKE_OBJCOPY" --add-gnu-debuglink=objcopy_test.debug objcopy_test >/dev/null 2>&1 \
15 && SEP_DEBUG_SUPPORT=yes
16 fi
17 rm -f objcopy_test objcopy_test.debug objcopy_test.cpp
18else
19 [ "$VERBOSE" = "yes" ] && echo "Separate debug info check skipped, QMAKE_OBJCOPY is unset.";
20fi
21
22# done
23if [ "$SEP_DEBUG_SUPPORT" != "yes" ]; then
24 [ "$VERBOSE" = "yes" ] && echo "Separate debug info support disabled."
25 exit 0
26else
27 [ "$VERBOSE" = "yes" ] && echo "Separate debug info support enabled."
28 exit 1
29fi
Note: See TracBrowser for help on using the repository browser.