summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/boot2/Makefile
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-05-02 21:13:08 +0000
committerdim <dim@FreeBSD.org>2011-05-02 21:13:08 +0000
commit20dc4d4d1ed6a0fe4d0c3b16242f7547cda37cdd (patch)
tree1361e1fa6ee0c4b16ea2c22227f55e79b65e71ee /sys/boot/i386/boot2/Makefile
parentd31a4287cfb337183fa58401ba2e16780f7f2db4 (diff)
downloadFreeBSD-src-20dc4d4d1ed6a0fe4d0c3b16242f7547cda37cdd.zip
FreeBSD-src-20dc4d4d1ed6a0fe4d0c3b16242f7547cda37cdd.tar.gz
Clang r130700 can now compile sys/boot/i386/boot2 with room to spare.
Diffstat (limited to 'sys/boot/i386/boot2/Makefile')
-rw-r--r--sys/boot/i386/boot2/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile
index 64d49ec..6dc27d2 100644
--- a/sys/boot/i386/boot2/Makefile
+++ b/sys/boot/i386/boot2/Makefile
@@ -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.
OpenPOWER on IntegriCloud