scons: Use LD version script for libgl-xlib.
authorJose Fonseca <jfonseca@vmware.com>
Thu, 26 Nov 2015 15:06:35 +0000 (15:06 +0000)
committerJose Fonseca <jfonseca@vmware.com>
Fri, 27 Nov 2015 14:14:25 +0000 (14:14 +0000)
Trivial.

src/gallium/targets/libgl-xlib/SConscript

index df5a220ac2594d74d3edb0f35880cefff3b295a9..687a8b9d3ed768072850479ed4357fc1c3df7d30 100644 (file)
@@ -46,9 +46,13 @@ if env['llvm']:
     env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
     env.Prepend(LIBS = [llvmpipe])
 
-# Disallow undefined symbols
 if env['platform'] != 'darwin':
-    env.Append(SHLINKFLAGS = ['-Wl,-z,defs'])
+    env.Append(SHLINKFLAGS = [
+       # Disallow undefined symbols
+       '-Wl,-z,defs',
+       # Restrict exported symbols
+       '-Wl,--version-script=%s' % File("libgl-xlib.sym").srcnode().path,
+    ])
 
 # libGL.so.1.5
 libgl_1_5 = env.SharedLibrary(