gallium/targets: resolve undefined reference to pipe_loader_sw_probe_dri
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 24 Feb 2014 14:20:36 +0000 (14:20 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 24 Feb 2014 14:59:34 +0000 (14:59 +0000)
With the introduction of the pipe_loader_sw_probe_dri helper we
require the sw/dri winsys during linking stage despite it being
unused by any of the targets. This will cause a minor increase
in the resulting library which will be cleaned up via linker
options with upcoming patches.

v2: Link with libswdri.la only when available.

Reported-and-tested-by: Tom Stellard <thomas.stellard@amd.com> (v1)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/targets/gbm/Makefile.am
src/gallium/targets/opencl/Makefile.am
src/gallium/targets/xa/Makefile.am

index ecbb9ad2d22e6c8e9b6a17ff181a30b1aa0b9976..d5255e94b8635227daa3ba1814256de422882bb3 100644 (file)
@@ -50,6 +50,11 @@ gbm_gallium_drm_la_LIBADD = \
        $(LIBDRM_LIBS) \
        -lm
 
+if HAVE_DRI
+gbm_gallium_drm_la_LIBADD += \
+       $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
+endif
+
 if NEED_PIPE_LOADER_XLIB
 gbm_gallium_drm_la_LIBADD += \
        $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
index e82889e0f46045da6b1b47d908244747167ae78c..7b32a099b29403f17aa9bd4746b8776e5b9272cc 100644 (file)
@@ -28,6 +28,11 @@ lib@OPENCL_LIBNAME@_la_LIBADD = \
        -lclangBasic \
        $(LLVM_LIBS)
 
+if HAVE_DRI
+lib@OPENCL_LIBNAME@_la_LIBADD += \
+       $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
+endif
+
 if NEED_PIPE_LOADER_XLIB
 lib@OPENCL_LIBNAME@_la_LIBADD += \
        $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
index 7ab57ffec56606369be64d241894a69327dea52f..1cdb21b38b073ef952e35296f35eda08c601e941 100644 (file)
@@ -48,6 +48,11 @@ libxatracker_la_LIBADD = \
        $(LIBUDEV_LIBS) \
        $(LIBDRM_LIBS)
 
+if HAVE_DRI
+libxatracker_la_LIBADD += \
+       $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
+endif
+
 if NEED_PIPE_LOADER_XLIB
 libxatracker_la_LIBADD += \
        $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \