• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/lightning/0002-ppc-disassembler-build-fix.patch
Paul CercueilPaul Cercueil committed bf0777802a020 Jan 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 361caf28545aa0c2b2ab8d1cbd334fbdd952f373 Mon Sep 17 00:00:00 2001
2
From: Paulo Andrade <pcpa@gnu.org>
3
Date: Thu, 15 Jan 2015 14:56:38 -0200
4
Subject: [PATCH 4/4] PPC: Only call binutils function if it is available
5
​
6
    * configure.ac, lib/jit_disasm.c: Rewrite workaround
7
    to apparent problem to initialize powerpc disassembler.
8
---
9
diff --git a/configure.ac b/configure.ac
10
index 749659b..d26e777 100644
11
--- a/configure.ac
12
+++ b/configure.ac
13
@@ -230,6 +230,13 @@ elif test $cpu = arm; then
14
    return 1;
15
     }
16
     ]])],[ac_cv_test_arm_swf=yes],[],[ac_cv_test_arm_swf=no])
17
+elif test $cpu = ppc; then
18
+    if test "x$DISASSEMBLER" != "xno"; then
19
+   save_LIBS="$LIBS"
20
+   LIBS="$LIBS $SHLIB"
21
+   AC_CHECK_FUNCS(disassemble_init_for_target disassemble_init_powerpc)
22
+   LIBS="$save_LIBS"
23
+    fi
24
 fi
25
 CFLAGS=$save_CFLAGS
26
 
27
diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
28
index 01158de..86e5441 100644
29
--- a/lib/jit_disasm.c
30
+++ b/lib/jit_disasm.c
31
@@ -91,11 +91,19 @@ jit_init_debug(const char *progname)
32
 #  if defined(__powerpc__)
33
     disasm_info.arch = bfd_arch_powerpc;
34
     disasm_info.mach = bfd_mach_ppc64;
35
+#    if HAVE_DISASSEMBLE_INIT_FOR_TARGET
36
+    disassemble_init_for_target(&disasm_info);
37
+#    elif HAVE_DISASSEMBLE_INIT_POWERPC
38
     disassemble_init_powerpc(&disasm_info);
39
+#    endif
40
 #    if defined(__powerpc64__)
41
     disasm_info.disassembler_options = "64";
42
 #    endif
43
+#    if HAVE_DISASSEMBLE_INIT_FOR_TARGET
44
+    disassemble_init_for_target(&disasm_info);
45
+#    elif HAVE_DISASSEMBLE_INIT_POWERPC
46
     disassemble_init_powerpc(&disasm_info);
47
+#    endif
48
 #  endif
49
 #  if defined(__sparc__)
50
     disasm_info.endian = disasm_info.display_endian = BFD_ENDIAN_BIG;
51
-- 
52
2.1.4
53
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.