Hi,

configure checks if contrib/compare-debug actually works for comparing a
debug and non-debug .o file before enabling bootstrap-debug.  But some
compilers encode some command line options (among them -g) into a special
.comment section.  This patch removes .comment section before comparing
debug and non-debug files.  OK for trunk?

Thanks.

H.J.
----
2012-05-24  H.J. Lu  <hongjiu...@intel.com>

        PR bootstrap/53472
        * contrib/compare-debug: Also remove .comment section.

diff --git a/contrib/compare-debug b/contrib/compare-debug
index 010d17f..c3eb659 100755
--- a/contrib/compare-debug
+++ b/contrib/compare-debug
@@ -73,6 +73,12 @@ Darwin)
   ;;
 esac
 
+# Also remove .comment section.
+if (objcopy -v) 2>&1 | grep ' --remove-section' > /dev/null; then
+  objcopy --remove-section .comment "$1.$suf1"
+  objcopy --remove-section .comment "$2.$suf2"
+fi
+
 if cmp "$1.$suf1" "$2.$suf2"; then
   status=0
 else

Reply via email to