RISC-V: Fix the error when building RISC-V linux native gdbserver.
authorNelson Chu <nelson.chu@sifive.com>
Tue, 2 Jun 2020 01:44:13 +0000 (09:44 +0800)
committerNelson Chu <nelson.chu@sifive.com>
Wed, 3 Jun 2020 01:20:59 +0000 (09:20 +0800)
commit44730156af5f411d2c47af22558e7bd84dc4fcea
tree063920ff99e17f347f29225127366a795594f653
parent721276a249df7be8fdda2bc18c70beb5752e439e
RISC-V: Fix the error when building RISC-V linux native gdbserver.

The original report is as follow,
https://sourceware.org/pipermail/binutils/2020-June/111383.html

Inlcude the bfd.h in the include/opcode/riscv.h may cause gdbserver fail
to build.  I just want to use the `bfd_boolean` in the opcodes/riscv-opc.c,
but I didn't realize this cause the build failed.  Fortunately, I can also
use the `int` as the function return types just like others in the
opcodes/riscv-opc.c.

include/
* opcode/riscv.h: Remove #include "bfd.h".  And change the return
types of riscv_get_isa_spec_class and riscv_get_priv_spec_class
from bfd_boolean to int.

opcodes/
* riscv-opc.c (riscv_get_isa_spec_class): Change bfd_boolean to int.
(riscv_get_priv_spec_class): Likewise.
include/ChangeLog
include/opcode/riscv.h
opcodes/ChangeLog
opcodes/riscv-opc.c