[Intel-gfx] [igt-dev] [PATCH i-g-t 2/2] automake: Make librt mandatory

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 1 10:44:07 UTC 2019


Quoting Tvrtko Ursulin (2019-03-01 10:32:02)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> librt is required by libintel_tools so express it as mandatory in autoconf
> and also drop explicit mentions from Makefile.am.
> 
> This also fixes a build warning of:
> 
>   tests/Makefile.am:134: warning: variable 'pm_rc6_residency_LDADD' is defined but no program or
>   tests/Makefile.am:134: library has 'pm_rc6_residency' as canonical name (possible typo)
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  benchmarks/Makefile.am | 2 +-
>  configure.ac           | 4 ++--
>  tests/Makefile.am      | 5 +----
>  3 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am
> index c166d636d507..1f05adf31527 100644
> --- a/benchmarks/Makefile.am
> +++ b/benchmarks/Makefile.am
> @@ -24,5 +24,5 @@ gem_exec_tracer_la_LIBADD = -ldl
>  gem_latency_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
>  gem_latency_LDADD = $(LDADD) -lpthread
>  gem_syslatency_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
> -gem_syslatency_LDADD = $(LDADD) -lpthread -lrt
> +gem_syslatency_LDADD = $(LDADD) -lpthread

Ok, LDADD here pulls in libintel_tools.la

>  gem_wsim_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la -lpthread
> diff --git a/configure.ac b/configure.ac
> index e22703d03198..a3f541a2f888 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -58,12 +58,12 @@ AX_GCC_FUNC_ATTRIBUTE([constructor])
>  dnl Check for POSIX timers
>  AC_CHECK_FUNCS(timer_create, [], [
>         AC_CHECK_LIB(rt, timer_create, [
> -               AC_DEFINE(HAVE_TIMER_CREATE, 1)
>                 TIMER_LIBS="-lrt"
>                 ], [
>                 AC_CHECK_LIB(pthread, timer_create, [
> -                       AC_DEFINE(HAVE_TIMER_CREATE, 1)
>                         TIMER_LIBS="-lpthread"
> +               ], [
> +               AC_MSG_ERROR([Failed to find library containing timer_create.])
>                 ])
>         ])
>  ])
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index c5dd210c7163..289249b42b97 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -128,10 +128,7 @@ gem_userptr_blits_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
>  gem_userptr_blits_LDADD = $(LDADD) -lpthread
>  perf_pmu_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la
>  
> -gem_eio_LDADD = $(LDADD) -lrt
> -gem_wait_LDADD = $(LDADD) -lrt
> -kms_flip_LDADD = $(LDADD) -lrt -lpthread
> -pm_rc6_residency_LDADD = $(LDADD) -lrt
> +kms_flip_LDADD = $(LDADD) -lpthread

Ok, only those 4.

The other one in overlay doesn't pull in libintel_tools.la, but we
should probably use $(TIMER_LIBS) there instead.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list