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]

Re: 3.1 PATCH: Fix Solaris 2.5.1 <widec.h> to avoid bootstrap failure


Bruce Korb writes:

> > Btw., make check reveals an unrelated failure right now:
> > 
> > testing.h $root/fixinc/tests/base/testing.h differ: char 1716, line 74
> > --- testing.h   Mon Apr 29 21:35:58 2002
> > +++ $root/fixinc/tests/base/testing.h  Mon Jan  7 19:37:19 2002
> > @@ -71,7 +71,7 @@
> >  
> >  #if defined( MACHINE_NAME_CHECK )
> >  /* MACH_DIFF: */
> > -#if defined( i386 ) || defined( __sparc__ ) || defined( vax )
> > +#if defined( __i386__ ) || defined( sparc ) || defined( vax )
> >  /* no uniform test, so be careful  :-) */
> >  #endif  /* MACHINE_NAME_CHECK */
> 
> It seems you were not running on a sparc platform, but rather an i386.
> Note the comment, "no uniform test, so be careful  :-)"  :-)

Not at all: I've been running on sparc-sun-solaris2.8, as can be seen
above:

defined( sparc ) in $root/fixinc/tests/base/testing.h has been replaced by
defined( __sparc__ ), as expected.  On the other hand, i386 from test_text
is unchanged, but tests/base/testing.h expected __i386__.

> So, not having time now to check it out, my best guess is that the
> following patch will make it work correctly on i386, sparc and vax
> platforms.  The sed script should only work on the relevant line and
> then only if one machine name is properly prefixed by underscores.
> 
> If it works, we can apply it and add new machines as developers
> complain.

It does, once the corresponding change to tests/base/testing.h has been
applied:

--- testing.h.save	Mon Jan  7 19:37:19 2002
+++ tests/base/testing.h	Mon Apr 29 23:22:57 2002
@@ -71,7 +71,7 @@
 
 #if defined( MACHINE_NAME_CHECK )
 /* MACH_DIFF: */
-#if defined( __i386__ ) || defined( sparc ) || defined( vax )
+#if defined( __PLATFORM__ )
 /* no uniform test, so be careful  :-) */
 #endif  /* MACHINE_NAME_CHECK */
 
> $ cvs diff -u check.tpl                
> Index: check.tpl
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fixinc/check.tpl,v
> retrieving revision 1.14
> diff -u -u -r1.14 check.tpl
> --- check.tpl   27 May 2001 18:21:02 -0000      1.14
> +++ check.tpl   29 Apr 2002 20:41:35 -0000
> @@ -117,6 +117,13 @@
>  sed 's/\(#define __[A-Z_]*_TYPE__\).*/\1/' sys/types.h > XX
>  mv -f XX sys/types.h
>  
> +#  Special hack for testing.h:  each platform changes only those
> +#  ``#ifdef platform'' entries to ``#ifdef __platform__'' that are
> +#  relevant.  Patch the file to make it consistant for all platforms.
> +#
> +sed 's/^#if defined.*( __.*vax_* )$/#if defined( __PLATFORM__ )/'
> testing.h > XX

The patch didn't apply cleanly since your mailer seems to have broken this
line.

	Rainer


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