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.
+2020-06-03 Nelson Chu <nelson.chu@sifive.com>
+
+ * 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.
+
2020-05-28 Alan Modra <amodra@gmail.com>
PR 26044
2020-05-28 Alan Modra <amodra@gmail.com>
PR 26044
#include "riscv-opc.h"
#include <stdlib.h>
#include <stdint.h>
#include "riscv-opc.h"
#include <stdlib.h>
#include <stdint.h>
extern const struct riscv_opcode riscv_insn_types[];
extern const struct riscv_ext_version riscv_ext_version_table[];
extern const struct riscv_opcode riscv_insn_types[];
extern const struct riscv_ext_version riscv_ext_version_table[];
riscv_get_isa_spec_class (const char *, enum riscv_isa_spec_class *);
riscv_get_isa_spec_class (const char *, enum riscv_isa_spec_class *);
riscv_get_priv_spec_class (const char *, enum riscv_priv_spec_class *);
extern const char *
riscv_get_priv_spec_name (enum riscv_priv_spec_class);
riscv_get_priv_spec_class (const char *, enum riscv_priv_spec_class *);
extern const char *
riscv_get_priv_spec_name (enum riscv_priv_spec_class);
+2020-06-03 Nelson Chu <nelson.chu@sifive.com>
+
+ * riscv-opc.c (riscv_get_isa_spec_class): Change bfd_boolean to int.
+ (riscv_get_priv_spec_class): Likewise.
+
2020-06-01 Alan Modra <amodra@gmail.com>
* bpf-desc.c: Regenerate.
2020-06-01 Alan Modra <amodra@gmail.com>
* bpf-desc.c: Regenerate.
/* Get the corresponding ISA spec class by giving a ISA spec string. */
/* Get the corresponding ISA spec class by giving a ISA spec string. */
riscv_get_isa_spec_class (const char *s,
enum riscv_isa_spec_class *class)
{
const struct isa_spec_t *version;
if (s == NULL)
riscv_get_isa_spec_class (const char *s,
enum riscv_isa_spec_class *class)
{
const struct isa_spec_t *version;
if (s == NULL)
for (version = &isa_specs[0]; version->name != NULL; ++version)
if (strcmp (version->name, s) == 0)
{
*class = version->class;
for (version = &isa_specs[0]; version->name != NULL; ++version)
if (strcmp (version->name, s) == 0)
{
*class = version->class;
}
/* Can not find the supported ISA spec. */
}
/* Can not find the supported ISA spec. */
/* Get the corresponding CSR version class by giving a privilege
version string. */
/* Get the corresponding CSR version class by giving a privilege
version string. */
riscv_get_priv_spec_class (const char *s,
enum riscv_priv_spec_class *class)
{
const struct priv_spec_t *version;
if (s == NULL)
riscv_get_priv_spec_class (const char *s,
enum riscv_priv_spec_class *class)
{
const struct priv_spec_t *version;
if (s == NULL)
for (version = &priv_specs[0]; version->name != NULL; ++version)
if (strcmp (version->name, s) == 0)
{
*class = version->class;
for (version = &priv_specs[0]; version->name != NULL; ++version)
if (strcmp (version->name, s) == 0)
{
*class = version->class;
}
/* Can not find the supported privilege version. */
}
/* Can not find the supported privilege version. */
}
/* Get the corresponding privilege version string by giving a CSR
}
/* Get the corresponding privilege version string by giving a CSR