* added workaround to gcc4 configuration that makes the comparison

of stage2 and stage3 compilers work on haiku (using objdump instead
  of cmp, as suggested by Michael)


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@32475 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2009-08-17 18:20:12 +00:00
parent 09a4a7d36c
commit a1532d3621
2 changed files with 42 additions and 31 deletions

View File

@ -401,9 +401,14 @@ dnl for the parameter format "cmp file1 file2 skip1 skip2" which is
dnl accepted by cmp on some systems.
AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL],
[AC_CACHE_CHECK([how to compare bootstrapped objects], gcc_cv_prog_cmp_skip,
[ echo abfoo >t1
echo cdfoo >t2
[# comparing object files via cmp doesn't work on haiku (files will seemingly
# always differ), so we disassemble both files and compare the results:
if uname -o | grep -iq haiku; then
gcc_cv_prog_cmp_skip='objdump -Dz $$f1 | tail +6 >tmp-foo1; objdump -Dz $$f2 | tail +6 >tmp-foo2; cmp tmp-foo1 tmp-foo2'
else
gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
echo abfoo >t1
echo cdfoo >t2
if cmp t1 t2 2 2 > /dev/null 2>&1; then
if cmp t1 t2 1 1 > /dev/null 2>&1; then
:
@ -419,6 +424,7 @@ AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL],
fi
fi
rm t1 t2
fi
])
do_compare="$gcc_cv_prog_cmp_skip"
AC_SUBST(do_compare)

9
gcc/configure vendored
View File

@ -4350,9 +4350,14 @@ echo $ECHO_N "checking how to compare bootstrapped objects... $ECHO_C" >&6
if test "${gcc_cv_prog_cmp_skip+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# comparing object files via cmp doesn't work on haiku (files will seemingly
# always differ), so we disassemble both files and compare the results:
if uname -o | grep -iq haiku; then
gcc_cv_prog_cmp_skip='objdump -Dz $$f1 | tail +6 >tmp-foo1; objdump -Dz $$f2 | tail +6 >tmp-foo2; cmp tmp-foo1 tmp-foo2'
else
gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
echo abfoo >t1
echo cdfoo >t2
gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
if cmp t1 t2 2 2 > /dev/null 2>&1; then
if cmp t1 t2 1 1 > /dev/null 2>&1; then
:
@ -4368,7 +4373,7 @@ else
fi
fi
rm t1 t2
fi
fi
echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6