svn commit: r212979 - in head: gnu/lib/libobjc sys/boot/i386/boot2 sys/boot/pc98/boot2

Anonymous swell.k at gmail.com
Fri Oct 1 17:54:42 UTC 2010


Dimitry Andric <dim at FreeBSD.org> writes:

> Author: dim
> Date: Tue Sep 21 21:41:45 2010
> New Revision: 212979
> URL: http://svn.freebsd.org/changeset/base/212979
[...]
> 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}

How about clearing some user-defined variable together with the substitution

  CLANG_FLAGS = # set to empty value
  CC := ${CC:C/^(.*\/)?clang$/gcc/1}

in which user can store clang-specific flags (via src.conf), e.g.

  CC = clang ${CLANG_FLAGS}
  CLANG_FLAGS = -Qunused-arguments # too much noise for `make -s' build

or

  CPUTYPE ?= native
  CLANG_FLAGS = -mno-sse4 # don't feed as(1) unknown opcodes

Otherwise, substitution occurs too late and gcc(1) chokes on unknown
options.


More information about the svn-src-head mailing list