[Mesa-dev] [PATCH] radeon/llvm: Build libradeonllvm as a static library

Tom Stellard tom at stellard.net
Mon Apr 1 14:11:10 PDT 2013


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

Building libradeonllvm as a shared object has led to a number of bugs
and build system complications, and I don't think it's necessary for
such a small library.

This library was originally changed to a shared object to work around
linker error in egl_static.so, but these appear to be fixed now.

https://bugs.freedesktop.org/show_bug.cgi?id=62226
---

Please test to make sure this works for your build configuration.

 src/gallium/drivers/r600/Makefile.am     |  2 +-
 src/gallium/drivers/radeon/Makefile.am   | 22 ++--------------------
 src/gallium/drivers/radeonsi/Makefile.am |  2 +-
 3 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am
index a067f2c..874cf8a 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -18,7 +18,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 140f6c6..c1ffb4a 100644
--- a/src/gallium/drivers/radeon/Makefile.am
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -1,20 +1,7 @@
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
-LIBGALLIUM_LIBS=
-
-if HAVE_GALLIUM_R600
-if HAVE_GALLIUM_RADEONSI
-lib_LTLIBRARIES = libllvmradeon at VERSION@.la
-libllvmradeon at VERSION@_la_LDFLAGS = -Wl, -shared -avoid-version \
-	$(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
+noinst_LTLIBRARIES = libllvmradeon.la
 
 AM_CXXFLAGS = \
 	$(GALLIUM_CFLAGS) \
@@ -25,11 +12,6 @@ AM_CFLAGS = \
 	$(GALLIUM_CFLAGS) \
 	$(LLVM_CFLAGS)
 
-libllvmradeon at VERSION@_la_SOURCES = \
+libllvmradeon_la_SOURCES = \
 	$(CPP_FILES) \
 	$(C_FILES)
-
-libllvmradeon at VERSION@_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 e771d31..8c03b9f 100644
--- a/src/gallium/drivers/radeonsi/Makefile.am
+++ b/src/gallium/drivers/radeonsi/Makefile.am
@@ -33,4 +33,4 @@ AM_CPPFLAGS = \
 AM_CFLAGS = $(LLVM_CFLAGS)
 
 libradeonsi_la_SOURCES = $(C_SOURCES)
-libradeonsi_la_LIBADD = ../radeon/libllvmradeon at VERSION@.la
+libradeonsi_la_LIBADD = ../radeon/libllvmradeon.la
-- 
1.7.11.4



More information about the mesa-dev mailing list