[Mesa-dev] [PATCH 3/3] radeon/llvm: Always build libradeonllvm as static

Tom Stellard tom at stellard.net
Thu May 2 08:01:20 PDT 2013


From: Tom Stellard <thomas.stellard at amd.com>

This library is very small, so there is not much to gain from building
it as a shared library.  Also, when linking statically with LLVM, a
shared libradeonllvm exports LLVM symbols and creates problems when
used with other shared objects that also link statically to LLVM.
---
 src/gallium/drivers/r600/Makefile.am     |  2 +-
 src/gallium/drivers/radeon/Makefile.am   | 23 ++++++++---------------
 src/gallium/drivers/radeonsi/Makefile.am |  2 +-
 3 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am
index 35c75ad..505d85d 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -28,7 +28,7 @@ if R600_NEED_RADEON_GALLIUM
 libr600_la_SOURCES += \
 	$(LLVM_C_SOURCES)
 
-libr600_la_LIBADD += ../radeon/libllvmradeon at VERSION@.la
+libr600_la_LIBADD += ../radeon/libllvmradeon.la
 
 AM_CFLAGS += \
 	$(LLVM_CFLAGS) \
diff --git a/src/gallium/drivers/radeon/Makefile.am b/src/gallium/drivers/radeon/Makefile.am
index 9b4255e..3bf97e8 100644
--- a/src/gallium/drivers/radeon/Makefile.am
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -12,31 +12,24 @@ libradeon_la_SOURCES = \
 
 if NEED_RADEON_LLVM
 
-if HAVE_GALLIUM_R600
-if HAVE_GALLIUM_RADEONSI
-lib_LTLIBRARIES = libllvmradeon at VERSION@.la
-libllvmradeon at VERSION@_la_LDFLAGS = -Wl, -shared -avoid-version \
+libllvmradeon_la_LDFLAGS = \
 	$(LLVM_LDFLAGS)
-LIBGALLIUM_LIBS += $(top_builddir)/src/gallium/auxiliary/libgallium.la
-else
-noinst_LTLIBRARIES += libllvmradeon at VERSION@.la
-endif
-else
-noinst_LTLIBRARIES += libllvmradeon at VERSION@.la
-endif
 
-libllvmradeon at VERSION@_la_CXXFLAGS = \
+noinst_LTLIBRARIES += libllvmradeon.la
+
+libllvmradeon_la_CXXFLAGS = \
 	$(GALLIUM_CFLAGS) \
 	$(DEFINES)
 
-libllvmradeon at VERSION@_la_CFLAGS = \
+libllvmradeon_la_CFLAGS = \
 	$(GALLIUM_CFLAGS) \
 	$(LLVM_CFLAGS)
 
-libllvmradeon at VERSION@_la_SOURCES = \
+libllvmradeon_la_SOURCES = \
+	$(LLVM_CPP_FILES) \
 	$(LLVM_C_FILES)
 
-libllvmradeon at VERSION@_la_LIBADD = \
+libllvmradeon_la_LIBADD = \
 	$(LIBGALLIUM_LIBS) \
 	$(CLOCK_LIB) \
 	$(LLVM_LIBS) \
diff --git a/src/gallium/drivers/radeonsi/Makefile.am b/src/gallium/drivers/radeonsi/Makefile.am
index df2870e..46aa998 100644
--- a/src/gallium/drivers/radeonsi/Makefile.am
+++ b/src/gallium/drivers/radeonsi/Makefile.am
@@ -35,4 +35,4 @@ AM_CFLAGS = $(LLVM_CFLAGS)
 libradeonsi_la_SOURCES = $(C_SOURCES)
 libradeonsi_la_LIBADD = \
 	../radeon/libradeon.la \
-	../radeon/libllvmradeon at VERSION@.la
+	../radeon/libllvmradeon.la
-- 
1.7.11.4



More information about the mesa-dev mailing list