From 522d68a17fc6c27d141c82080b114388021bd3a9 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 10 Jul 2014 00:15:38 +0000 Subject: [PATCH] Merge the clang support from i386. Don't move to clang yet. --- sys/boot/pc98/boot2/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile index 00037cb60ee7..4f7284978998 100644 --- a/sys/boot/pc98/boot2/Makefile +++ b/sys/boot/pc98/boot2/Makefile @@ -26,10 +26,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} \ @@ -46,7 +43,10 @@ CFLAGS= -Os \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline -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 @@ -54,6 +54,8 @@ CFLAGS.gcc+= --param max-inline-insns-single=100 # Initialize the bi_bios_geom using the BIOS geometry #CFLAGS+= -DGET_BIOSGEOM +CFLAGS.clang+=${CLANG_OPT_SMALL} + LD_FLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. @@ -112,3 +114,6 @@ boot2.h: boot1.out REL1=`printf "%d" ${REL1}` > ${.TARGET} .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS+= ${CLANG_NO_IAS}