[Mesa-dev] [PATCH] scons: Use LD version script for libgl-xlib.

Jose Fonseca jfonseca at vmware.com
Thu Nov 26 07:19:31 PST 2015


---
 src/gallium/targets/libgl-xlib/SConscript | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
index df5a220..687a8b9d 100644
--- a/src/gallium/targets/libgl-xlib/SConscript
+++ b/src/gallium/targets/libgl-xlib/SConscript
@@ -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(
-- 
2.5.0



More information about the mesa-dev mailing list