When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2

and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile
flags are sometimes passed via this variable, for example during the
build32 stage on amd64.  This caused the 32-bit libobjc build on amd64
to fail.

Instead, only replace the first instance of clang (if any, including
optional path) with gcc, and leave the arguments alone.

Approved-by:	rpaulo (mentor)
This commit is contained in:
Dimitry Andric 2010-09-21 21:41:45 +00:00
parent bed6f18493
commit d205253515
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212979
3 changed files with 3 additions and 9 deletions

View File

@ -16,9 +16,7 @@ SRCS= archive.c class.c encoding.c gc.c hash.c init.c linking.m misc.c \
selector.c sendmsg.c thr.c thr-objc.c exception.c
# XXX: clang cannot compile libobjc yet
.if ${CC:T:Mclang} == "clang"
CC=gcc
.endif
CC:=${CC:C/^(.*\/)?clang$/gcc/1}
INCS= encoding.h hash.h objc-api.h objc-decls.h objc-list.h objc.h runtime.h \
sarray.h thr.h typedstream.h NXConstStr.h Object.h Protocol.h

View File

@ -3,9 +3,7 @@
.include <bsd.own.mk>
# XXX: clang can compile the boot code just fine, but boot2 gets too big
.if ${CC:T:Mclang} == "clang"
CC=gcc
.endif
CC:=${CC:C/^(.*\/)?clang$/gcc/1}
FILES= boot boot1 boot2

View File

@ -3,9 +3,7 @@
.include <bsd.own.mk>
# XXX: clang can compile the boot code just fine, but boot2 gets too big
.if ${CC:T:Mclang} == "clang"
CC=gcc
.endif
CC:=${CC:C/^(.*\/)?clang$/gcc/1}
FILES= boot boot1 boot2