linux-mips-fnet
[Top] [All Lists]

gcc error

To: linux@uni-koblenz.de, linux-mips@fnet.fr
Subject: gcc error
From: "Michael Laird" <mlaird@franck.sanders.lockheed.com>
Date: Thu, 7 Dec 1995 11:06:19 -0500
In-reply-to: Systemkennung Linux <linux@mailhost.uni-koblenz.de> "Re: Linux LibC [ was: Re: Re[3]: Linux/MIPS ]" (Dec 6, 2:26pm)
References: <199512061328.OAA03207@informatik.uni-koblenz.de>
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?

Thanks in advance for your help!

Michael Laird

-- 
----------------------------------------------------------------------------
Michael Laird, Nashua, NH               "Glory to God in the highest, and on
Sanders, A Lockheed Martin Company      earth peace, good will toward men."
mlaird@franck.sanders.lockheed.com              -- Luke 2:14
[All opinions expressed are personal and do not represent Sanders in any way.]

<Prev in Thread] Current Thread [Next in Thread>