Skip to contentSkip to conversation

gdb: Fix occasional build failure

PATCH New Richard Purdie 1 participant 1 message Mar 6, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdb: Fix occasional build failure

When running the configure check "checking for ELF support in BFD", LDFLAGS were not being passed in to libtool. In OE/YP, we need these flags when using uninative due to the games we play with the dynamic loader.

If a version of libzstd was built against a newer glibc, it would need newer pthread symbols which it wouldn't find with the system linker. At runtime this isn't an issue as it would be switched to use uninative but we pass flags in LDFLAGS to allow this.

The bug is rare to reproduce as it depends on the host libzstd was built against.

---
 meta/recipes-devtools/gdb/gdb.inc             |  1 +
 .../gdb/gdb/add-misssing-ldflags.patch        | 47 +++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 meta/recipes-devtools/gdb/gdb/add-misssing-ldflags.patch
meta/recipes-devtools/gdb/gdb.inc +1 -0
index 18603cc7d43..9457c27f8b7 100644
@@ -14,6 +14,7 @@ SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \
            file://0007-Fix-invalid-sigprocmask-call.patch \
            file://0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
            file://0009-gdbserver-linux-low.cc-Fix-a-typo-in-ternary-operato.patch \
+           file://add-missing-ldflags.patch \
            "
 SRC_URI[sha256sum] = "115ad5c18d69a6be2ab15882d365dda2a2211c14f480b3502c6eba576e2e95a0"
 
meta/recipes-devtools/gdb/gdb/add-misssing-ldflags.patch new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
2.38.1