Mesa (master): scons: Disallow undefined symbols in Xlib libGL.so.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Jul 19 12:10:38 UTC 2013


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

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Jul 19 13:08:07 2013 +0100

scons: Disallow undefined symbols in Xlib libGL.so.

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 |    3 +++
 src/mesa/drivers/x11/SConscript           |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
index 58ed6d4..952ab62 100644
--- a/src/gallium/targets/libgl-xlib/SConscript
+++ b/src/gallium/targets/libgl-xlib/SConscript
@@ -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',
diff --git a/src/mesa/drivers/x11/SConscript b/src/mesa/drivers/x11/SConscript
index b0173be..5295232 100644
--- a/src/mesa/drivers/x11/SConscript
+++ b/src/mesa/drivers/x11/SConscript
@@ -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',




More information about the mesa-commit mailing list