summaryrefslogtreecommitdiffstats
path: root/lib/clang/libllvmsupport
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-05-13 20:14:58 +0000
committerdim <dim@FreeBSD.org>2013-05-13 20:14:58 +0000
commite951d35193effa159ca747dfd9e429804818ddd1 (patch)
treef2bedac4e2f1b54acc6650b896a7defa9ab7fe29 /lib/clang/libllvmsupport
parentdd151b8a5cb00f64edfe5d5ee5785a4b15d13014 (diff)
downloadFreeBSD-src-e951d35193effa159ca747dfd9e429804818ddd1.zip
FreeBSD-src-e951d35193effa159ca747dfd9e429804818ddd1.tar.gz
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.
Diffstat (limited to 'lib/clang/libllvmsupport')
-rw-r--r--lib/clang/libllvmsupport/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/clang/libllvmsupport/Makefile b/lib/clang/libllvmsupport/Makefile
index 1a2dd20..6dff622 100644
--- a/lib/clang/libllvmsupport/Makefile
+++ b/lib/clang/libllvmsupport/Makefile
@@ -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}}
OpenPOWER on IntegriCloud