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

James Michael Mastros (root@jennifer-unix.dyn.ml.org)
Fri, 26 Jun 1998 20:53:09 -0400


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.

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

[arch/i386/Makefile]
> -
> -ifdef SMP
> -CFLAGS := $(CFLAGS) -D__SMP__
> endif
You just killed SMP as we know 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.

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

-=- James Mastros

-- 
True mastery is knowing enough to bullshit the rest.
	-=- Me

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