Date: Mon, 13 May 2013 20:14:59 +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: r250616 - head/lib/clang/libllvmsupport Message-ID: <201305132014.r4DKExFq072077@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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}}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305132014.r4DKExFq072077>