From fec075383edb435288aa916b0834180558fb4313 Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 17 Nov 2012 22:40:18 +0000 Subject: [PATCH] MFC r242706: Put in a band-aid to get the pc98 bootstraps building, now clang is the default compiler. This has two parts: - Make sys/boot/pc98/boot2 always build with gcc for now, until we can figure out a way to shrink it enough when building with clang. - Since sys/boot/p98/cdboot uses .code16 directives, which are not yet supported by clang's integrated assembler, use -no-integrated-as, similar to sys/boot/i386/cdboot. Reviewed by: nyan MFC r242874: Work around pc98 tinderbox failures in sys/boot/pc98, by making sure a cross gcc gets built during the cross-tools stage. git-svn-id: svn://svn.freebsd.org/base/stable/9@243190 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- Makefile.inc1 | 4 ++-- sys/boot/pc98/boot2/Makefile | 2 +- sys/boot/pc98/cdboot/Makefile | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 70747c531..170ed0f5d 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1123,7 +1123,7 @@ _aicasm= sys/modules/aic7xxx/aicasm _share= share/syscons/scrnmaps .endif -.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" +.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" || ${TARGET} == "pc98") _gcc_tools= gnu/usr.bin/cc/cc_tools .endif @@ -1190,7 +1190,7 @@ _clang= usr.bin/clang _clang_libs= lib/clang .endif -.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" +.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" || ${TARGET} == "pc98") _cc= gnu/usr.bin/cc .endif diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile index 18bf251e5..00a28dea2 100644 --- a/sys/boot/pc98/boot2/Makefile +++ b/sys/boot/pc98/boot2/Makefile @@ -3,7 +3,7 @@ .include # XXX: clang can compile the boot code just fine, but boot2 gets too big -CC:=${CC:C/^(.*\/)?clang$/gcc/1} +CC:= gcc FILES= boot boot1 boot2 diff --git a/sys/boot/pc98/cdboot/Makefile b/sys/boot/pc98/cdboot/Makefile index eec1328fb..bcce0efe1 100644 --- a/sys/boot/pc98/cdboot/Makefile +++ b/sys/boot/pc98/cdboot/Makefile @@ -13,3 +13,7 @@ ORG= 0x0000 LDFLAGS=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.cdboot.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} -- 2.45.0