Ozkan Sezer
2016-Jan-23 12:22 UTC
[flac-dev] microbench (benchmark_residual) requires -lrt for clock_gettime()
On my setup with glibc-2.8, benchmark_residual linkage fails with undefines references to clock_gettime(). Adding -lrt fixes that. The following is a small patch for it. Regards. -- O.S. diff --git a/configure.ac b/configure.ac index 993ac33..392485e 100644 --- a/configure.ac +++ b/configure.ac @@ -437,6 +437,11 @@ if test x$enable_stack_smash_protection = "xyes" ; then XIPH_GXX_STACK_PROTECTOR fi +if test "x$sys_linux" = xtrue ; then + LIB_CLOCK_GETTIME=-lrt + fi +AC_SUBST(LIB_CLOCK_GETTIME) + AC_CONFIG_FILES([ \ Makefile \ src/Makefile \ diff --git a/microbench/Makefile.am b/microbench/Makefile.am index e00097d..452e748 100644 --- a/microbench/Makefile.am +++ b/microbench/Makefile.am @@ -36,3 +36,5 @@ noinst_HEADERS = util.h noinst_PROGRAMS = benchmark_residual benchmark_residual_SOURCES = benchmark_residual.c util.c + +benchmark_residual_LDADD = @LIB_CLOCK_GETTIME@
Erik de Castro Lopo
2016-Jan-23 21:33 UTC
[flac-dev] microbench (benchmark_residual) requires -lrt for clock_gettime()
Ozkan Sezer wrote:> On my setup with glibc-2.8, benchmark_residual linkage fails with > undefines references to clock_gettime(). Adding -lrt fixes that. > The following is a small patch for it.Applied. Thanks. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/