targets/opencl: hide all the exported llvm/clang mayhem... hopefully
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 4 Apr 2014 22:37:15 +0000 (23:37 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 2 May 2014 20:48:27 +0000 (21:48 +0100)
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@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/targets/opencl/Makefile.am
src/gallium/targets/opencl/opencl.sym [new file with mode: 0644]

index 29909da29f2bce5435b34ce15ece48e4e04b3da0..ba45aee81c1cbbb2c6526949cb3f4191a716268d 100644 (file)
@@ -6,6 +6,7 @@ lib@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 (file)
index 0000000..ee8aacf
--- /dev/null
@@ -0,0 +1,6 @@
+{
+       global:
+               cl*;
+       local:
+               *;
+};