Re: Don't use HOSTCFLAGS in BOOTCFLAGS

From
David Gibson <hidden>
Date
2007-05-29 05:34:45
Reply to
Segher Boessenkool, 2007-05-29
On Tue, May 29, 2007 at 07:12:21AM +0200, Segher Boessenkool wrote:
quoted
 #	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 :-)
Eck, yes.
quoted
-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?
Hrm, yeah, that's probably a good idea.
quoted
+		   -fomit-frame-pointer -fno-builtin -fno-unit-at-a-time \
Why -fno-unit-at-a-time ?
Crap.  Because I forgot that the patch stack I was working on had my
patch which adds -fno-unit-at-a-time (I often use that when debugging,
because it makes the disassembly more comprehensible).  In fact
without that patch, this one doesn't apply.
quoted
+		   -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) ?
I did think about that.  But the kernel CFLAGS does includes
-ffixed-r2 and -Iarch/powerpc which I don't think we want here.

Revised version coming shortly.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Thread (5 messages) 5 messages, 2 authors, last reply 2007-05-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help