opencl: use versioned .so in mesa.icd
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>
Tue, 7 Jul 2015 10:05:04 +0000 (13:05 +0300)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 1 Aug 2015 16:14:02 +0000 (17:14 +0100)
We must have versioned library in mesa.icd, because ICD loader would
fail if the mesa-devel package wasn't installed.

Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Reported-by: Fabian Deutsch <fabian.deutsch@gmx.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73512
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Michel Dänzer <michel.daenzer@amd.com>
configure.ac
src/gallium/targets/opencl/Makefile.am
src/gallium/targets/opencl/mesa.icd [deleted file]
src/gallium/targets/opencl/mesa.icd.in [new file with mode: 0644]

index 2fc5a2592d02fae4fb399fa21ba77be9ae3ed966..248f618317200796efc29972c40924109f2effc1 100644 (file)
@@ -64,6 +64,8 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 dnl Set internal versions
 OSMESA_VERSION=8
 AC_SUBST([OSMESA_VERSION])
+OPENCL_VERSION=1
+AC_SUBST([OPENCL_VERSION])
 
 dnl Versions for external dependencies
 LIBDRM_REQUIRED=2.4.60
@@ -2336,6 +2338,7 @@ AC_CONFIG_FILES([Makefile
                src/gallium/targets/libgl-xlib/Makefile
                src/gallium/targets/omx/Makefile
                src/gallium/targets/opencl/Makefile
+               src/gallium/targets/opencl/mesa.icd
                src/gallium/targets/osmesa/Makefile
                src/gallium/targets/osmesa/osmesa.pc
                src/gallium/targets/pipe-loader/Makefile
index 441b438d339d97d24bb08c3e4285b47d7d5763f7..4ab706ef2acf425885de81aadbdf0ce4aca77c8d 100644 (file)
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = lib@OPENCL_LIBNAME@.la
 lib@OPENCL_LIBNAME@_la_LDFLAGS = \
        $(LLVM_LDFLAGS) \
        -no-undefined \
-       -version-number 1:0 \
+       -version-number @OPENCL_VERSION@:0 \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
diff --git a/src/gallium/targets/opencl/mesa.icd b/src/gallium/targets/opencl/mesa.icd
deleted file mode 100644 (file)
index 6a6a870..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libMesaOpenCL.so
diff --git a/src/gallium/targets/opencl/mesa.icd.in b/src/gallium/targets/opencl/mesa.icd.in
new file mode 100644 (file)
index 0000000..1b77b4e
--- /dev/null
@@ -0,0 +1 @@
+lib@OPENCL_LIBNAME@.so.@OPENCL_VERSION@