Skip to contentSkip to conversation

valgrind: fix link failure with gold

PATCH New Ross Burton 1 participant 1 message Jul 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 valgrind: fix link failure with gold

---
 .../valgrind/valgrind/link-gz-tests.patch          | 25 ++++++++++++++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.12.0.bb  |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch
meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch new file +25 -0
new file mode 100644
index 00000000000..b55c9043cd5
@@ -0,0 +1,25 @@
+When checking if the compiler supports compressed debug sections we need to actually link instead of just compile.  Otherwise the compiler thinks that they are supported, but gold does not support -gz=zlib.
+
+Upstream-Status: Submitted (https://bugs.kde.org/show_bug.cgi?id=382256)
+Signed-off-by: Ross Burton <[email protected]>
+
+--- a/configure.ac~	2017-07-11 11:53:16.000000000 +0100
++++ b/configure.ac	2017-07-11 18:16:13.674130483 +0100
+@@ -2119,7 +2119,7 @@
+ safe_CFLAGS=$CFLAGS
+ CFLAGS="-g -gz=zlib"
+ 
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
+   return 0;
+ ]])], [
+ ac_have_gz_zlib=yes
+@@ -2139,7 +2139,7 @@
+ safe_CFLAGS=$CFLAGS
+ CFLAGS="-g -gz=zlib-gnu"
+ 
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
+   return 0;
+ ]])], [
+ ac_have_gz_zlib_gnu=yes
meta/recipes-devtools/valgrind/valgrind_3.12.0.bb +1 -0
index b63d27861d5..0cc5eefc88e 100644
@@ -35,6 +35,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
            file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \
            file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
            file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
+           file://link-gz-tests.patch \
            "
 SRC_URI_append_libc-musl = "\
            file://0001-fix-build-for-musl-targets.patch \
Signature · 1 line
2.11.0