aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2020-11-28 11:45:06 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2020-11-28 11:45:16 -0500
commitb413232211bf7c7754095b017f27774d70646489 (patch)
tree751c3ab403e7ce9605c979d91269f51cf4ec7d00 /gdb
parent8d748d1dc56406228c2c76de2563859213364cbf (diff)
downloadgdb-b413232211bf7c7754095b017f27774d70646489.zip
gdb-b413232211bf7c7754095b017f27774d70646489.tar.gz
gdb-b413232211bf7c7754095b017f27774d70646489.tar.bz2
GDB: Fix detection of ELF support when configuring with -Werror=implicit-function-declaration
I am getting I'm sorry, Dave, I can't do that. Symbol format `elf64-littleriscv' unknown. errors after updating from GDB 8.3 to 10. Bisecting showed that since commit 1ff6de031241 ("bfd, ld: add CTF section linking"), bfd.h depends on strncmp() being present, so configuring with -Werror=implicit-function-declaration results in the check for ELF support in BFD failing: .../gdb/gdb/../bfd/elf-bfd.h: In function 'bfd_section_is_ctf': .../gdb/gdb/../bfd/elf-bfd.h:3086:10: error: implicit declaration of function 'strncmp' [-Werror=implicit-function-declaration] return strncmp (name, ".ctf", 4) == 0 && (name[4] == 0 || name[4] == '.'); gdb/ChangeLog: * acincludde.m4 (GDB_AC_CHECK_BFD): Include string.h in the test program. Change-Id: Iec5e21d454c2a544c44d65e23cfde552c424c18e
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/acinclude.m41
-rwxr-xr-xgdb/configure2
3 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e9beaab..acffdef 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-11-28 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
+
+ * acincludde.m4 (GDB_AC_CHECK_BFD): Include string.h in the test
+ program.
+
2020-11-27 Andrew Burgess <andrew.burgess@embecosm.com>
* printcmd.c (skip_over_slash_fmt): Reorder code to ensure in_fmt
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index 64574e2..68520d6 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -266,6 +266,7 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <stdlib.h>
+ #include <string.h>
#include "bfd.h"
#include "$4"],
[return $3;]
diff --git a/gdb/configure b/gdb/configure
index a3e73b4..24e6fbc 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -17236,6 +17236,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"
int
@@ -17349,6 +17350,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
+ #include <string.h>
#include "bfd.h"
#include "mach-o.h"
int