[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 406/437: Adapt for binutils 2.29
From: |
Andy Wingo |
Subject: |
[Guile-commits] 406/437: Adapt for binutils 2.29 |
Date: |
Mon, 2 Jul 2018 05:15:05 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 7259f9dc8a24279d50ed05d2eb92add4fcce723a
Author: pcpa <address@hidden>
Date: Wed Sep 13 11:39:30 2017 -0400
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.
---
ChangeLog | 6 ++++++
configure.ac | 18 ++++++++++++++++++
lib/jit_disasm.c | 10 ++++++++--
3 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 97263f7..42d6129 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-13-09 Paulo Andrade <address@hidden>
+
+ * 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 <address@hidden>
* include/lightning/jit_private.h, lib/lightning.c: Add a
diff --git a/configure.ac b/configure.ac
index f5a0fb5..289083b 100644
--- a/configure.ac
+++ b/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,
diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index e3773a7..cc623b6 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -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;
- [Guile-commits] 371/437: Correct read of freed memory, (continued)
- [Guile-commits] 371/437: Correct read of freed memory, Andy Wingo, 2018/07/02
- [Guile-commits] 342/437: x86: Implement support for the x32 abi, Andy Wingo, 2018/07/02
- [Guile-commits] 416/437: Build and pass all tests on 32 and 64 bit sparc, Andy Wingo, 2018/07/02
- [Guile-commits] 400/437: Correct missing jit_unget_reg calls, Andy Wingo, 2018/07/02
- [Guile-commits] 418/437: Correct typo and values in jit_sparc-sz.c, Andy Wingo, 2018/07/02
- [Guile-commits] 359/437: ARM: Regenerate size table for hard float armv7 or newer., Andy Wingo, 2018/07/02
- [Guile-commits] 396/437: Move definition of jit_va_ codes, cosmetic change., Andy Wingo, 2018/07/02
- [Guile-commits] 407/437: Update copyright year, Andy Wingo, 2018/07/02
- [Guile-commits] 435/437: Add GUILE_ENABLE_JIT macro, Andy Wingo, 2018/07/02
- [Guile-commits] 367/437: X86: No longer make st7 available as a temporary, Andy Wingo, 2018/07/02
- [Guile-commits] 406/437: Adapt for binutils 2.29,
Andy Wingo <=
- [Guile-commits] 395/437: Use an actual, invalid code, as last jit code., Andy Wingo, 2018/07/02
- [Guile-commits] 344/437: ARM: Better check for constants offset overflow, Andy Wingo, 2018/07/02
- [Guile-commits] 351/437: PPC: Only call binutils function if it is available, Andy Wingo, 2018/07/02
- [Guile-commits] 278/437: x86_64: Change x86_64 to also save/restore %rbx in inline asm., Andy Wingo, 2018/07/02
- [Guile-commits] 427/437: Remove some more of the lightning build machinery, Andy Wingo, 2018/07/02
- [Guile-commits] 328/437: Update THANKS file, Andy Wingo, 2018/07/02
- [Guile-commits] 129/437: Remove previous macro files as they are no longer used., Andy Wingo, 2018/07/02
- [Guile-commits] 09/437: add autotools-generated files, Andy Wingo, 2018/07/02
- [Guile-commits] 69/437: implement long mul/div/mod for x86-64, Andy Wingo, 2018/07/02
- [Guile-commits] 162/437: Correct regressions with --with-float={soft, softfp} in the arm backend, Andy Wingo, 2018/07/02