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 70921ecd808dc0230dece438196a38f340865b73..97735abe0c25ccdb64e60dea79ad2cdcbaf0e453 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 bd18f9951617129b9b237b6b2978fddbf2e9dd1b..ec09b28157fe1240954dcc2a6312e6448be63291 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 ccfddacd86591aedb7eb5ad286e03d944a8b00a9..5efc0e4de3fa5f0ff3d817f23147b5756fa3a808 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 55a73b49ecd9d3bbff582c87ae8f73e0161ec54e..7f2854d56feb5350dea61b26b615fb3f91f0f9aa 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 0ec8a2613d4eb3a1d759230027092c8166c63258..3a554a947ebc13ec79f68b5aab7bed2dc5f3e3cf 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 93e497f9943f50eeca87ecc1bd94a7fc61e78417..500dfce193252d73048177524f02ba7983aba6ab 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)