summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-09-21 21:41:45 +0000
committerdim <dim@FreeBSD.org>2010-09-21 21:41:45 +0000
commit0f23475721730c555ad3bcf2a1e2095eed4f0945 (patch)
treee2e944fa953c22961e1dbb57fdc7b716b3c031f3
parentd776b5f9560dfcb767fc4762f6a5d31a5254e378 (diff)
downloadFreeBSD-src-0f23475721730c555ad3bcf2a1e2095eed4f0945.zip
FreeBSD-src-0f23475721730c555ad3bcf2a1e2095eed4f0945.tar.gz
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)
-rw-r--r--gnu/lib/libobjc/Makefile4
-rw-r--r--sys/boot/i386/boot2/Makefile4
-rw-r--r--sys/boot/pc98/boot2/Makefile4
3 files changed, 3 insertions, 9 deletions
diff --git a/gnu/lib/libobjc/Makefile b/gnu/lib/libobjc/Makefile
index 3513103..80d0240 100644
--- a/gnu/lib/libobjc/Makefile
+++ b/gnu/lib/libobjc/Makefile
@@ -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
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile
index 74aab82..b91a43b 100644
--- a/sys/boot/i386/boot2/Makefile
+++ b/sys/boot/i386/boot2/Makefile
@@ -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
diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile
index 5f7355f..dfd8607 100644
--- a/sys/boot/pc98/boot2/Makefile
+++ b/sys/boot/pc98/boot2/Makefile
@@ -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
OpenPOWER on IntegriCloud