source:
trunk/config.tests/unix/objcopy.test@
5
Last change on this file since 5 was 2, checked in by , 16 years ago | |
---|---|
|
|
File size: 1.0 KB |
Line | |
---|---|
1 | #!/bin/sh |
2 | |
3 | TEST_PATH=`dirname $0` |
4 | SEP_DEBUG_SUPPORT=no |
5 | COMPILER=$1 |
6 | QMAKE_OBJCOPY=$2 |
7 | VERBOSE=$3 |
8 | |
9 | if [ -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 |
18 | else |
19 | [ "$VERBOSE" = "yes" ] && echo "Separate debug info check skipped, QMAKE_OBJCOPY is unset."; |
20 | fi |
21 | |
22 | # done |
23 | if [ "$SEP_DEBUG_SUPPORT" != "yes" ]; then |
24 | [ "$VERBOSE" = "yes" ] && echo "Separate debug info support disabled." |
25 | exit 0 |
26 | else |
27 | [ "$VERBOSE" = "yes" ] && echo "Separate debug info support enabled." |
28 | exit 1 |
29 | fi |
Note:
See TracBrowser
for help on using the repository browser.