On Tue, 1 Jul 2003, Kean Johnston wrote:

> >>I dont know when this was added, or even particularly why, but it seems
> >>wrong to me. Just because you are using GCC does NOT mean you want to
> >>use gcc -E as your CPP.

> > Yes, it does.

> Why?

> This is defining the CPP to use for porcessing Imakefile's. Many many
> UNIXes provide /lib/cpp as a general preprocessing tool. GCC or any
> other compiler is an extension package. Imake is used in environments
> outside of X11, albeit infrequently. IMHO, imake should be biased to
> using tools that are as generic as possible, not as specific as
> possible. Linux, and others, also provide /lib/cpp or /usr/bin/cpp or
> some equivalent, there is no need to use gcc -E.

> By forcing USE_CC_E in imakemdep.h, you completely eliminate the ability
> for a platform's .cf file to set the desired cpp with CppCmd. Look at
> how it is used in imahe.c, circa line 314. USE_CC_E is designed, as I
> remember and as I read the code, for systems that do NOT provide a
> suitable /lib/cpp or other preprocessor.

> I stand by that assertion I made earlier ... setting USE_CC_E just
> because of the compiler I chose is wrong. You are making global system
> decisions based on a compiler setting. Thats just plain wrong.

> > Beef up SCO's section in Imake.cf to more closely match Linux's.  Perhaps
> > this should be more globally done for any platform using GCC.

> That looks like you are fixing a bug created by a bug, not a bug created
> by a problem. You do realize that all of that trickery for Linux would
> not be needed if those lines in imakemdep.h were removed?
>
> > s/ deemed//.  Builds break on platforms where gcc is not the default
> > compiler.

> I dont understand how. If gcc is not the default compiler the .cf
> defines CppCmd. Thats the right place to fix it. SCO doesnt have gcc as
> its default compiler, and it works quite fine with those lines removed
> from imakemdep.h.

Different pre-processors have, in general, different pre-defines.  Using a
different pre-processor to generate Makefiles than that used to
pre-process the C source is asking for trouble (and getting it).  While
that might not be the case for SCO by some happenstance, it definitely is
on Solaris and IRIX, to name two.

Marc.

+----------------------------------+-----------------------------------+
|  Marc Aurele La France           |  work:   1-780-492-9310           |
|  Computing and Network Services  |  fax:    1-780-492-1729           |
|  352 General Services Building   |  email:  [EMAIL PROTECTED]          |
|  University of Alberta           +-----------------------------------+
|  Edmonton, Alberta               |                                   |
|  T6G 2H1                         |     Standard disclaimers apply    |
|  CANADA                          |                                   |
+----------------------------------+-----------------------------------+
XFree86 Core Team member.  ATI driver and X server internals.

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to