This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] testsuite: Fix gdb.btrace/tailcall-only.exp errors on x86_64-m32
- From: Jan Kratochvil <jkratoch at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 20 Jul 2016 14:22:22 -0000
- Subject: [binutils-gdb] testsuite: Fix gdb.btrace/tailcall-only.exp errors on x86_64-m32
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7674d381b47f9f2411c0ca1da0c152940dc0d7bd
commit 7674d381b47f9f2411c0ca1da0c152940dc0d7bd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Jul 20 16:20:48 2016 +0200
testsuite: Fix gdb.btrace/tailcall-only.exp errors on x86_64-m32
$ runtest 'CC_FOR_TARGET=gcc -m32' gdb.btrace/tailcall-only.exp
Running ./gdb.btrace/tailcall-only.exp ...
gdb compile failed, tailcall-only.c: Assembler messages:
tailcall-only.c:142: Error: cannot represent relocation type BFD_RELOC_64
[...]
tailcall-only.c:425: Error: cannot represent relocation type BFD_RELOC_64
It works for the other x86 arch combinations:
On Mon, 11 Apr 2016 08:44:23 +0200, Metzger, Markus T wrote:
I'm setting the target triplet to "i686-unknown-linux" in my m32 configuration.
Like this:
set target_triplet "i686-unknown-linux"
set_board_info cflags "-m32"
set_board_info cppflags "-m32"
On Wed, 20 Jul 2016 16:02:20 +0200, Pedro Alves wrote:
There's no reason you should _not_ set it.
But, multilib-style testing with --target_board=unix\{-m64,-m32\} etc.
should work _too_, IMO.
gdb/testsuite/ChangeLog
2016-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.btrace/tailcall-only.exp: Use is_lp64_target check.
Diff:
---
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.btrace/tailcall-only.exp | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3ef78b7..3a1bdfd 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2016-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * gdb.btrace/tailcall-only.exp: Use is_lp64_target check.
+
+2016-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+
* gdb.python/py-unwind.exp: Test also ![is_lp64_target].
2016-07-19 Pedro Alves <palves@redhat.com>
diff --git a/gdb/testsuite/gdb.btrace/tailcall-only.exp b/gdb/testsuite/gdb.btrace/tailcall-only.exp
index 44501f5..50837bf 100644
--- a/gdb/testsuite/gdb.btrace/tailcall-only.exp
+++ b/gdb/testsuite/gdb.btrace/tailcall-only.exp
@@ -35,9 +35,9 @@ if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.btrace/tailcall-only.exp COMPILE=1"
standard_testfile tailcall-only.c
lappend opts debug optimize=-O2
-} elseif {[istarget "x86_64-*-*"]} {
+} elseif {[istarget "x86_64-*-*"] && [is_lp64_target]} {
standard_testfile x86_64-tailcall-only.S
-} elseif {[istarget "i?86-*-*"]} {
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
standard_testfile i686-tailcall-only.S
} else {
verbose "Skipping ${testfile}."