Re: Patch to ask if user has egcs/pgcc / add me to credits

James Michael Mastros (root@jennifer-unix.dyn.ml.org)
Sat, 27 Jun 1998 01:49:33 -0400


On Sat, Jun 27, 1998 at 07:35:51 AM +0200, Niels Kristian Bech Jensen wrote:
> On Fri, 26 Jun 1998, James Michael Mastros wrote:
>
> > On Fri, Jun 26, 1998 at 11:29:15 AM +0200, Niels Kristian Bech Jensen wrote:
> > [global makefile]
> > > HOSTCC =gcc
> > > -HOSTCFLAGS =-O2 -fomit-frame-pointer
> > > +HOSTCFLAGS =-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
> > [...]
> > > -CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
> > > +CFLAGS = $(HOSTCFLAGS)
> > Bad things here. HOSTCFLAGS is the proper flags for things that are going
> > to run on the machine that is compiling (build tools), CFLAGS is for things
> > that run on the machine that the kernel is for (the kernel proper). When
> > cross-compiling, one of these may be gcc and the other egcs.
> >
> Where's the conflict? I've only added ``-Wall -Wstrict-prototypes'' to
> $HOSTCFLAGS.

Because you defined CFLAGS based on HOSTCFLAGS. The two are unrelated.
Perhaps I'm building a kernel for a 386 on a Pentium.

I would have no problem with:
CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer

> > [arch/i386/Makefile]
> > > -
> > > -ifdef SMP
> > > -CFLAGS := $(CFLAGS) -D__SMP__
> > > endif
> > You just killed SMP as we know it.
>
> Defined twice. That's why I remove it.
Whops... Then why don't I see it twice when (accedently, in my case)
compiling a SMP kernel?

> > > diff -urN linux-2.1.106/arch/i386/boot/compressed/Makefile linux/arch/i386/boot/compressed/Makefile
> > [...]
> > > -ifdef SMP
> > > -CFLAGS := $(CFLAGS) -D__SMP__
> > > -endif
> > > -
> > Again, the way SMP is done now this is neccessary. I don't much like that
> > way, I think now is the time to make it a "real" config option. But that's
> > outside of the scope of this patch, and not done here anyway.
> >
> Why. __SMP__ isn't used in any of the files built by this Makefile. It's
> defined in the toplevel Makefile anyway.
Many makefiles, including arch/i386/Makefile explicitly set CFLAGS themselves.

-=- James Mastros

-- 
True mastery is knowing enough to bullshit the rest.
	-=- Me
This e-mail is licensed under the OP/L.  See www.opencontent.org.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu