mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-17 11:10:18 +02:00
Adapt for binutils 2.29
* configure.ac: Add check for binutils 2.29 prototype to the disassembler function. * lib/jit_disasm.c: Adapt for binutils 2.29 change.
This commit is contained in:
parent
d761499315
commit
7259f9dc8a
3 changed files with 32 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2017-13-09 Paulo Andrade <pcpa@gnu.org>
|
||||
|
||||
* configure.ac: Add check for binutils 2.29 prototype to the
|
||||
disassembler function.
|
||||
* lib/jit_disasm.c: Adapt for binutils 2.29 change.
|
||||
|
||||
2017-06-09 Paulo Andrade <pcpa@gnu.org>
|
||||
|
||||
* include/lightning/jit_private.h, lib/lightning.c: Add a
|
||||
|
|
18
configure.ac
18
configure.ac
|
@ -93,6 +93,24 @@ fi
|
|||
AM_CONDITIONAL(with_disassembler, [test "x$DISASSEMBLER" != "xno"])
|
||||
if test "x$DISASSEMBLER" != "xno"; then
|
||||
LIGHTNING_CFLAGS="$LIGHTNING_CFLAGS -DDISASSEMBLER=1"
|
||||
save_CFLAGS=$CFLAGS
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
|
||||
#include <lightning.h>
|
||||
#include <lightning/jit_private.h>
|
||||
#include <dis-asm.h>
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
disassembler_ftype print;
|
||||
bdf *abfd;
|
||||
print = disassembler(abfd);
|
||||
return 0;
|
||||
}
|
||||
)], [ac_cv_test_new_disassembler=no],,)
|
||||
CFLAGS="$CFLAGS -I$PWD/include -D_GNU_SOURCE"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
if test "x$ac_cv_test_new_disassembler" != "xno"; then
|
||||
LIGHTNING_CFLAGS="$LIGHTNING_CFLAGS -DBINUTILS_2_29=1"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(devel-disassembler,
|
||||
|
|
|
@ -73,8 +73,6 @@ jit_init_debug(const char *progname)
|
|||
}
|
||||
bfd_check_format(disasm_bfd, bfd_object);
|
||||
bfd_check_format(disasm_bfd, bfd_archive);
|
||||
disasm_print = disassembler(disasm_bfd);
|
||||
assert(disasm_print);
|
||||
INIT_DISASSEMBLE_INFO(disasm_info, disasm_stream, fprintf);
|
||||
# if defined(__i386__) || defined(__x86_64__)
|
||||
disasm_info.arch = bfd_arch_i386;
|
||||
|
@ -124,6 +122,14 @@ jit_init_debug(const char *progname)
|
|||
# endif
|
||||
disasm_info.print_address_func = disasm_print_address;
|
||||
|
||||
# if BINUTILS_2_29
|
||||
disasm_print = disassembler(disasm_info.arch, __BYTE_ORDER == __BIG_ENDIAN,
|
||||
disasm_info.mach, disasm_bfd);
|
||||
# else
|
||||
disasm_print = disassembler(disasm_bfd);
|
||||
# endif
|
||||
assert(disasm_print);
|
||||
|
||||
if (bfd_get_file_flags(disasm_bfd) & HAS_SYMS) {
|
||||
asymbol **in;
|
||||
asymbol **out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue