pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-git: Add patch sent upstream for _Unwind_Ptr
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sun Jun 4 17:41:23 2017 +0200
Changeset: 9b17225d493386d2723579a06eaedadf00c8917d
Modified Files:
compiler-rt-git/distinfo
Added Files:
compiler-rt-git/patches/patch-lib_builtins_gcc__personality__v0.c
Log Message:
compiler-rt-git: Add patch sent upstream for _Unwind_Ptr
Handle NetBSD specific _Unwind_Ptr
https://reviews.llvm.org/D33878
Sponsored by <The NetBSD Foundation>
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9b17225d493386d2723579a06eaedadf00c8917d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-git/distinfo | 1 +
.../patch-lib_builtins_gcc__personality__v0.c | 45 ++++++++++++++++++++++
2 files changed, 46 insertions(+)
diffs:
diff --git a/compiler-rt-git/distinfo b/compiler-rt-git/distinfo
index 7931384fd5..5d25ab1939 100644
--- a/compiler-rt-git/distinfo
+++ b/compiler-rt-git/distinfo
@@ -12,3 +12,4 @@ Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
+SHA1 (patch-lib_builtins_gcc__personality__v0.c) = 0a48656e68614730ea05e8fb2588434e774b3c45
diff --git a/compiler-rt-git/patches/patch-lib_builtins_gcc__personality__v0.c b/compiler-rt-git/patches/patch-lib_builtins_gcc__personality__v0.c
new file mode 100644
index 0000000000..2d9021ff16
--- /dev/null
+++ b/compiler-rt-git/patches/patch-lib_builtins_gcc__personality__v0.c
@@ -0,0 +1,45 @@
+$NetBSD$
+
+--- lib/builtins/gcc_personality_v0.c.orig 2017-06-03 23:53:58.000000000 +0000
++++ lib/builtins/gcc_personality_v0.c
+@@ -24,6 +24,12 @@
+ #include "unwind-ehabi-helpers.h"
+ #endif
+
++#if defined(__NetBSD__)
++#define TYPE_UNWIND_PTR void*
++#else
++#define TYPE_UNWIND_PTR uintptr_t
++#endif
++
+ /*
+ * Pointer encodings documented at:
+ * http://refspecs.freestandards.org/LSB_1.3.0/gLSB/gLSB/ehframehdr.html
+@@ -206,8 +212,8 @@ __gcc_personality_v0(int version, _Unwin
+ if ( lsda == (uint8_t*) 0 )
+ return continueUnwind(exceptionObject, context);
+
+- uintptr_t pc = _Unwind_GetIP(context)-1;
+- uintptr_t funcStart = _Unwind_GetRegionStart(context);
++ uintptr_t pc = (uintptr_t)_Unwind_GetIP(context) - 1;
++ uintptr_t funcStart = (uintptr_t)_Unwind_GetRegionStart(context);
+ uintptr_t pcOffset = pc - funcStart;
+
+ /* Parse LSDA header. */
+@@ -239,9 +245,9 @@ __gcc_personality_v0(int version, _Unwin
+ * to take two parameters in registers.
+ */
+ _Unwind_SetGR(context, __builtin_eh_return_data_regno(0),
+- (uintptr_t)exceptionObject);
++ (TYPE_UNWIND_PTR)exceptionObject);
+ _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), 0);
+- _Unwind_SetIP(context, (funcStart + landingPad));
++ _Unwind_SetIP(context, (TYPE_UNWIND_PTR)(funcStart + landingPad));
+ return _URC_INSTALL_CONTEXT;
+ }
+ }
+@@ -249,4 +255,3 @@ __gcc_personality_v0(int version, _Unwin
+ /* No landing pad found, continue unwinding. */
+ return continueUnwind(exceptionObject, context);
+ }
+-
Home |
Main Index |
Thread Index |
Old Index