targets/dri: move linker flags out of configure into Automake.inc
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 9 Nov 2013 23:00:14 +0000 (23:00 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 16 Nov 2013 16:31:04 +0000 (16:31 +0000)
Previous assumption was that the same set of flags can be reused
for both classic and gallium drivers. With megadriver work done
the classic drivers ended up using their own (single) instance of
the flags.

Move these into Automake.inc and rename to indicate that those
are gallium specific. Additionally silence an automake/autoconf
warning "XXX is not a standard libtool library name", due to
the parsing issues of the module tag.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
configure.ac
src/gallium/Automake.inc
src/gallium/targets/dri-freedreno/Makefile.am
src/gallium/targets/dri-i915/Makefile.am
src/gallium/targets/dri-ilo/Makefile.am
src/gallium/targets/dri-nouveau/Makefile.am
src/gallium/targets/dri-swrast/Makefile.am
src/gallium/targets/dri-vmwgfx/Makefile.am
src/gallium/targets/r300/dri/Makefile.am
src/gallium/targets/r600/dri/Makefile.am
src/gallium/targets/radeonsi/dri/Makefile.am

index 7b720871ccfde00014f482b258e2006945a8653e..fb16338b8c379e3b988bf3eeba32b937e9485775 100644 (file)
@@ -1050,7 +1050,6 @@ if test "x$enable_dri" = xyes; then
     DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
     GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
 
-    DRI_DRIVER_LDFLAGS="-module -avoid-version -shared -Wl,-Bsymbolic"
 fi
 
 AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS")
@@ -1058,7 +1057,6 @@ AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
                                   "x$enable_osmesa" = xyes -o \
                                   -n "$DRI_DIRS")
 AC_SUBST([DRI_LIB_DEPS])
-AC_SUBST([DRI_DRIVER_LDFLAGS])
 AC_SUBST([GALLIUM_DRI_LIB_DEPS])
 
 case $DRI_DIRS in
index 2a3ad21d20c37c2997797f4209f0a3e76b269396..b6b9b367a825d0f1f77c7a0d4af4b8410a2c0f2f 100644 (file)
@@ -50,6 +50,14 @@ GALLIUM_VIDEO_CFLAGS = \
        $(LIBDRM_CFLAGS) \
        $(VISIBILITY_CFLAGS)
 
+
+# TODO: add -export-symbols-regex
+GALLIUM_DRI_LINKER_FLAGS = \
+       -module \
+       -avoid-version \
+       -shared \
+       -Wl,-Bsymbolic
+
 GALLIUM_VDPAU_LINKER_FLAGS = \
        -module \
        -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
index 2708dd3d46628ec4246f35855e7b8b41740d5f9b..94500b0e28cdc027645e5ad4e3a2361e2586136e 100644 (file)
@@ -32,7 +32,7 @@ AM_CPPFLAGS = \
 dridir = $(DRI_DRIVER_INSTALL_DIR)
 dri_LTLIBRARIES = kgsl_dri.la msm_dri.la
 
-COMMON_LDFLAGS = $(DRI_DRIVER_LDFLAGS)
+COMMON_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
 
 COMMON_LIBADD = \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
index 582c27042a9cc7883ea2632f1e0876885bf27ee4..3f8468fa7a35d4cdacda472e461f3d0a73ff188c 100644 (file)
@@ -35,7 +35,7 @@ dri_LTLIBRARIES = i915_dri.la
 
 i915_dri_la_SOURCES = target.c
 
-i915_dri_la_LDFLAGS = $(DRI_DRIVER_LDFLAGS)
+i915_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
 
 i915_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
index 3633d08358923df1505d6036c049b043f1283c7f..418e2ea31ab977c6f918dad108fb73259a446d34 100644 (file)
@@ -35,7 +35,7 @@ noinst_LTLIBRARIES = ilo_dri.la
 ilo_dri_la_SOURCES = target.c
 
 # need -rpath to create a noinst shared library
-ilo_dri_la_LDFLAGS = $(DRI_DRIVER_LDFLAGS) \
+ilo_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS) \
                     -rpath $(abs_builddir)
 
 ilo_dri_la_LIBADD = \
index 120e2429fddeb2e159af5c563e1331dbdc70e22a..19880679bae0088cd2fc3a2f00aa3f408befd7fb 100644 (file)
@@ -34,7 +34,7 @@ dri_LTLIBRARIES = nouveau_dri.la
 nodist_EXTRA_nouveau_dri_la_SOURCES = dummy.cpp
 nouveau_dri_la_SOURCES = target.c
 
-nouveau_dri_la_LDFLAGS = $(DRI_DRIVER_LDFLAGS)
+nouveau_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
 
 nouveau_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
index 11166ae6987bd9446c1bb706dc32b84c16065a70..ec1576bce3f4cb15b2801d07c0067ecdb4a13af4 100644 (file)
@@ -42,7 +42,7 @@ swrast_dri_la_SOURCES = \
        $(top_srcdir)/src/mesa/drivers/dri/common/dri_util.c \
        $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
 
-swrast_dri_la_LDFLAGS = $(DRI_DRIVER_LDFLAGS)
+swrast_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
 
 swrast_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/libmesagallium.la \
index 24df85285d173fe79b0ff3170a7424edfbb96ebe..712e570abd612c546be8f158af97e338d7feed23 100644 (file)
@@ -35,7 +35,7 @@ vmwgfx_dri_la_SOURCES = \
        target.c \
        vmw_powf.c
 
-vmwgfx_dri_la_LDFLAGS = $(DRI_DRIVER_LDFLAGS)
+vmwgfx_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
 
 vmwgfx_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
index 8b0b768da9060263cd7264ed84468f01f04f14da..d6d8f2d3f97f3eced32fdf931beccf0352dcf898 100644 (file)
@@ -36,7 +36,7 @@ nodist_EXTRA_r300_dri_la_SOURCES = dummy.cpp
 r300_dri_la_SOURCES = \
        drm_target.c
 
-r300_dri_la_LDFLAGS = $(DRI_DRIVER_LDFLAGS)
+r300_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
 
 r300_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
index 62284d1f7ff9e70506e4d88b6b9d1dce3303672d..42db72f5cd5c81d98b45d54fc0c7bb53a25bc2b4 100644 (file)
@@ -35,7 +35,7 @@ dri_LTLIBRARIES = r600_dri.la
 r600_dri_la_SOURCES = \
        drm_target.c
 
-r600_dri_la_LDFLAGS = $(DRI_DRIVER_LDFLAGS)
+r600_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
 
 r600_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
index aacb18c99697eefb36810469c06d8beb144edfdd..2c1a58d76ffbbe082135029180de63c22e432b57 100644 (file)
@@ -36,7 +36,7 @@ nodist_EXTRA_radeonsi_dri_la_SOURCES = dummy.cpp
 radeonsi_dri_la_SOURCES = \
        drm_target.c
 
-radeonsi_dri_la_LDFLAGS = $(DRI_DRIVER_LDFLAGS)
+radeonsi_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
 
 radeonsi_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \