[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 6/9] Added 15-fix-llvmpipe-test-linking.diff: Fix link failure when building llvmpipe with --with-llvm-shared-libs. Patch from fdo bug #52617.



From: Timo Aaltonen <tjaalton@ubuntu.com>

(cherry picked from commit fae28bc1fff4147046b9dc095f4f5e92f85f2306)

Conflicts:
	debian/patches/series
---
 debian/changelog                                 |    2 +
 debian/patches/15-fix-llvmpipe-test-linking.diff |   61 ++++++++++++++++++++++
 debian/patches/series                            |    1 +
 3 filer ändrade, 64 tillägg(+)
 create mode 100644 debian/patches/15-fix-llvmpipe-test-linking.diff

diff --git a/debian/changelog b/debian/changelog
index f4667ff..689e140 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ mesa (8.0.4-3) UNRELEASED; urgency=low
 
   [ Timo Aaltonen ]
   * rules: Build llvm shared libs on platforms that support llvm.
+  * Added 15-fix-llvmpipe-test-linking.diff: Fix link failure when building
+    llvmpipe with --with-llvm-shared-libs. Patch from fdo bug #52617.
 
  -- Jon Severinsson <jon@severinsson.net>  Sat, 22 Sep 2012 20:50:00 +0200
 
diff --git a/debian/patches/15-fix-llvmpipe-test-linking.diff b/debian/patches/15-fix-llvmpipe-test-linking.diff
new file mode 100644
index 0000000..92893a3
--- /dev/null
+++ b/debian/patches/15-fix-llvmpipe-test-linking.diff
@@ -0,0 +1,61 @@
+From 7e2e29c67f8fc8ec72c2dc8544428fdd86b21353 Mon Sep 17 00:00:00 2001
+From: Olivier Blin <dev@blino.org>
+Date: Sat, 4 Aug 2012 00:29:45 +0200
+Subject: [PATCH] gallium: only link static archives between ld start/end group options
+
+llvmpipe test programs failed to link with --as-needed ld option,
+since dynamic libraries were mixed with static libraries between the
+ld --start-group and --end-group options.
+
+gd3d1x likely had the same issue.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52167
+---
+ src/gallium/Makefile.template                    | 2 +-
+ src/gallium/drivers/llvmpipe/Makefile            | 3 ++-
+ src/gallium/state_trackers/d3d1x/gd3d1x/Makefile | 3 ++-
+ 3 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/gallium/Makefile.template b/src/gallium/Makefile.template
+index 036c119..c30477a 100644
+--- a/src/gallium/Makefile.template
++++ b/src/gallium/Makefile.template
+@@ -41,7 +41,7 @@ depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURC
+ 	$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(GENERATED_SOURCES) 2> /dev/null
+ 
+ $(PROGS): % : %.o $(PROGS_DEPS)
+-	$(LD) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group  $(LIBS) -Wl,--end-group
++	$(LD) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group  $(LIBS) -Wl,--end-group $(LDADD)
+ 
+ # Emacs tags
+ tags:
+diff --git a/src/gallium/drivers/llvmpipe/Makefile b/src/gallium/drivers/llvmpipe/Makefile
+index ef16fc7..35f8fe8 100644
+--- a/src/gallium/drivers/llvmpipe/Makefile
++++ b/src/gallium/drivers/llvmpipe/Makefile
+@@ -68,7 +68,8 @@ lp_tile_soa.c: lp_tile_soa.py ../../auxiliary/util/u_format_parse.py ../../auxil
+ 	$(PYTHON2) $(PYTHON_FLAGS) lp_tile_soa.py ../../auxiliary/util/u_format.csv > $@
+ 
+ LDFLAGS += $(LLVM_LDFLAGS)
+-LIBS += -L../../auxiliary/ -lgallium libllvmpipe.a $(LLVM_LIBS) $(GL_LIB_DEPS)
++LIBS += -L../../auxiliary/ -lgallium libllvmpipe.a
++LDADD += $(LLVM_LIBS) $(GL_LIB_DEPS)
+ LD=$(CXX)
+ 
+ $(PROGS): lp_test_main.o libllvmpipe.a
+diff --git a/src/gallium/state_trackers/d3d1x/gd3d1x/Makefile b/src/gallium/state_trackers/d3d1x/gd3d1x/Makefile
+index 32d2956..f9cad05 100644
+--- a/src/gallium/state_trackers/d3d1x/gd3d1x/Makefile
++++ b/src/gallium/state_trackers/d3d1x/gd3d1x/Makefile
+@@ -3,5 +3,6 @@ CPP_SOURCES=$(wildcard *.cpp)
+ LIBRARY_INCLUDES=-Iinclude -I../gd3dapi -I../d3dapi -I../w32api -I../d3d1xstutil/include -I../d3d1xshader/include -I../../../include -I../../../auxiliary -I../../../state_trackers/egl/common
+ PROGS=tools/dxbc2tgsi
+ PROGS_DEPS=libgd3d1x.a ../d3d1xshader/libd3d1xshader.a ../d3d1xstutil/libd3d1xstutil.a ../../../auxiliary/libgallium.a
+-LIBS=$(PROGS_DEPS) -ldl
++LIBS=$(PROGS_DEPS)
++LDADD=-ldl
+ include ../Makefile.inc
+-- 
+1.7.11.4
+
+
diff --git a/debian/patches/series b/debian/patches/series
index 5746454..28e7d45 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
 10-hurd-configure-tweaks.diff
 #11-hurd-ftbfs-again.diff
 13-llvm-config-pick-a-version.diff
+15-fix-llvmpipe-test-linking.diff
-- 
1.7.10.4


Reply to: