Hi,
> Hello list (and especially Ralf):
>
> I was just compiling gcc-2.7.0 for mips-linuxelf, and ran into the following
> error:
> gcc.c:532: `CPP_PREDEFINES' undeclared here (not in a function)
> make: *** [gcc.o] Error 1
>
> I dug into gcc.c and found that it includes the following files:
> 1. config.h:
> a. i386/xm-linux.h:
> 1. i386/xm-i386.h:
> a. tm.h:
> 1. mips/linux.h:
> Ralf wrote this file, and it defines
> CPP_PREDEFINES
> a. mips/mips.h
> #ifndef CPP_PREDEFINES
> #define CPP_PREDEFINES "..."
> b. linux.h:
> 1. svr4.h
> This file #undef's
> CPP_PREDEFINES!!!
> 2. xm-linux.h
>
> So it looks like mips/linux.h is properly setting CPP_PREDEFINES, mips/mips.h
> is leaving CPP_PREDEFINES alone because it is already defined, but then svr4.h
> is *undefining* CPP_PREDEFINES!
>
> So what is the solution? Should svr4.h be included earlier in mips/linux.h so
> that CPP_PREDEFINES is defined after svr4.h is processed? Or should svr4.h be
> skipped in linux.h?
Sorry, I never compiled the big endian configuration. It just takes to long
on my 486/33 (Donations accepted :-) For a quick fix it should be sufficient
to move the define in linux.h down to the end of the file.
About including svr4 - I have to override lots of definitions from svr4
because MIPS svr4 systems are a bit different often. When I've got nothing
else left do I'll one day clean up that file in a way that it won't use the
svr4 stuff any more.
Hope that helps & thanks for the bug report,
Ralf
|