This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
gcc_AC_EXAMINE_OBJECT
- To: zackw at stanford dot edu, gcc-patches at gcc dot gnu dot org
- Subject: gcc_AC_EXAMINE_OBJECT
- From: Richard Henderson <rth at redhat dot com>
- Date: Fri, 16 Mar 2001 14:54:13 -0800
The endianness test fails on Alpha/ELF. The problem is that
sed 's/^[0-7]*[ ]*//
s/\*/./g
s/ \\n/*/g
you delete all the spaces at the beginning of the line, then
expect a space before the \n. As luck would have it, the od
output is like
0000100 \n e n d i a n : B A X \n 001 021 001 003
and the rest of the transformation results in
....\nendian:B
AX
being split across a line like that. Since you're about to
remove all of the spaces completely, I suggest not caring
about the space separator that od emits. Either that or do
the equivalent of your old "cut" via s/^........//.
r~
Index: aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/gcc/aclocal.m4,v
retrieving revision 1.45
diff -c -p -d -r1.45 aclocal.m4
*** aclocal.m4 2001/03/16 20:09:34 1.45
--- aclocal.m4 2001/03/16 22:47:32
*************** if AC_TRY_EVAL(ac_compile); then
*** 1286,1294 ****
od -c conftest.o |
sed ['s/^[0-7]*[ ]*//
s/\*/./g
! s/ \\n/*/g
! s/ [0-9][0-9][0-9]/./g
! s/ \\[^ ]/./g'] |
tr -d '
' | tr -s '*' '
' | fold | sed '$a\
--- 1286,1294 ----
od -c conftest.o |
sed ['s/^[0-7]*[ ]*//
s/\*/./g
! s/\\n/*/g
! s/[0-9][0-9][0-9]/./g
! s/\\[^ ]/./g'] |
tr -d '
' | tr -s '*' '
' | fold | sed '$a\