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/unix/objcopy.test | |
download | Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.zip Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.gz Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.bz2 |
Long live Qt!
Diffstat (limited to 'config.tests/unix/objcopy.test')
-rwxr-xr-x | config.tests/unix/objcopy.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/config.tests/unix/objcopy.test b/config.tests/unix/objcopy.test new file mode 100755 index 0000000..eb2173d --- /dev/null +++ b/config.tests/unix/objcopy.test @@ -0,0 +1,29 @@ +#!/bin/sh + +TEST_PATH=`dirname $0` +SEP_DEBUG_SUPPORT=no +COMPILER=$1 +QMAKE_OBJCOPY=$2 +VERBOSE=$3 + +if [ -n "$QMAKE_OBJCOPY" ]; then + echo "int main() { return 0; }" > objcopy_test.cpp + if $TEST_PATH/which.test "$QMAKE_OBJCOPY" >/dev/null 2>&1 && $COMPILER -g -o objcopy_test objcopy_test.cpp >/dev/null 2>&1; then + "$QMAKE_OBJCOPY" --only-keep-debug objcopy_test objcopy_test.debug >/dev/null 2>&1 \ + && "$QMAKE_OBJCOPY" --strip-debug objcopy_test >/dev/null 2>&1 \ + && "$QMAKE_OBJCOPY" --add-gnu-debuglink=objcopy_test.debug objcopy_test >/dev/null 2>&1 \ + && SEP_DEBUG_SUPPORT=yes + fi + rm -f objcopy_test objcopy_test.debug objcopy_test.cpp +else + [ "$VERBOSE" = "yes" ] && echo "Separate debug info check skipped, QMAKE_OBJCOPY is unset."; +fi + +# done +if [ "$SEP_DEBUG_SUPPORT" != "yes" ]; then + [ "$VERBOSE" = "yes" ] && echo "Separate debug info support disabled." + exit 0 +else + [ "$VERBOSE" = "yes" ] && echo "Separate debug info support enabled." + exit 1 +fi |