Date: Tue, 05 Oct 2010 01:39:31 +0400 From: Anonymous <swell.k@gmail.com> To: Dimitry Andric <dim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212979 - in head: gnu/lib/libobjc sys/boot/i386/boot2 sys/boot/pc98/boot2 Message-ID: <8639sl7i3w.fsf@gmail.com> References: <201009212141.o8LLfjHX007646@svn.freebsd.org> <86mxqx7q9o.fsf@gmail.com> <4CA64BF1.9080401@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Dimitry Andric <dim@FreeBSD.org> writes: > The particular case of libobjc is special, because it is the only > Makefile that both modifies CC, and takes the default CFLAGS from > make.conf. The only other cases where we *must* compile with gcc for > now, are boot2 for i386 and pc98, but these set their CFLAGS to a > hardcoded value. > > A solution could be to always use hardcoded CFLAGS for libobjc. > Otherwise, we could check for a GCC_CFLAGS in libobjc's Makefile, and > substitute these for the regular CFLAGS, iff clang is used to build > world. Does that sound acceptable? What are GCC_CFLAGS and "regular CFLAGS"? And note, you haven't explained why CLANG_FLAGS is bad. I've compiled the world with below src.conf a few times without issues >> CC = clang ${CLANG_FLAGS} >> CLANG_FLAGS = -Qunused-arguments # too much noise for `make -s' build No need to document the variable, it's temporary as the workaround. %% diff --git a/gnu/lib/libobjc/Makefile b/gnu/lib/libobjc/Makefile index 80d0240..b61bf91 100644 --- a/gnu/lib/libobjc/Makefile +++ b/gnu/lib/libobjc/Makefile @@ -16,6 +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 +CLANG_FLAGS= # clear clang-specific user cflags CC:=${CC:C/^(.*\/)?clang$/gcc/1} INCS= encoding.h hash.h objc-api.h objc-decls.h objc-list.h objc.h runtime.h \ diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile index b91a43b..ed5727e 100644 --- a/sys/boot/i386/boot2/Makefile +++ b/sys/boot/i386/boot2/Makefile @@ -3,6 +3,7 @@ .include <bsd.own.mk> # XXX: clang can compile the boot code just fine, but boot2 gets too big +CLANG_FLAGS= # clear clang-specific user cflags 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 dfd8607..e605c8a 100644 --- a/sys/boot/pc98/boot2/Makefile +++ b/sys/boot/pc98/boot2/Makefile @@ -3,6 +3,7 @@ .include <bsd.own.mk> # XXX: clang can compile the boot code just fine, but boot2 gets too big +CLANG_FLAGS= # clear clang-specific user cflags 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?8639sl7i3w.fsf>