Dave Yeo wrote: > On 01/24/16 12:29 PM, Erik de Castro Lopo wrote:> Dave Yeo wrote: > > > >> After this the build dies with, > >> util.c: In function 'benchmark_function': > >> util.c:124:17: error: 'CLOCK_PROCESS_CPUTIME_ID' undeclared (first use > >> in this function) > >> clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &start) ; > >> > >> Would using gettimeofday() be accurate enough? > > > > AS a fall back yes, but not as replacement on platforms with > > clock_gettime(). > > > >> Perhaps simpler just to > >> disable the microbench test on OS/2 as gettimeofday() would require a > >> configure test and OS/2 is a minor platform? > > > > > > I would accept a patch that disables the microsbenchmark on OS/2 I would > > also accept one that uses gettimeofday() when clock_gettime() is not > > available.
I'm happy with the first patch (making AVX and AVX2 a configure option) and I've committed and pushed it to the repo. The configure stuff in the second seems overly complex. Is something like this: AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) if test x$have_clock_gettime = xyes; then AC_DEFINE(HAVE_CLOCK_GETTIME) fi not sufficient? You can either test this and provide an updated patch or I can fix it here. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/ _______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev