mesa/0901-gallium-only-link-static-archives-between-ld-start-e.patch

45 lines
1.8 KiB
Diff
Raw Normal View History

From 62fd60132ce4162b66ec4f4ae10aaa357160e654 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
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52167
---
src/gallium/Makefile.template | 2 +-
src/gallium/drivers/llvmpipe/Makefile | 3 ++-
2 files changed, 3 insertions(+), 2 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
--
1.7.11.4