toolchain/gdb: fix broken configure test for ELF support
authorFelix Fietkau <nbd@nbd.name>
Mon, 17 May 2021 15:16:56 +0000 (17:16 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 18 May 2021 10:52:52 +0000 (12:52 +0200)
A missing #include was causing gdb on macOS to be compiled without ELF support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
toolchain/gdb/patches/100-fix-elf-support-check.patch [new file with mode: 0644]

diff --git a/toolchain/gdb/patches/100-fix-elf-support-check.patch b/toolchain/gdb/patches/100-fix-elf-support-check.patch
new file mode 100644 (file)
index 0000000..fe612c3
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/gdb/configure
++++ b/gdb/configure
+@@ -16818,6 +16818,7 @@ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdlib.h>
++#include <string.h>
+   #include "bfd.h"
+   #include "elf-bfd.h"
+--- a/gdb/acinclude.m4
++++ b/gdb/acinclude.m4
+@@ -362,6 +362,7 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [
+   AC_CACHE_CHECK([$1], [$2],
+   [AC_TRY_LINK(
+   [#include <stdlib.h>
++  #include <string.h>
+   #include "bfd.h"
+   #include "$4"
+   ],