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

Niels Kristian Bech Jensen (nkbj@image.dk)
Sat, 27 Jun 1998 07:35:51 +0200 (CEST)


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.

> [...]
> > -ifdef SMP
> > -
> > .S.s:
> > $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -E -o $*.s $<
> > .S.o:
> > $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c -o $*.o $<
> > -
> > -else
> > -
> > -.S.s:
> > - $(CC) -D__ASSEMBLY__ -traditional -E -o $*.s $<
> > -.S.o:
> > - $(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $<
> > -
> > -endif
> [...]
> Do you know why $(AFLAGS) was only used in the SMP case originaly. No?
> Then you shouldn't be touching this stuff.
>
OK

>
> [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.

>
> > diff -urN linux-2.1.106/arch/i386/boot/Makefile linux/arch/i386/boot/Makefile
> [...]
> > -ifdef SMP
> > -HOSTCFLAGS := $(HOSTCFLAGS) -D__SMP__
> > -endif
> This, OTOH, probably was wrong. However, err on the side of saftey and
> leave it in.
>
> > 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.

> (Several more places where the SMP case is screwed, and where HOSTCC[FLAGS]
> and CC[FLAGS] were inverted.)
>

--
Med venlig hilsen / Best regards
                                                          nkbj@image.dk
Niels Kristian Bech Jensen                   http://www.image.dk/~nkbj/

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