[Mesa-dev] [PATCH 37/37] targets/dri: move linker flags out of configure into Automake.inc
Emil Velikov
emil.l.velikov at gmail.com
Sat Nov 2 12:01:07 PDT 2013
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 at gmail.com>
---
configure.ac | 2 --
src/gallium/Automake.inc | 7 +++++++
src/gallium/targets/dri-freedreno/Makefile.am | 2 +-
src/gallium/targets/dri-i915/Makefile.am | 2 +-
src/gallium/targets/dri-ilo/Makefile.am | 2 +-
src/gallium/targets/dri-nouveau/Makefile.am | 2 +-
src/gallium/targets/dri-swrast/Makefile.am | 2 +-
src/gallium/targets/dri-vmwgfx/Makefile.am | 2 +-
src/gallium/targets/r300/dri/Makefile.am | 2 +-
src/gallium/targets/r600/dri/Makefile.am | 2 +-
src/gallium/targets/radeonsi/dri/Makefile.am | 2 +-
11 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1ca2b45..4e09143 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1031,7 +1031,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")
@@ -1039,7 +1038,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
diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 94df65d..de9c1f7 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -62,6 +62,13 @@ GALLIUM_XORG_CFLAGS = \
$(XORG_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) \
diff --git a/src/gallium/targets/dri-freedreno/Makefile.am b/src/gallium/targets/dri-freedreno/Makefile.am
index 2708dd3..94500b0 100644
--- a/src/gallium/targets/dri-freedreno/Makefile.am
+++ b/src/gallium/targets/dri-freedreno/Makefile.am
@@ -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 \
diff --git a/src/gallium/targets/dri-i915/Makefile.am b/src/gallium/targets/dri-i915/Makefile.am
index 582c270..3f8468f 100644
--- a/src/gallium/targets/dri-i915/Makefile.am
+++ b/src/gallium/targets/dri-i915/Makefile.am
@@ -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 \
diff --git a/src/gallium/targets/dri-ilo/Makefile.am b/src/gallium/targets/dri-ilo/Makefile.am
index 3633d08..418e2ea 100644
--- a/src/gallium/targets/dri-ilo/Makefile.am
+++ b/src/gallium/targets/dri-ilo/Makefile.am
@@ -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 = \
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am b/src/gallium/targets/dri-nouveau/Makefile.am
index 120e242..1988067 100644
--- a/src/gallium/targets/dri-nouveau/Makefile.am
+++ b/src/gallium/targets/dri-nouveau/Makefile.am
@@ -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 \
diff --git a/src/gallium/targets/dri-swrast/Makefile.am b/src/gallium/targets/dri-swrast/Makefile.am
index 11166ae..ec1576b 100644
--- a/src/gallium/targets/dri-swrast/Makefile.am
+++ b/src/gallium/targets/dri-swrast/Makefile.am
@@ -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 \
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile.am b/src/gallium/targets/dri-vmwgfx/Makefile.am
index 24df852..712e570 100644
--- a/src/gallium/targets/dri-vmwgfx/Makefile.am
+++ b/src/gallium/targets/dri-vmwgfx/Makefile.am
@@ -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 \
diff --git a/src/gallium/targets/r300/dri/Makefile.am b/src/gallium/targets/r300/dri/Makefile.am
index 8b0b768..d6d8f2d 100644
--- a/src/gallium/targets/r300/dri/Makefile.am
+++ b/src/gallium/targets/r300/dri/Makefile.am
@@ -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 \
diff --git a/src/gallium/targets/r600/dri/Makefile.am b/src/gallium/targets/r600/dri/Makefile.am
index 62284d1..42db72f 100644
--- a/src/gallium/targets/r600/dri/Makefile.am
+++ b/src/gallium/targets/r600/dri/Makefile.am
@@ -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 \
diff --git a/src/gallium/targets/radeonsi/dri/Makefile.am b/src/gallium/targets/radeonsi/dri/Makefile.am
index aacb18c..2c1a58d 100644
--- a/src/gallium/targets/radeonsi/dri/Makefile.am
+++ b/src/gallium/targets/radeonsi/dri/Makefile.am
@@ -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 \
--
1.8.4.2
More information about the mesa-dev
mailing list