Don't use HOSTCFLAGS in BOOTCFLAGS

Segher Boessenkool segher at kernel.crashing.org
Tue May 29 15:12:21 EST 2007


>  #	To this end we need to define BOOTCC, etc, as the tools
> -#	needed to build the 32 bit image.  These are normally HOSTCC,
> +#	needed to build the 32 bit image.
>  #	but may be a third compiler if, for example, you are cross

You've broken this comment, you should pay for it now :-)

> -HOSTCC		:= gcc
> -BOOTCFLAGS	:= $(HOSTCFLAGS) -fno-builtin -fno-unit-at-a-time 
> -nostdinc -isystem \
> -		   $(shell $(CROSS32CC) -print-file-name=include) -fPIC
> +BOOTCFLAGS	:= -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
> +		   -fno-strict-aliasing -O2 -msoft-float -pipe \

-Os instead?

> +		   -fomit-frame-pointer -fno-builtin -fno-unit-at-a-time \

Why -fno-unit-at-a-time ?

> +		   -fPIC -nostdinc \
> +		   -isystem $(shell $(CROSS32CC) -print-file-name=include)

Also, is there any reason why you can't simply use $(CC) -m32 with
the kernel $(CFLAGS) ?


Segher




More information about the Linuxppc-dev mailing list