Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 May 2011 21:13:08 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221348 - head/sys/boot/i386/boot2
Message-ID:  <201105022113.p42LD8TH055002@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Mon May  2 21:13:08 2011
New Revision: 221348
URL: http://svn.freebsd.org/changeset/base/221348

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

Modified:
  head/sys/boot/i386/boot2/Makefile

Modified: head/sys/boot/i386/boot2/Makefile
==============================================================================
--- head/sys/boot/i386/boot2/Makefile	Mon May  2 21:10:13 2011	(r221347)
+++ head/sys/boot/i386/boot2/Makefile	Mon May  2 21:13:08 2011	(r221348)
@@ -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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105022113.p42LD8TH055002>