diff options
author | he <he@pkgsrc.org> | 2020-10-18 17:06:35 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2020-10-18 17:06:35 +0000 |
commit | 5d5c6d3d7a4e688fc4173d655ea909740586b750 (patch) | |
tree | 182a46e31e294858a999a8aa205fa9ad5bed8340 /lang/libunwind/patches | |
parent | 42ab4cbf7da672799297b418ddeba751382d0236 (diff) | |
download | pkgsrc-5d5c6d3d7a4e688fc4173d655ea909740586b750.tar.gz |
Make this build on NetBSD/macppc 9.0, where gcc doesn't predefine
__ppc__, only __powerpc__, so compensate.
PKGREVISION bumped.
Diffstat (limited to 'lang/libunwind/patches')
5 files changed, 75 insertions, 0 deletions
diff --git a/lang/libunwind/patches/patch-include_____libunwind__config.h b/lang/libunwind/patches/patch-include_____libunwind__config.h new file mode 100644 index 00000000000..9bca857a12c --- /dev/null +++ b/lang/libunwind/patches/patch-include_____libunwind__config.h @@ -0,0 +1,15 @@ +$NetBSD: patch-include_____libunwind__config.h,v 1.1 2020/10/18 17:06:35 he Exp $ + +Gcc doesn't define __ppc__, but defines __powerpc__ on NetBSD/powerpc. + +--- include/__libunwind_config.h.orig 2020-07-07 16:21:37.000000000 +0000 ++++ include/__libunwind_config.h +@@ -50,7 +50,7 @@ + # define _LIBUNWIND_CONTEXT_SIZE 167 + # define _LIBUNWIND_CURSOR_SIZE 179 + # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64 +-# elif defined(__ppc__) ++# elif defined(__ppc__) || defined(__powerpc__) + # define _LIBUNWIND_TARGET_PPC 1 + # define _LIBUNWIND_CONTEXT_SIZE 117 + # define _LIBUNWIND_CURSOR_SIZE 124 diff --git a/lang/libunwind/patches/patch-src_UnwindRegistersRestore.S b/lang/libunwind/patches/patch-src_UnwindRegistersRestore.S new file mode 100644 index 00000000000..38e49a332ec --- /dev/null +++ b/lang/libunwind/patches/patch-src_UnwindRegistersRestore.S @@ -0,0 +1,15 @@ +$NetBSD: patch-src_UnwindRegistersRestore.S,v 1.1 2020/10/18 17:06:35 he Exp $ + +Gcc doesn't define __ppc__, but defines __powerpc__ on NetBSD/powerpc. + +--- src/UnwindRegistersRestore.S.orig 2020-07-07 16:21:37.000000000 +0000 ++++ src/UnwindRegistersRestore.S +@@ -392,7 +392,7 @@ Lnovec: + PPC64_LR(3) + bctr + +-#elif defined(__ppc__) ++#elif defined(__ppc__) || defined(__powerpc__) + + DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv) + // diff --git a/lang/libunwind/patches/patch-src_UnwindRegistersSave.S b/lang/libunwind/patches/patch-src_UnwindRegistersSave.S new file mode 100644 index 00000000000..e0f84177934 --- /dev/null +++ b/lang/libunwind/patches/patch-src_UnwindRegistersSave.S @@ -0,0 +1,15 @@ +$NetBSD: patch-src_UnwindRegistersSave.S,v 1.1 2020/10/18 17:06:35 he Exp $ + +Gcc doesn't define __ppc__, but defines __powerpc__ on NetBSD/powerpc. + +--- src/UnwindRegistersSave.S.orig 2020-07-07 16:21:37.000000000 +0000 ++++ src/UnwindRegistersSave.S +@@ -554,7 +554,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getconte + blr + + +-#elif defined(__ppc__) ++#elif defined(__ppc__) || defined(__powerpc__) + + // + // extern int unw_getcontext(unw_context_t* thread_state) diff --git a/lang/libunwind/patches/patch-src_config.h b/lang/libunwind/patches/patch-src_config.h new file mode 100644 index 00000000000..197c5039b96 --- /dev/null +++ b/lang/libunwind/patches/patch-src_config.h @@ -0,0 +1,15 @@ +$NetBSD: patch-src_config.h,v 1.1 2020/10/18 17:06:35 he Exp $ + +Gcc doesn't define __ppc__, but defines __powerpc__ on NetBSD/powerpc. + +--- src/config.h.orig 2020-07-07 16:21:37.000000000 +0000 ++++ src/config.h +@@ -95,7 +95,7 @@ + #define _LIBUNWIND_BUILD_SJLJ_APIS + #endif + +-#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__) ++#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__) || defined(__powerpc__) + #define _LIBUNWIND_SUPPORT_FRAME_APIS + #endif + diff --git a/lang/libunwind/patches/patch-src_libunwind.cpp b/lang/libunwind/patches/patch-src_libunwind.cpp new file mode 100644 index 00000000000..d169f1712c8 --- /dev/null +++ b/lang/libunwind/patches/patch-src_libunwind.cpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_libunwind.cpp,v 1.1 2020/10/18 17:06:35 he Exp $ + +Gcc doesn't define __ppc__, but defines __powerpc__ on NetBSD/powerpc. + +--- src/libunwind.cpp.orig 2020-07-07 16:21:37.000000000 +0000 ++++ src/libunwind.cpp +@@ -42,7 +42,7 @@ _LIBUNWIND_HIDDEN int __unw_init_local(u + # define REGISTER_KIND Registers_x86_64 + #elif defined(__powerpc64__) + # define REGISTER_KIND Registers_ppc64 +-#elif defined(__ppc__) ++#elif defined(__ppc__) || defined(__powerpc__) + # define REGISTER_KIND Registers_ppc + #elif defined(__aarch64__) + # define REGISTER_KIND Registers_arm64 |