freedreno: Do not link ir3_compiler with valgrind libraries.
authorVinson Lee <vlee@freedesktop.org>
Wed, 31 Oct 2018 18:50:48 +0000 (11:50 -0700)
committerVinson Lee <vlee@freedesktop.org>
Wed, 31 Oct 2018 22:05:28 +0000 (15:05 -0700)
This patch fixes this freedreno autotools build error.

  CXXLD    ir3_compiler
/usr/lib/valgrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-m_main.o): In function `_start':
(.text+0x0): multiple definition of `_start'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o:(.text+0x0): first defined here
/usr/bin/ld: /usr/lib/valgrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-m_main.o): relocation R_X86_64_32S against undefined symbol `vgPlain_interim_stack' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /usr/lib/valgrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-m_trampoline.o): relocation R_X86_64_32 against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /usr/lib/valgrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-dispatch-amd64-linux.o): relocation R_X86_64_32S against symbol `vgPlain_stats__n_xindirs_32' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

Fixes: f3cc0d274756 ("freedreno: import libdrm_freedreno + redesign submit")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108595
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/Makefile.am

index a92da1f561dfd77ab89e3ad3a93db6260563afcc..5690b6ec88464d3897172be2ff362f98158decb0 100644 (file)
@@ -47,7 +47,6 @@ ir3_compiler_LDADD = \
        $(top_builddir)/src/util/libmesautil.la \
        $(top_builddir)/src/mesa/libmesagallium.la \
        $(GALLIUM_COMMON_LIB_DEPS) \
-       $(LIBDRM_LIBS) \
-       $(VALGRIND_LIBS)
+       $(LIBDRM_LIBS)
 
 EXTRA_DIST += meson.build