38be0d1383
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
30 lines
1.0 KiB
Bash
Executable File
30 lines
1.0 KiB
Bash
Executable File
#!/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
|