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:
parent
bed6f18493
commit
d205253515
@ -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
|
selector.c sendmsg.c thr.c thr-objc.c exception.c
|
||||||
|
|
||||||
# XXX: clang cannot compile libobjc yet
|
# XXX: clang cannot compile libobjc yet
|
||||||
.if ${CC:T:Mclang} == "clang"
|
CC:=${CC:C/^(.*\/)?clang$/gcc/1}
|
||||||
CC=gcc
|
|
||||||
.endif
|
|
||||||
|
|
||||||
INCS= encoding.h hash.h objc-api.h objc-decls.h objc-list.h objc.h runtime.h \
|
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
|
sarray.h thr.h typedstream.h NXConstStr.h Object.h Protocol.h
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
.include <bsd.own.mk>
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
# XXX: clang can compile the boot code just fine, but boot2 gets too big
|
# XXX: clang can compile the boot code just fine, but boot2 gets too big
|
||||||
.if ${CC:T:Mclang} == "clang"
|
CC:=${CC:C/^(.*\/)?clang$/gcc/1}
|
||||||
CC=gcc
|
|
||||||
.endif
|
|
||||||
|
|
||||||
FILES= boot boot1 boot2
|
FILES= boot boot1 boot2
|
||||||
|
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
.include <bsd.own.mk>
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
# XXX: clang can compile the boot code just fine, but boot2 gets too big
|
# XXX: clang can compile the boot code just fine, but boot2 gets too big
|
||||||
.if ${CC:T:Mclang} == "clang"
|
CC:=${CC:C/^(.*\/)?clang$/gcc/1}
|
||||||
CC=gcc
|
|
||||||
.endif
|
|
||||||
|
|
||||||
FILES= boot boot1 boot2
|
FILES= boot boot1 boot2
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user