automake: correctly append the version-script
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 25 May 2014 02:23:42 +0000 (03:23 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 25 May 2014 22:21:47 +0000 (23:21 +0100)
Turns out that the AC conditional did not include the
the version-scripts as expected. Rather it truncated
the remaining linker flags.

Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
src/gallium/Automake.inc
src/gallium/targets/egl-static/Makefile.am
src/gallium/targets/gbm/Makefile.am
src/gallium/targets/opencl/Makefile.am
src/gallium/targets/osmesa/Makefile.am
src/gallium/targets/pipe-loader/Makefile.am

index 70921ec..97735ab 100644 (file)
@@ -56,9 +56,6 @@ GALLIUM_DRI_LINKER_FLAGS = \
        -shrext .so \
        -module \
        -avoid-version \
-if HAVE_LD_VERSION_SCRIPT
-       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri.sym \
-endif
        $(GC_SECTIONS)
 
 GALLIUM_VDPAU_LINKER_FLAGS = \
@@ -66,9 +63,6 @@ GALLIUM_VDPAU_LINKER_FLAGS = \
        -module \
        -no-undefined \
        -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
-if HAVE_LD_VERSION_SCRIPT
-       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym \
-endif
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
@@ -77,9 +71,6 @@ GALLIUM_XVMC_LINKER_FLAGS = \
        -module \
        -no-undefined \
        -version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
-if HAVE_LD_VERSION_SCRIPT
-       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc.sym \
-endif
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
@@ -88,12 +79,24 @@ GALLIUM_OMX_LINKER_FLAGS = \
        -module \
        -no-undefined \
        -avoid-version \
-if HAVE_LD_VERSION_SCRIPT
-       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym \
-endif
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+GALLIUM_DRI_LINKER_FLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri.sym
+
+GALLIUM_VDPAU_LINKER_FLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym
+
+GALLIUM_XVMC_LINKER_FLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc.sym
+
+GALLIUM_OMX_LINKER_FLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym
+endif
+
+
 GALLIUM_COMMON_LIB_DEPS = \
        -lm \
        $(CLOCK_LIB) \
index bd18f99..ec09b28 100644 (file)
@@ -48,12 +48,14 @@ AM_LDFLAGS = \
        -module \
        -no-undefined \
        -avoid-version \
-if HAVE_LD_VERSION_SCRIPT
-       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.sym \
-endif
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+AM_LDFLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.sym
+endif
+
 egldir = $(EGL_DRIVER_INSTALL_DIR)
 egl_LTLIBRARIES = egl_gallium.la
 
index ccfddac..5efc0e4 100644 (file)
@@ -67,12 +67,14 @@ gbm_gallium_drm_la_LDFLAGS = \
        -module \
        -no-undefined \
        -avoid-version \
-if HAVE_LD_VERSION_SCRIPT
-       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/gbm/gbm.sym \
-endif
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+gbm_gallium_drm_la_LDFLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/gbm/gbm.sym
+endif
+
 if HAVE_MESA_LLVM
 gbm_gallium_drm_la_LIBADD += $(LLVM_LIBS)
 gbm_gallium_drm_la_LDFLAGS += $(LLVM_LDFLAGS)
index 55a73b4..7f2854d 100644 (file)
@@ -6,12 +6,13 @@ lib@OPENCL_LIBNAME@_la_LDFLAGS = \
        $(LLVM_LDFLAGS) \
        -no-undefined \
        -version-number 1:0 \
-if HAVE_LD_VERSION_SCRIPT
-       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/opencl/opencl.sym \
-endif
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+lib@OPENCL_LIBNAME@_la_LDFLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/opencl/opencl.sym
+endif
 
 lib@OPENCL_LIBNAME@_la_LIBADD = \
        $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \
index 0ec8a26..3a554a9 100644 (file)
@@ -45,10 +45,13 @@ lib@OSMESA_LIB@_la_LDFLAGS = \
        -module \
        -no-undefined \
        -version-number @OSMESA_VERSION@ \
-       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/osmesa/osmesa.sym \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+lib@OSMESA_LIB@_la_LDFLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/osmesa/osmesa.sym
+endif
 
 if HAVE_SHARED_GLAPI
 SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
index 93e497f..500dfce 100644 (file)
@@ -47,12 +47,14 @@ AM_LDFLAGS = \
        -module \
        -no-undefined \
        -avoid-version \
-if HAVE_LD_VERSION_SCRIPT
-       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/pipe-loader/pipe.sym \
-endif
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+AM_LDFLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/pipe-loader/pipe.sym
+endif
+
 if HAVE_MESA_LLVM
 PIPE_LIBS += $(LLVM_LIBS)
 AM_LDFLAGS += $(LLVM_LDFLAGS)