This is the mail archive of the gcc-bugs@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]

Re: egcs can't build make-3.76.1


>What's the contents of line 610?  The output looks as if it is a
>string function - and your problem covered in the glibc 2 FAQ.  I'm
>appending the relevant entry below.  
>
>The -O2  makes the difference (see below).

Very interesting suggestion.  But probably not correct.  I rebuilt using
this script:

	gcc -DHAVE_CONFIG_H -I. -I. -I. -I./glob -DLIBDIR=\"/usr/local/lib\" -DINCLUDEDIR=\"/usr/local/include\"  -E arscan.c > arscanE.c

	gcc -g -O2 -c arscanE.c

And again got no errors.  The source file is *extremely* ugly.  Here's a
copy of the offending section with line 610 marked thus:

		       );		/* Line 610 */

If you want to try it yourself, make-3.76.1 is available from any gnu
archive.

======================== Cut Here ======================== 

/* Return nonzero iff NAME matches MEM.
   If TRUNCATED is nonzero, MEM may be truncated to
   sizeof (struct ar_hdr.ar_name) - 1.  */

int
ar_name_equal (name, mem, truncated)
     char *name, *mem;
     int truncated;
{
  char *p;

  p = rindex (name, '/');
  if (p != 0)
    name = p + 1;

  /* We no longer use this kludge, since we
     now support long archive member names.  */

#if 0 && !defined (AIAMAG) && !defined (APOLLO)

  {
    /* `reallylongname.o' matches `reallylongnam.o'.
       If member names have a trailing slash, that's `reallylongna.o'.  */

    struct ar_hdr h;
    unsigned int max = sizeof (h.ar_name);
    unsigned int namelen, memlen;

    if (strncmp (name, mem, max - 3))
      return 0;

    namelen = strlen (name);
    memlen = strlen (mem);

    if (namelen > memlen && memlen >= max - 1
	&& name[namelen - 2] == '.' && name[namelen - 1] == 'o'
	&& mem[memlen - 2] == '.' && mem[memlen - 1] == 'o')
      return 1;

    if (namelen != memlen)
      return 0;

    return (namelen < max - 3 || !strcmp (name + max - 3, mem + max - 3));
  }

#else	/* AIX or APOLLO.  */
#ifndef VMS
  if (truncated)
    {
#ifdef AIAMAG
      /* TRUNCATED should never be set on this system.  */
      abort ();
#else
      struct ar_hdr hdr;
      return !strncmp (name, mem,
		       sizeof (hdr.ar_name) -
#if !defined (__hpux) && !defined (cray)
		       1
#else
		       2
#endif /* !__hpux && !cray */
		       );		/* Line 610 */
#endif
    }
#endif /* !VMS */

  return !strcmp (name, mem);

#endif
}


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