Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Nov 2014 12:07:05 +0000 (UTC)
From:      Takahashi Yoshihiro <nyan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r274042 - stable/10/sys/boot/pc98/boot2
Message-ID:  <201411031207.sA3C75uY062881@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nyan
Date: Mon Nov  3 12:07:04 2014
New Revision: 274042
URL: https://svnweb.freebsd.org/changeset/base/274042

Log:
  MFC: r268474 and r268476 (by imp)
    - Merge the clang support from i386.
    - Compile boot2 with clang on pc98.
  
  MFC: r272250 (by nyan)
    - Reduce diffs against i386.

Modified:
  stable/10/sys/boot/pc98/boot2/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/pc98/boot2/Makefile
==============================================================================
--- stable/10/sys/boot/pc98/boot2/Makefile	Mon Nov  3 11:58:32 2014	(r274041)
+++ stable/10/sys/boot/pc98/boot2/Makefile	Mon Nov  3 12:07:04 2014	(r274042)
@@ -2,10 +2,6 @@
 
 .include <bsd.own.mk>
 
-# XXX: clang can compile the boot code just fine, but boot2 gets too big
-CC:=		gcc
-COMPILER_TYPE:=	gcc
-
 FILES=		boot boot1 boot2
 
 NM?=		nm
@@ -24,10 +20,7 @@ BOOT2_UFS?=	UFS1_AND_UFS2
 #BOOT2_UFS?=	UFS1_ONLY
 
 CFLAGS=	-Os \
-	-fno-guess-branch-probability \
 	-fomit-frame-pointer \
-	-fno-unit-at-a-time \
-	-mno-align-long-strings \
 	-mrtd \
 	-mregparm=3 \
 	-D${BOOT2_UFS} \
@@ -42,9 +35,13 @@ CFLAGS=	-Os \
 	-Wall -Waggregate-return -Wbad-function-cast -Wcast-align \
 	-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
 	-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
-	-Winline
+	-Winline \
+	${CLANG_OPT_SMALL}
 
-CFLAGS.gcc+=	--param max-inline-insns-single=100
+CFLAGS.gcc+=	-fno-guess-branch-probability \
+		-fno-unit-at-a-time \
+		-mno-align-long-strings \
+		--param max-inline-insns-single=100
 
 # Set machine type to PC98_SYSTEM_PARAMETER
 #CFLAGS+=	-DSET_MACHINE_TYPE
@@ -110,3 +107,7 @@ boot2.h: boot1.out
 	    REL1=`printf "%d" ${REL1}` > ${.TARGET}
 
 .include <bsd.prog.mk>
+
+# XXX: clang integrated-as doesn't grok .codeNN directives yet
+CFLAGS.boot1.S=		${CLANG_NO_IAS}
+CFLAGS+=		${CFLAGS.${.IMPSRC:T}}



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