Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2010 15:13:36 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r209107 - in head: contrib/llvm/tools/clang/lib/Basic lib/clang
Message-ID:  <201006121513.o5CFDaMW034964@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sat Jun 12 15:13:36 2010
New Revision: 209107
URL: http://svn.freebsd.org/changeset/base/209107

Log:
  Do the branding right this time.
  
  I've looked at other places in the source tree where CLANG_VENDOR is
  used and I suspect it might not be safe to use newlines here.
  CLANG_VENDOR should just be defined to "FreeBSD ", just like the latest
  Clang preview in OS X uses "Apple ". Properly use SVN_REVISION to define
  it to the imported revision of Clang. I do want to have a date in there,
  so slightly modify the code to support CLANG_VENDOR_SUFFIX.

Modified:
  head/contrib/llvm/tools/clang/lib/Basic/Version.cpp
  head/lib/clang/clang.build.mk

Modified: head/contrib/llvm/tools/clang/lib/Basic/Version.cpp
==============================================================================
--- head/contrib/llvm/tools/clang/lib/Basic/Version.cpp	Sat Jun 12 13:22:39 2010	(r209106)
+++ head/contrib/llvm/tools/clang/lib/Basic/Version.cpp	Sat Jun 12 15:13:36 2010	(r209107)
@@ -70,6 +70,9 @@ std::string getClangFullVersion() {
 #endif
   OS << "clang version " CLANG_VERSION_STRING " ("
      << getClangFullRepositoryVersion() << ')';
+#ifdef CLANG_VENDOR_SUFFIX
+  OS << CLANG_VENDOR_SUFFIX;
+#endif
   return OS.str();
 }
 

Modified: head/lib/clang/clang.build.mk
==============================================================================
--- head/lib/clang/clang.build.mk	Sat Jun 12 13:22:39 2010	(r209106)
+++ head/lib/clang/clang.build.mk	Sat Jun 12 15:13:36 2010	(r209107)
@@ -11,7 +11,8 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG
 TARGET_ARCH?=	${MACHINE_ARCH}
 # XXX: 8.0, to keep __FreeBSD_cc_version happy
 CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\" \
-	-DCLANG_VENDOR=\"clang\ r104832\ 20100610\ [FreeBSD]\\n\"
+	-DCLANG_VENDOR=\"FreeBSD\ \" -DSVN_REVISION=\"104832\" \
+	-DCLANG_VENDOR_SUFFIX=\"\ 20100612\"
 
 .PATH:	${LLVM_SRCS}/${SRCDIR}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006121513.o5CFDaMW034964>