summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2014-11-03 12:07:04 +0000
committernyan <nyan@FreeBSD.org>2014-11-03 12:07:04 +0000
commit8dd879bfaf9ef726ec0754bd1c4368f02df4f798 (patch)
treeb19b1e1c02235aa2ccffe45ea8a21cbebc926e94 /sys/boot
parent2b458872842b4a2156ff9d98a29e001a590ca2d3 (diff)
downloadFreeBSD-src-8dd879bfaf9ef726ec0754bd1c4368f02df4f798.zip
FreeBSD-src-8dd879bfaf9ef726ec0754bd1c4368f02df4f798.tar.gz
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.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/pc98/boot2/Makefile19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile
index 88076a8..f76b805 100644
--- a/sys/boot/pc98/boot2/Makefile
+++ b/sys/boot/pc98/boot2/Makefile
@@ -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}}
OpenPOWER on IntegriCloud