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]

gcc_AC_EXAMINE_OBJECT


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\


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