summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Haustein <mario.haustein@hrz.tu-chemnitz.de>2022-09-26 23:57:35 +0200
committerSam James <sam@gentoo.org>2022-10-01 04:15:34 +0100
commit57caf57304f4f4568c86886b0498b6707ea747f1 (patch)
treed265e5b9f979f33d70a22cf167534c94112fef75
parentnet-im/signal-desktop-bin: remove old version (diff)
downloadgentoo-57caf57304f4f4568c86886b0498b6707ea747f1.tar.gz
gentoo-57caf57304f4f4568c86886b0498b6707ea747f1.tar.bz2
gentoo-57caf57304f4f4568c86886b0498b6707ea747f1.zip
dev-util/unicorn: fix lto type mismatch
Closes: https://bugs.gentoo.org/858506 Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> Closes: https://github.com/gentoo/gentoo/pull/27484 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-util/unicorn/files/unicorn-2.0.0-lto.patch62
-rw-r--r--dev-util/unicorn/unicorn-2.0.0.ebuild4
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-util/unicorn/files/unicorn-2.0.0-lto.patch b/dev-util/unicorn/files/unicorn-2.0.0-lto.patch
new file mode 100644
index 000000000000..f6bcda2a18f8
--- /dev/null
+++ b/dev-util/unicorn/files/unicorn-2.0.0-lto.patch
@@ -0,0 +1,62 @@
+commit 6d283cf464b82a86f7930e39c91c92ad3cefb58f
+Author: mio <ziqiaokong@outlook.com>
+Date: Sat Jul 23 20:39:01 2022 +0800
+
+ Fix ppc symbols clash
+
+Bug: https://bugs.gentoo.org/872998
+Bug: https://github.com/unicorn-engine/unicorn/issues/1662
+
+diff --git a/qemu/ppc.h b/qemu/ppc.h
+index 7022629e..eff4b69d 100644
+--- a/qemu/ppc.h
++++ b/qemu/ppc.h
+@@ -1708,4 +1708,12 @@
+ #define ppc_dcr_init ppc_dcr_init_ppc
+ #define ppc_cpu_pir ppc_cpu_pir_ppc
+ #define ppc_irq_reset ppc_irq_reset_ppc
++#define store_booke_tsr store_booke_tsr_ppc
++#define get_pteg_offset32 get_pteg_offset32_ppc
++#define ppc_booke_timers_init ppc_booke_timers_init_ppc
++#define ppc_hash32_handle_mmu_fault ppc_hash32_handle_mmu_fault_ppc
++#define gen_helper_store_booke_tsr gen_helper_store_booke_tsr_ppc
++#define gen_helper_store_booke_tcr gen_helper_store_booke_tcr_ppc
++#define store_booke_tcr store_booke_tcr_ppc
++#define ppc_hash32_get_phys_page_debug ppc_hash32_get_phys_page_debug_ppc
+ #endif
+diff --git a/qemu/ppc64.h b/qemu/ppc64.h
+index 992caf87..c08ee2d6 100644
+--- a/qemu/ppc64.h
++++ b/qemu/ppc64.h
+@@ -1708,4 +1708,12 @@
+ #define ppc_dcr_init ppc_dcr_init_ppc64
+ #define ppc_cpu_pir ppc_cpu_pir_ppc64
+ #define ppc_irq_reset ppc_irq_reset_ppc64
++#define store_booke_tsr store_booke_tsr_ppc64
++#define get_pteg_offset32 get_pteg_offset32_ppc64
++#define ppc_booke_timers_init ppc_booke_timers_init_ppc64
++#define ppc_hash32_handle_mmu_fault ppc_hash32_handle_mmu_fault_ppc64
++#define gen_helper_store_booke_tsr gen_helper_store_booke_tsr_ppc64
++#define gen_helper_store_booke_tcr gen_helper_store_booke_tcr_ppc64
++#define store_booke_tcr store_booke_tcr_ppc64
++#define ppc_hash32_get_phys_page_debug ppc_hash32_get_phys_page_debug_ppc64
+ #endif
+diff --git a/symbols.sh b/symbols.sh
+index 2968b959..0d426c00 100755
+--- a/symbols.sh
++++ b/symbols.sh
+@@ -6264,6 +6264,14 @@ ppc_dcr_register \
+ ppc_dcr_init \
+ ppc_cpu_pir \
+ ppc_irq_reset \
++store_booke_tsr \
++get_pteg_offset32 \
++ppc_booke_timers_init \
++ppc_hash32_handle_mmu_fault \
++gen_helper_store_booke_tsr \
++gen_helper_store_booke_tcr \
++store_booke_tcr \
++ppc_hash32_get_phys_page_debug \
+ "
+
+ ppc64_SYMBOLS=${ppc_SYMBOLS}
diff --git a/dev-util/unicorn/unicorn-2.0.0.ebuild b/dev-util/unicorn/unicorn-2.0.0.ebuild
index b50065f271bc..76a25d55547e 100644
--- a/dev-util/unicorn/unicorn-2.0.0.ebuild
+++ b/dev-util/unicorn/unicorn-2.0.0.ebuild
@@ -34,6 +34,10 @@ RDEPEND="python? ( ${PYTHON_DEPS} )"
BDEPEND="virtual/pkgconfig
python? ( ${DISTUTILS_DEPS} )"
+PATCHES=(
+ "${FILESDIR}/${P}-lto.patch"
+)
+
UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc s390x tricore"
wrap_python() {