[Mesa-dev] [PATCH v4] opencl: improved auto-gen .icd

Igor Gnatenko i.gnatenko.brain at gmail.com
Mon Jan 13 23:21:23 PST 2014


>From 8c47b170c1f6152e337bf333662a3e561853a171 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain at gmail.com>
Date: Sun, 12 Jan 2014 02:09:16 +0400
Subject: [PATCH] opencl: improved auto-gen .icd

v2: Use @OPENCL_VERSION@:0 for library
    replace /etc with @sysconfdir@ macros

v3: Drop libdir from icd, because libMesaOpenCL isn't private

v4: install ocl vendor always to /etc

Reported-by: Fabian Deutsch <fabian.deutsch at gmx.de>
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=73512
Signed-off-by: Igor Gnatenko <i.gnatenko.brain at gmail.com>
---
 configure.ac                           | 3 +++
 src/gallium/targets/opencl/Makefile.am | 2 +-
 src/gallium/targets/opencl/mesa.icd    | 1 -
 src/gallium/targets/opencl/mesa.icd.in | 1 +
 4 files changed, 5 insertions(+), 2 deletions(-)
 delete mode 100644 src/gallium/targets/opencl/mesa.icd
 create mode 100644 src/gallium/targets/opencl/mesa.icd.in

diff --git a/configure.ac b/configure.ac
index 4b55140..3452e15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,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.24
@@ -2023,6 +2025,7 @@ AC_CONFIG_FILES([Makefile
 		src/gallium/targets/egl-static/Makefile
 		src/gallium/targets/gbm/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
diff --git a/src/gallium/targets/opencl/Makefile.am b/src/gallium/targets/opencl/Makefile.am
index 653302c..3b257ca 100644
--- a/src/gallium/targets/opencl/Makefile.am
+++ b/src/gallium/targets/opencl/Makefile.am
@@ -4,7 +4,7 @@ lib_LTLIBRARIES = lib at OPENCL_LIBNAME@.la
 
 lib at OPENCL_LIBNAME@_la_LDFLAGS = \
 	$(LLVM_LDFLAGS) \
-	-version-number 1:0
+	-version-number @OPENCL_VERSION@:0
 
 lib at OPENCL_LIBNAME@_la_LIBADD = \
 	$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \
diff --git a/src/gallium/targets/opencl/mesa.icd b/src/gallium/targets/opencl/mesa.icd
deleted file mode 100644
index 6a6a870..0000000
--- a/src/gallium/targets/opencl/mesa.icd
+++ /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
index 0000000..1b77b4e
--- /dev/null
+++ b/src/gallium/targets/opencl/mesa.icd.in
@@ -0,0 +1 @@
+lib at OPENCL_LIBNAME@.so. at OPENCL_VERSION@
-- 
1.8.4.2

-- 
-Igor Gnatenko




More information about the mesa-dev mailing list