This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: fix autoconf test for eh_frame handling on cygwin/mingw


Using recent gas, spec files for a compiler hosted on a cygwin / msdos host
are different from a unix-flavour hosted compiler. The problem is that the
here-document in configure.ac eh_frame test  has unix  line endings, but the
objdump output has MSDOS endings.

We've been using this patch (without the comment) for a while in our sources,
and I am currently bootstrapping this in mainline on i686-pc-linux-gnu.
2006-03-09  Andrew Stubbs <andrew.stubbs@st.com>
	    J"orn Rennecke <joern.rennecke@st.com>

	* configure.ac (.eh_frame data check): Use diff -b.

--- configure.ac@@/main/GCC-4.1.0-int/renneckej-4.1.0-merge/0	2006-03-09 16:08:52.000000000 +0000
+++ configure.ac	2006-03-09 16:43:51.000000000 +0000
@@ -2122,11 +2130,14 @@ cat > conftest.big <<EOF
 EOF
   # If the assembler didn't choke, and we can objdump,
   # and we got the correct data, then succeed.
+  # The text in the here-document typically retains its unix-style line
+  # endings, while the output of objdump will use host line endings.
+  # Therefore, use diff -b for the comparisons.
   if test x$gcc_cv_objdump != x \
   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
      | tail -3 > conftest.got \
-  && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
-    || cmp conftest.big conftest.got > /dev/null 2>&1; }
+  && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
+    || diff -b conftest.big conftest.got > /dev/null 2>&1; }
   then
     gcc_cv_as_eh_frame=yes
   elif AC_TRY_COMMAND($gcc_cv_as -o conftest.o --traditional-format /dev/null); then

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]