This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Add x86-tdep.o to i386/amd64 target build
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 15 Apr 2018 19:45:28 -0000
- Subject: [binutils-gdb] Add x86-tdep.o to i386/amd64 target build
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eda4efb12763893b8a49c10c6f2823a465c1c6ba
commit eda4efb12763893b8a49c10c6f2823a465c1c6ba
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Sun Apr 15 12:52:27 2018 -0400
Add x86-tdep.o to i386/amd64 target build
We get this error when doing a build with a single amd64 target (the
default when doing just ./configure on x86-64 GNU/Linux):
/home/simark/src/binutils-gdb/gdb/i386-tdep.c:4431: error: undefined reference to 'x86_in_indirect_branch_thunk(unsigned long, char const**, int, int)'
/home/simark/src/binutils-gdb/gdb/amd64-tdep.c:3045: error: undefined reference to 'x86_in_indirect_branch_thunk(unsigned long, char const**, int, int)'
The problem is that commit
1d509aa625f8 ("infrun: step through indirect branch thunks")
missed adding x86-tdep.o to the list of object file included in an amd64
or i386 build. The problem is not seen with --enable-targets=all
because that file is included in ALL_TARGET_OBS.
Built-tested using:
* --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
* --host=armv7-rpi2-linux-gnueabihf --target=x86_64-pc-linux-gnu
gdb/ChangeLog:
* configure.tgt (x86_tobjs): New variable.
(amd64_tobjs, i386_tobjs): Use it.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/configure.tgt | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 82b803d..b672052 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * configure.tgt (x86_tobjs): New variable.
+ (amd64_tobjs, i386_tobjs): Use it.
+
2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
* symtab.c (print_symbol_info): Precede the symbol definition by
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index ba90411..b252809 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -37,8 +37,9 @@ case $targ in
;;
esac
-i386_tobjs="i386-tdep.o arch/i386.o i387-tdep.o"
-amd64_tobjs="amd64-tdep.o arch/amd64.o"
+x86_tobjs="x86-tdep.o"
+i386_tobjs="i386-tdep.o arch/i386.o i387-tdep.o ${x86_tobjs}"
+amd64_tobjs="amd64-tdep.o arch/amd64.o ${x86_tobjs}"
# Here are three sections to get a list of target specific object
# files according to target triplet $TARG.