From c05f0da034bab79c7a07c200bdd56e0b4b3b9de7 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 31 Aug 2010 17:33:29 +0000 Subject: [PATCH] Use a more robust way to substitute gcc for clang, when compiling gnu/lib/libobjc and sys/boot/i386/boot2, so it also works when using absolute paths and/or options, as in CC="/absolute/path/clang -foo". Approved by: rpaulo (mentor) --- gnu/lib/libobjc/Makefile | 4 +++- sys/boot/i386/boot2/Makefile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gnu/lib/libobjc/Makefile b/gnu/lib/libobjc/Makefile index 3dc49d842a60..3513103f2d7c 100644 --- a/gnu/lib/libobjc/Makefile +++ b/gnu/lib/libobjc/Makefile @@ -16,7 +16,9 @@ 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 -CC:=${CC:C/^cc|^clang/gcc/} +.if ${CC:T:Mclang} == "clang" +CC=gcc +.endif 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 bff4647668a4..74aab82de43b 100644 --- a/sys/boot/i386/boot2/Makefile +++ b/sys/boot/i386/boot2/Makefile @@ -3,7 +3,9 @@ .include # XXX: clang can compile the boot code just fine, but boot2 gets too big -CC:=${CC:C/^cc|^clang/gcc/} +.if ${CC:T:Mclang} == "clang" +CC=gcc +.endif FILES= boot boot1 boot2