Mesa (master): targets/opencl: hide all the exported llvm/ clang mayhem... hopefully

Emil Velikov evelikov at kemper.freedesktop.org
Fri May 2 20:52:09 UTC 2014


Module: Mesa
Branch: master
Commit: f743670b9a10ab296a5e90b866d1c766d44cf98d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f743670b9a10ab296a5e90b866d1c766d44cf98d

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Fri Apr  4 23:37:15 2014 +0100

targets/opencl: hide all the exported llvm/clang mayhem... hopefully

Both llvm and clang polute the exported symbol table, as soon
as we try to link with either one. Other than those two
everything else looks good (clean).

Cc: Tom Stellard <thomas.stellard at amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>

---

 src/gallium/targets/opencl/Makefile.am |    1 +
 src/gallium/targets/opencl/opencl.sym  |    6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/src/gallium/targets/opencl/Makefile.am b/src/gallium/targets/opencl/Makefile.am
index 29909da..ba45aee 100644
--- a/src/gallium/targets/opencl/Makefile.am
+++ b/src/gallium/targets/opencl/Makefile.am
@@ -6,6 +6,7 @@ lib at OPENCL_LIBNAME@_la_LDFLAGS = \
 	$(LLVM_LDFLAGS) \
 	-no-undefined \
 	-version-number 1:0 \
+	-Wl,--version-script=$(top_srcdir)/src/gallium/targets/opencl/opencl.sym \
 	$(GC_SECTIONS) \
 	$(LD_NO_UNDEFINED)
 
diff --git a/src/gallium/targets/opencl/opencl.sym b/src/gallium/targets/opencl/opencl.sym
new file mode 100644
index 0000000..ee8aacf
--- /dev/null
+++ b/src/gallium/targets/opencl/opencl.sym
@@ -0,0 +1,6 @@
+{
+	global:
+		cl*;
+	local:
+		*;
+};




More information about the mesa-commit mailing list