diff options
author | Alan Modra <amodra@gmail.com> | 2019-05-27 11:37:51 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-05-27 14:08:17 +0930 |
commit | 5f63875b309f3ae9854ac8a12470111b794a70a2 (patch) | |
tree | 2fb0abfebefff752b4cf82964d4fafed99e3734e /gas/testsuite | |
parent | 61dd8e19a8b43037125d4a767f27e98e9181521b (diff) | |
download | gdb-5f63875b309f3ae9854ac8a12470111b794a70a2.zip gdb-5f63875b309f3ae9854ac8a12470111b794a70a2.tar.gz gdb-5f63875b309f3ae9854ac8a12470111b794a70a2.tar.bz2 |
Fix failure on powerpc 32-bit only targets
Targets that lack ppc64 support were failing the new prefix-reloc
test. This patch adds some test infrastructure to deal with that, and
changes the powerpc gas usage info so that "-a64" is omitted when
unsupported.
I've been meaning to break up the usage message for a long time;
While doing so causes translators some work now, it should make it
easier next time a new powerpc option is added.
* config/tc-ppc.c (is_ppc64_target): New function.
(md_show_usage): Split up usage message. Don't show -a64 when
unsupported.
testsuite/gas/ppc/ppc.exp (supports_ppc64): New.
(prefix-reloc): Only run for ppc64.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/ppc/ppc.exp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp index 1660d53..3c7a36c 100644 --- a/gas/testsuite/gas/ppc/ppc.exp +++ b/gas/testsuite/gas/ppc/ppc.exp @@ -22,6 +22,15 @@ if { ![istarget "powerpc*-*-*"] && ![istarget "rs6000-*-*"] } then { return } +proc supports_ppc64 { } { + global AS + if { [catch "exec $AS -a64 < /dev/null"] } then { + return 0 + } else { + return 1 + } +} + run_dump_test "bcyerr" run_dump_test "bcy" run_dump_test "bcaterr" @@ -116,4 +125,6 @@ run_dump_test "htm" run_dump_test "titan" run_dump_test "prefix-align" run_dump_test "prefix-pcrel" -run_dump_test "prefix-reloc" +if { [supports_ppc64] } then { + run_dump_test "prefix-reloc" +} |