svn commit: r250616 - head/lib/clang/libllvmsupport

Dimitry Andric dim at FreeBSD.org
Mon May 13 20:14:59 UTC 2013


Author: dim
Date: Mon May 13 20:14:58 2013
New Revision: 250616
URL: http://svnweb.freebsd.org/changeset/base/250616

Log:
  Use an ugly hack to get around bootstrapping problems when building
  clang on head between r239347 and r245428.
  
  The former revision introduced CLOCK_PROCESS_CPUTIME_ID as a clock id
  for the clock_gettime() function and friends, but it was only added in
  <sys/time.h>, not in <time.h>.  Any program including <time.h> would
  therefore not be able to use CLOCK_PROCESS_CPUTIME_ID, even though the
  value of _POSIX_CPUTIME indicates its existence.  The latter revision
  synchronized the defines again.
  
  Work around this problem by defining the id on the command line for the
  particular .cpp file that needs it.  If the id ever changes value, this
  hack will need to be updated.

Modified:
  head/lib/clang/libllvmsupport/Makefile

Modified: head/lib/clang/libllvmsupport/Makefile
==============================================================================
--- head/lib/clang/libllvmsupport/Makefile	Mon May 13 20:03:59 2013	(r250615)
+++ head/lib/clang/libllvmsupport/Makefile	Mon May 13 20:14:58 2013	(r250616)
@@ -93,3 +93,8 @@ SRCS+=	DataExtractor.cpp \
 .endif
 
 .include "../clang.lib.mk"
+
+# Ugly hack to work around CLOCK_PROCESS_CPUTIME_ID not being properly defined
+# between r239347 and r245428.
+CXXFLAGS.Process.cpp=	-DCLOCK_PROCESS_CPUTIME_ID=15
+CXXFLAGS+=		${CXXFLAGS.${.IMPSRC:T}}


More information about the svn-src-all mailing list