[Mesa-dev] [PATCH] build: force .so extension for the gallium dri modules

Emil Velikov emil.l.velikov at gmail.com
Mon Apr 7 07:24:46 PDT 2014


While linux uses .so as a default extension of a shared library that is
not the case for other platforms. The loader in libGL (and others) assume
that the dri module will always have a .so extension, thus it will fail
to load it on some platforms.

Spotted-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 install-gallium-links.mk | 2 +-
 src/gallium/Automake.inc | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/install-gallium-links.mk b/install-gallium-links.mk
index 6ed8a24a..757b288 100644
--- a/install-gallium-links.mk
+++ b/install-gallium-links.mk
@@ -12,7 +12,7 @@ all-local : .libs/install-gallium-links
 		link_dir=$(top_builddir)/$(LIB_DIR)/egl;	\
 	fi;							\
 	$(MKDIR_P) $$link_dir;					\
-	file_list=$(dri_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*);	\
+	file_list=$(dri_LTLIBRARIES:%.la=.libs/%.so);		\
 	file_list+=$(vdpau_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*); \
 	file_list+=$(egl_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*);	\
 	file_list+=$(lib_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*);	\
diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index bafde36..1f5d532 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -55,6 +55,7 @@ DRI_VERSION_SCRIPT ?= $(top_srcdir)/src/gallium/state_trackers/dri/dri.link
 
 GALLIUM_DRI_LINKER_FLAGS = \
 	-shared \
+	-shrext .so \
 	-module \
 	-avoid-version \
 	$(GC_SECTIONS) \
-- 
1.9.1



More information about the mesa-dev mailing list