1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

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.
This commit is contained in:
Dimitry Andric 2013-05-13 20:14:58 +00:00
parent 634cf355b0
commit a420df3c8a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=250616

View File

@ -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}}