Clang r130700 can now compile sys/boot/i386/boot2 with room to spare.

This commit is contained in:
Dimitry Andric 2011-05-02 21:13:08 +00:00
parent 565a812648
commit 3cd306b555

View File

@ -2,9 +2,6 @@
.include <bsd.own.mk>
# XXX: clang can compile the boot code just fine, but boot2 gets too big
CC:=${CC:C/^(.*\/)?clang$/gcc/1}
FILES= boot boot1 boot2
NM?= nm
@ -45,6 +42,12 @@ CFLAGS= -Os \
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
-Winline --param max-inline-insns-single=100
.if ${CC:T:Mclang} == "clang"
CFLAGS+= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3
# XXX: clang integrated-as doesn't grok .codeNN directives yet
CFLAGS+= ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/}
.endif
LDFLAGS=-static -N --gc-sections
# Pick up ../Makefile.inc early.