Date: Tue, 21 Sep 2010 21:41:45 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r212979 - in head: gnu/lib/libobjc sys/boot/i386/boot2 sys/boot/pc98/boot2 Message-ID: <201009212141.o8LLfjHX007646@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Tue Sep 21 21:41:45 2010 New Revision: 212979 URL: http://svn.freebsd.org/changeset/base/212979 Log: 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) Modified: head/gnu/lib/libobjc/Makefile head/sys/boot/i386/boot2/Makefile head/sys/boot/pc98/boot2/Makefile Modified: head/gnu/lib/libobjc/Makefile ============================================================================== --- head/gnu/lib/libobjc/Makefile Tue Sep 21 21:07:46 2010 (r212978) +++ head/gnu/lib/libobjc/Makefile Tue Sep 21 21:41:45 2010 (r212979) @@ -16,9 +16,7 @@ SRCS= archive.c class.c encoding.c gc.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 Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Tue Sep 21 21:07:46 2010 (r212978) +++ head/sys/boot/i386/boot2/Makefile Tue Sep 21 21:41:45 2010 (r212979) @@ -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 Modified: head/sys/boot/pc98/boot2/Makefile ============================================================================== --- head/sys/boot/pc98/boot2/Makefile Tue Sep 21 21:07:46 2010 (r212978) +++ head/sys/boot/pc98/boot2/Makefile Tue Sep 21 21:41:45 2010 (r212979) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009212141.o8LLfjHX007646>