scons: Disallow undefined symbols in Xlib libGL.so.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 19 Jul 2013 12:08:07 +0000 (13:08 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 19 Jul 2013 12:08:07 +0000 (13:08 +0100)
It's not the first time that, due to missing build dependencies or
incomplete commits, we end up with a broken libGL.so that's missing
symbols, causing all tests to fail catastrophically.

Instead try to catch this sort of issues earlier.

src/gallium/targets/libgl-xlib/SConscript
src/mesa/drivers/x11/SConscript

index 58ed6d4a30f35113f4194f85cb38565094099fd6..952ab62fdde76cbc64ed747dcb83292de50d81a6 100644 (file)
@@ -45,6 +45,9 @@ if env['llvm']:
     env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
     env.Prepend(LIBS = [llvmpipe])
 
+# Disallow undefined symbols
+env.Append(SHLINKFLAGS = ['-Wl,-z,defs'])
+
 # libGL.so.1.5
 libgl_1_5 = env.SharedLibrary(
     target ='GL',
index b0173bee94c1f961f21c1d2fd2d2344544e97b29..529523243864e3918509004e2381c78546dab30a 100644 (file)
@@ -31,6 +31,9 @@ sources = [
        'xm_tri.c',
 ]
 
+# Disallow undefined symbols
+env.Append(SHLINKFLAGS = ['-Wl,-z,defs'])
+
 # libGL.so.1.6
 libgl_1_6 = env.SharedLibrary(
     target ='GL',