From: Emil Velikov Date: Thu, 13 Mar 2014 05:44:33 +0000 (+0000) Subject: automake: add -Wl,--no-undefined to all libraries X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d187a150d45cbf5bd3476eab49be5057382c2c86;p=mesa.git automake: add -Wl,--no-undefined to all libraries ... apart from the dri drivers. With this final change we can build mesa without fear that the resulting libraries will have unresolved symbols. Signed-off-by: Emil Velikov Reviewed-by: Matt Turner --- diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am index 46e890a99f6..57c9ccd6abb 100644 --- a/src/egl/main/Makefile.am +++ b/src/egl/main/Makefile.am @@ -73,7 +73,11 @@ libEGL_la_SOURCES = \ libEGL_la_LIBADD = \ $(EGL_LIB_DEPS) -libEGL_la_LDFLAGS = -Wl,-Bsymbolic -version-number 1:0 -no-undefined +libEGL_la_LDFLAGS = \ + -no-undefined \ + -version-number 1:0 \ + -Wl,-Bsymbolic \ + -Wl,--no-undefined if HAVE_EGL_PLATFORM_X11 AM_CFLAGS += -DHAVE_X11_PLATFORM diff --git a/src/egl/wayland/wayland-egl/Makefile.am b/src/egl/wayland/wayland-egl/Makefile.am index b8d1634fe56..3c2673a6486 100644 --- a/src/egl/wayland/wayland-egl/Makefile.am +++ b/src/egl/wayland/wayland-egl/Makefile.am @@ -10,7 +10,8 @@ noinst_HEADERS = wayland-egl-priv.h libwayland_egl_la_SOURCES = wayland-egl.c libwayland_egl_la_LDFLAGS = \ -no-undefined \ - -version-info 1 + -version-info 1 \ + -Wl,--no-undefined TESTS = wayland-egl-symbols-check diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc index f36d93da403..1151f916bef 100644 --- a/src/gallium/Automake.inc +++ b/src/gallium/Automake.inc @@ -64,20 +64,23 @@ GALLIUM_VDPAU_LINKER_FLAGS = \ -module \ -no-undefined \ -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \ - -export-symbols-regex $(VDPAU_EXPORTS) + -export-symbols-regex $(VDPAU_EXPORTS) \ + -Wl,--no-undefined GALLIUM_XVMC_LINKER_FLAGS = \ -shared \ -module \ -no-undefined \ -version-number $(XVMC_MAJOR):$(XVMC_MINOR) \ - -export-symbols-regex '^XvMC' + -export-symbols-regex '^XvMC' \ + -Wl,--no-undefined GALLIUM_OMX_LINKER_FLAGS = \ -shared \ -module \ -no-undefined \ - -export-symbols-regex $(EXPORTS) + -export-symbols-regex $(EXPORTS) \ + -Wl,--no-undefined GALLIUM_VDPAU_LIB_DEPS = \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ diff --git a/src/gallium/targets/gbm/Makefile.am b/src/gallium/targets/gbm/Makefile.am index bad581d7383..c109ddbb463 100644 --- a/src/gallium/targets/gbm/Makefile.am +++ b/src/gallium/targets/gbm/Makefile.am @@ -66,7 +66,11 @@ gbm_gallium_drm_la_LIBADD += \ $(LIBDRM_LIBS) endif -gbm_gallium_drm_la_LDFLAGS = -no-undefined -avoid-version -module +gbm_gallium_drm_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version \ + -Wl,--no-undefined if HAVE_MESA_LLVM gbm_gallium_drm_la_LIBADD += $(LLVM_LIBS) diff --git a/src/gallium/targets/libgl-xlib/Makefile.am b/src/gallium/targets/libgl-xlib/Makefile.am index cc382db08b2..d7aec7b5b50 100644 --- a/src/gallium/targets/libgl-xlib/Makefile.am +++ b/src/gallium/targets/libgl-xlib/Makefile.am @@ -44,7 +44,10 @@ lib_LTLIBRARIES = libGL.la nodist_EXTRA_libGL_la_SOURCES = dummy.cpp libGL_la_SOURCES = xlib.c -libGL_la_LDFLAGS = -version-number $(GL_MAJOR):$(GL_MINOR):$(GL_TINY) -no-undefined +libGL_la_LDFLAGS = \ + -no-undefined \ + -version-number $(GL_MAJOR):$(GL_MINOR):$(GL_TINY) \ + -Wl,--no-undefined libGL_la_LIBADD = \ $(top_builddir)/src/gallium/state_trackers/glx/xlib/libxlib.la \ diff --git a/src/gallium/targets/opencl/Makefile.am b/src/gallium/targets/opencl/Makefile.am index eb25a5e47aa..b401d10d7a7 100644 --- a/src/gallium/targets/opencl/Makefile.am +++ b/src/gallium/targets/opencl/Makefile.am @@ -5,7 +5,9 @@ lib_LTLIBRARIES = lib@OPENCL_LIBNAME@.la lib@OPENCL_LIBNAME@_la_LDFLAGS = \ $(LLVM_LDFLAGS) \ -no-undefined \ - -version-number 1:0 + -version-number 1:0 \ + -Wl,--no-undefined + lib@OPENCL_LIBNAME@_la_LIBADD = \ $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \ diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am index 2b133c44cb9..651fc5d2b45 100644 --- a/src/gallium/targets/osmesa/Makefile.am +++ b/src/gallium/targets/osmesa/Makefile.am @@ -39,7 +39,12 @@ lib_LTLIBRARIES = lib@OSMESA_LIB@.la nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy.cpp lib@OSMESA_LIB@_la_SOURCES = target.c -lib@OSMESA_LIB@_la_LDFLAGS = -module -version-number @OSMESA_VERSION@ -no-undefined +lib@OSMESA_LIB@_la_LDFLAGS = \ + -module \ + -no-undefined \ + -version-number @OSMESA_VERSION@ \ + -Wl,--no-undefined + if HAVE_SHARED_GLAPI SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am index 6e78a75b6d2..00823fe5bdd 100644 --- a/src/gallium/targets/pipe-loader/Makefile.am +++ b/src/gallium/targets/pipe-loader/Makefile.am @@ -49,6 +49,7 @@ AM_LDFLAGS = \ -module \ -no-undefined \ -avoid-version \ + -Wl,--no-undefined \ -Wl,--version-script=$(top_srcdir)/src/gallium/targets/pipe-loader/pipe.link if HAVE_MESA_LLVM diff --git a/src/gallium/targets/xa/Makefile.am b/src/gallium/targets/xa/Makefile.am index ed87b9f59dc..214c51df883 100644 --- a/src/gallium/targets/xa/Makefile.am +++ b/src/gallium/targets/xa/Makefile.am @@ -66,7 +66,8 @@ endif libxatracker_la_LDFLAGS = \ -no-undefined \ - -version-number $(XA_MAJOR):$(XA_MINOR):$(XA_TINY) + -version-number $(XA_MAJOR):$(XA_MINOR):$(XA_TINY) \ + -Wl,--no-undefined if HAVE_MESA_LLVM libxatracker_la_LIBADD += $(LLVM_LIBS) diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am index d19716309be..c71a974015b 100644 --- a/src/gbm/Makefile.am +++ b/src/gbm/Makefile.am @@ -21,7 +21,9 @@ libgbm_la_SOURCES = \ main/backend.c libgbm_la_LDFLAGS = \ -no-undefined \ - -version-info 1:0 + -version-info 1:0 \ + -Wl,--no-undefined + libgbm_la_LIBADD = \ $(top_builddir)/src/loader/libloader.la \ $(DLOPEN_LIBS) diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am index eb202403b67..0c99c0709d6 100644 --- a/src/glx/Makefile.am +++ b/src/glx/Makefile.am @@ -109,8 +109,10 @@ GL_LIBS = \ $(GL_LIB_DEPS) GL_LDFLAGS = \ + -no-undefined \ + -version-number 1:2 \ -Wl,-Bsymbolic \ - -version-number 1:2 -no-undefined + -Wl,--no-undefined lib@GL_LIB@_la_SOURCES = lib@GL_LIB@_la_LIBADD = $(GL_LIBS) diff --git a/src/mapi/es1api/Makefile.am b/src/mapi/es1api/Makefile.am index b61f9cb1f66..b9581184a96 100644 --- a/src/mapi/es1api/Makefile.am +++ b/src/mapi/es1api/Makefile.am @@ -44,7 +44,10 @@ lib_LTLIBRARIES = libGLESv1_CM.la libGLESv1_CM_la_SOURCES = ../entry.c glapi_mapi_tmp.h libGLESv1_CM_la_LIBADD = $(GLESv1_CM_LIB_DEPS) -libGLESv1_CM_la_LDFLAGS = -version-number 1:1 -no-undefined +libGLESv1_CM_la_LDFLAGS = \ + -no-undefined \ + -version-number 1:1 \ + -Wl,--no-undefined if HAVE_SHARED_GLAPI libGLESv1_CM_la_LIBADD += ../shared-glapi/libglapi.la diff --git a/src/mapi/es2api/Makefile.am b/src/mapi/es2api/Makefile.am index a9444937505..1fb6d7c9604 100644 --- a/src/mapi/es2api/Makefile.am +++ b/src/mapi/es2api/Makefile.am @@ -48,7 +48,10 @@ lib_LTLIBRARIES = libGLESv2.la libGLESv2_la_SOURCES = ../entry.c glapi_mapi_tmp.h libGLESv2_la_LIBADD = $(GLESv2_LIB_DEPS) -libGLESv2_la_LDFLAGS = -version-number 2 -no-undefined +libGLESv2_la_LDFLAGS = \ + -no-undefined \ + -version-number 2 \ + -Wl,--no-undefined if HAVE_SHARED_GLAPI libGLESv2_la_LIBADD += ../shared-glapi/libglapi.la diff --git a/src/mapi/shared-glapi/Makefile.am b/src/mapi/shared-glapi/Makefile.am index 8d8b4dd783c..7e1068fdfec 100644 --- a/src/mapi/shared-glapi/Makefile.am +++ b/src/mapi/shared-glapi/Makefile.am @@ -9,7 +9,9 @@ include $(top_srcdir)/src/mapi/Makefile.sources lib_LTLIBRARIES = libglapi.la libglapi_la_SOURCES = $(MAPI_GLAPI_FILES) libglapi_la_LIBADD = $(PTHREAD_LIBS) $(SELINUX_LIBS) -libglapi_la_LDFLAGS = -no-undefined +libglapi_la_LDFLAGS = \ + -no-undefined \ + -Wl,--no-undefined include $(GLAPI)/gen/glapi_gen.mk glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps) diff --git a/src/mapi/vgapi/Makefile.am b/src/mapi/vgapi/Makefile.am index 197f19f7d95..f85addc7c31 100644 --- a/src/mapi/vgapi/Makefile.am +++ b/src/mapi/vgapi/Makefile.am @@ -44,7 +44,10 @@ TOP=$(top_srcdir) include ../Makefile.sources libOpenVG_la_SOURCES = $(MAPI_FILES) vgapi_tmp.h libOpenVG_la_LIBADD = $(VG_LIB_DEPS) -libOpenVG_la_LDFLAGS = -version-number 1 -no-undefined +libOpenVG_la_LDFLAGS = \ + -no-undefined \ + -version-number 1 \ + -Wl,--no-undefined vgapi_tmp.h: $(srcdir)/vgapi.csv $(top_srcdir)/src/mapi/mapi_abi.py $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(top_srcdir)/src/mapi/mapi_abi.py \ diff --git a/src/mesa/drivers/osmesa/Makefile.am b/src/mesa/drivers/osmesa/Makefile.am index bc1244f52e9..cfab70216ac 100644 --- a/src/mesa/drivers/osmesa/Makefile.am +++ b/src/mesa/drivers/osmesa/Makefile.am @@ -35,7 +35,12 @@ lib_LTLIBRARIES = lib@OSMESA_LIB@.la nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy.cpp lib@OSMESA_LIB@_la_SOURCES = osmesa.c -lib@OSMESA_LIB@_la_LDFLAGS = -module -version-number @OSMESA_VERSION@ -no-undefined +lib@OSMESA_LIB@_la_LDFLAGS = \ + -module \ + -no-undefined \ + -version-number @OSMESA_VERSION@ \ + -Wl,--no-undefined + if HAVE_SHARED_GLAPI SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am index 27343d15791..4c63d59a57c 100644 --- a/src/mesa/drivers/x11/Makefile.am +++ b/src/mesa/drivers/x11/Makefile.am @@ -62,7 +62,8 @@ lib@GL_LIB@_la_LIBADD = \ $(GL_LIB_DEPS) lib@GL_LIB@_la_LDFLAGS = \ + -no-undefined \ -version-number $(GL_MAJOR):$(GL_MINOR):$(GL_PATCH) \ - -no-undefined + -Wl,--no-undefined include $(top_srcdir)/install-lib-links.mk