GCC Warning on MIPS

Ralf Corsepius ralf.corsepius at rtems.org
Tue Apr 22 15:05:27 UTC 2008


On Tue, 2008-04-22 at 10:01 -0500, Joel Sherrill wrote:
> Ralf Corsepius wrote:
> > On Tue, 2008-04-22 at 09:25 -0500, Joel Sherrill wrote:
> >   
> >> Ralf,
> >>
> >> I know neither of us go digging through build
> >> logs when the build works, but I came across this
> >> warning building GCC SVN trunk targeting mips-rtems4.9
> >>
> >> In file included from ./tm.h:10,
> >>                  from ../../gcc/gcc/gencheck.c:24:
> >> ../../gcc/gcc/config/rtems.h:21:1: warning: "NO_IMPLICIT_EXTERN_C" redefined
> >> In file included from ./tm.h:8,
> >>
> >> Not critical but is repeated about 10,000 times. :-D
> >>
> >> I think the #define NO_IMPLICIT_EXTERN_C in gcc/config/rtems.h
> >> needs an ifndef or an undef added.
> >>
> >> What do you think we need to do?
> >>     
> >
> > Hmm, do you have this patch below applied?
> >
> > diff -Naur gcc-4.3.0.orig/gcc/config/mips/elf.h gcc-4.3.0/gcc/config/mips/elf.h
> > --- gcc-4.3.0.orig/gcc/config/mips/elf.h        2007-08-02 12:49:31.000000000 +0200
> > +++ gcc-4.3.0/gcc/config/mips/elf.h     2008-03-06 16:22:30.000000000 +0100
> > @@ -48,6 +48,4 @@
> >  #undef  ENDFILE_SPEC
> >  #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
> >
> > -#define NO_IMPLICIT_EXTERN_C 1
> > -
> >  #define HANDLE_PRAGMA_PACK_PUSH_POP 1
> >
> >
> > This is a general bug in the mips port (I _know_ it is), but ...
> > upstream refuses to apply it, which forces us to keep it as a separate
> > patch :)
> >
> >   
> In many cases throughout the gcc config files, they just undef
> the previous one and redefine.  In the above, ENDFILE_SPEC
> is done that way.  Three of the five definitions in config/rtems.h
> have an undef in front of them.  Would it be so bad to just
> do that for the rest of the ones in rtems.h?

Why should they?

Wrt. to NO_IMPLICIT_EXTERN_C, to me this doesn't make any sense at all.

Ralf






More information about the users mailing list