[Mesa-dev] [PATCH 1/3] loader: rework xmlconfig dependency

Dieter Nützel Dieter at nuetzel-hh.de
Fri Aug 4 22:08:49 UTC 2017


For the series:

Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>

on RX580

with Clover, vdpau and Nine.

./autogen.sh --prefix=/usr/local --with-dri-drivers="" 
--with-gallium-drivers=r600,radeonsi,swrast --with-platforms=drm,x11 
--enable-nine --enable-texture-float --enable-opencl 
--with-vulkan-drivers=radeon

Dieter

Am 04.08.2017 20:18, schrieb Emil Velikov:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> Currently xmlconfig is conditionally used, only when --enable-dri is
> available.
> 
> As the library has moved to src/util and has wider wisebase, this guard
> is no longer correct. Strictly speaking - it wasn't since the
> introduction of xmlconfig into st/nine a while ago.
> 
> Unconditionally enable xmlconfig and drop the linking. As said before
> there's other users of the library, so depending on the configure
> options we will get multiple definitions of said symbols.
> 
> NOTE: To avoid breaking other combinations, this commit adds the
> xmlconfig link to the required places - throughout gallium and the DRI
> loaders.
> 
> Cc: Nicolai Hähnle <nhaehnle at gmail.com>
> Cc: Aaron Watry <awatry at gmail.com>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> Nicolai, here is an alternative solution.
> 
> I have a very slight inclination towards this one over your earlier
> patch. But either one should do, really.
> ---
>  src/egl/Makefile.am                           |  8 ++++++--
>  src/gallium/auxiliary/pipe-loader/Makefile.am |  6 ++++--
>  src/gallium/targets/opencl/Makefile.am        |  1 -
>  src/gbm/Makefile.am                           |  1 +
>  src/glx/Makefile.am                           |  4 +++-
>  src/loader/Makefile.am                        | 15 ++-------------
>  6 files changed, 16 insertions(+), 19 deletions(-)
> 
> diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
> index ecaf148aaec..bb8ec9745dd 100644
> --- a/src/egl/Makefile.am
> +++ b/src/egl/Makefile.am
> @@ -120,8 +120,12 @@ libEGL_common_la_SOURCES += \
>  	$(dri2_backend_FILES) \
>  	$(dri3_backend_FILES)
> 
> -libEGL_common_la_LIBADD += $(top_builddir)/src/loader/libloader.la
> -libEGL_common_la_LIBADD += $(DLOPEN_LIBS) $(LIBDRM_LIBS) $(CLOCK_LIB)
> +libEGL_common_la_LIBADD += \
> +	$(top_builddir)/src/loader/libloader.la \
> +	$(top_builddir)/src/util/libxmlconfig.la \
> +	$(DLOPEN_LIBS) \
> +	$(LIBDRM_LIBS) \
> +	$(CLOCK_LIB)
> 
>  GLVND_GEN_DEPS = generate/gen_egl_dispatch.py \
>  	generate/egl.xml generate/eglFunctionList.py generate/genCommon.py \
> diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am
> b/src/gallium/auxiliary/pipe-loader/Makefile.am
> index 4ebfc97e6d9..878159f2343 100644
> --- a/src/gallium/auxiliary/pipe-loader/Makefile.am
> +++ b/src/gallium/auxiliary/pipe-loader/Makefile.am
> @@ -41,9 +41,11 @@ libpipe_loader_dynamic_la_SOURCES += \
>  endif
> 
>  libpipe_loader_static_la_LIBADD = \
> -	$(top_builddir)/src/loader/libloader.la
> +	$(top_builddir)/src/loader/libloader.la \
> +	$(top_builddir)/src/util/libxmlconfig.la
> 
>  libpipe_loader_dynamic_la_LIBADD = \
> -	$(top_builddir)/src/loader/libloader.la
> +	$(top_builddir)/src/loader/libloader.la \
> +	$(top_builddir)/src/util/libxmlconfig.la
> 
>  EXTRA_DIST = SConscript
> diff --git a/src/gallium/targets/opencl/Makefile.am
> b/src/gallium/targets/opencl/Makefile.am
> index e88fa0fd382..c9d2be7afd0 100644
> --- a/src/gallium/targets/opencl/Makefile.am
> +++ b/src/gallium/targets/opencl/Makefile.am
> @@ -19,7 +19,6 @@ lib at OPENCL_LIBNAME@_la_LIBADD = \
>  	$(top_builddir)/src/gallium/state_trackers/clover/libclover.la \
>  	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
>  	$(top_builddir)/src/util/libmesautil.la \
> -	$(top_builddir)/src/util/libxmlconfig.la \
>  	$(EXPAT_LIBS) \
>  	$(LIBELF_LIBS) \
>  	$(DLOPEN_LIBS) \
> diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
> index de8396000b7..7a9a12f87a0 100644
> --- a/src/gbm/Makefile.am
> +++ b/src/gbm/Makefile.am
> @@ -26,6 +26,7 @@ libgbm_la_LDFLAGS = \
> 
>  libgbm_la_LIBADD = \
>  	$(top_builddir)/src/loader/libloader.la \
> +	$(top_builddir)/src/util/libxmlconfig.la \
>  	$(DLOPEN_LIBS)
> 
>  if HAVE_PLATFORM_WAYLAND
> diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
> index b306bcc08db..34600475d98 100644
> --- a/src/glx/Makefile.am
> +++ b/src/glx/Makefile.am
> @@ -97,7 +97,9 @@ libglx_la_SOURCES = \
>  	singlepix.c \
>  	vertarr.c
> 
> -libglx_la_LIBADD = $(top_builddir)/src/loader/libloader.la
> +libglx_la_LIBADD = \
> +	$(top_builddir)/src/loader/libloader.la \
> +	$(top_builddir)/src/util/libxmlconfig.la
> 
>  if HAVE_DRISW
>  libglx_la_SOURCES += \
> diff --git a/src/loader/Makefile.am b/src/loader/Makefile.am
> index 8b197f2995c..74ac6c51e77 100644
> --- a/src/loader/Makefile.am
> +++ b/src/loader/Makefile.am
> @@ -26,6 +26,8 @@ EXTRA_DIST = SConscript
>  noinst_LTLIBRARIES = libloader.la
> 
>  AM_CPPFLAGS = \
> +	-I$(top_builddir)/src/util/ \
> +	-DUSE_DRICONF \
>  	$(DEFINES) \
>  	-I$(top_srcdir)/include \
>  	-I$(top_srcdir)/src \
> @@ -37,19 +39,6 @@ libloader_la_CPPFLAGS = $(AM_CPPFLAGS)
>  libloader_la_SOURCES = $(LOADER_C_FILES)
>  libloader_la_LIBADD =
> 
> -if HAVE_DRICOMMON
> -libloader_la_CPPFLAGS += \
> -	-I$(top_builddir)/src/util/ \
> -	-I$(top_srcdir)/src/mesa/drivers/dri/common/ \
> -	-I$(top_srcdir)/src/mesa/ \
> -	-I$(top_srcdir)/src/mapi/ \
> -	-DUSE_DRICONF
> -
> -libloader_la_LIBADD += \
> -	$(top_builddir)/src/util/libxmlconfig.la
> -
> -endif
> -
>  if HAVE_LIBDRM
>  libloader_la_LIBADD += \
>  	$(LIBDRM_LIBS)


More information about the mesa-dev mailing list