FreeBSD Bugzilla – Attachment 235558 Details for
Bug 265519
devel/libunwind: fix build with clang 15
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
devel/libunwind: fix build with clang 15
devel__libunwind-fix-clang15-1.diff (text/plain), 3.13 KB, created by
Dimitry Andric
on 2022-07-30 13:57:26 UTC
(
hide
)
Description:
devel/libunwind: fix build with clang 15
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2022-07-30 13:57:26 UTC
Size:
3.13 KB
patch
obsolete
>commit 31e02d4923ce57b4dbe8f0517aaddad1aa023c67 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Sat Jul 30 15:54:37 2022 +0200 > > devel/libunwind: fix build with clang 15 > > Building libunwind with clang results in multiple errors: > > setjmp/siglongjmp.c:111:48: error: incompatible pointer to integer conversion passing 'unw_word_t *' (aka 'unsigned long *') to parameter of type 'unw_word_t' (aka 'unsigned long'); remove & [-Wint-conversion] > if (unw_set_reg (&c, UNW_REG_EH + 2, &wp[JB_MASK]) < 0) > ^~~~~~~~~~~~ > ../include/libunwind-common.h:283:56: note: passing argument to parameter here > extern int unw_set_reg (unw_cursor_t *, int, unw_word_t); > ^ > > dwarf/Gparser.c:901:5: error: call to undeclared function '_Ux86_64_stash_frame'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > tdep_stash_frame (c, rs); > ^ > ../include/tdep-x86_64/libunwind_i.h:246:41: note: expanded from macro 'tdep_stash_frame' > #define tdep_stash_frame UNW_OBJ(stash_frame) > ^ > > The first error is because the syntax is indeed wrong, the '&' should be > removed. > > The second error is because tdep_stash_frame() is only declared for > Linux in libunwind_i.h, but it is used in Gparser.c. Declare it > unconditionally to fix the problem. > >diff --git a/devel/libunwind/files/patch-include_tdep-x86__64_libunwind__i.h b/devel/libunwind/files/patch-include_tdep-x86__64_libunwind__i.h >new file mode 100644 >index 000000000000..51d4a15c8757 >--- /dev/null >+++ b/devel/libunwind/files/patch-include_tdep-x86__64_libunwind__i.h >@@ -0,0 +1,13 @@ >+--- include/tdep-x86_64/libunwind_i.h.orig 2021-11-26 16:58:55 UTC >++++ include/tdep-x86_64/libunwind_i.h >+@@ -288,9 +288,9 @@ extern void tdep_reuse_frame (struct dwarf_cursor *c, >+ extern int tdep_cache_frame (struct dwarf_cursor *c); >+ extern void tdep_reuse_frame (struct dwarf_cursor *c, >+ int frame); >++#endif >+ extern void tdep_stash_frame (struct dwarf_cursor *c, >+ struct dwarf_reg_state *rs); >+-#endif >+ >+ extern int tdep_getcontext_trace (unw_tdep_context_t *); >+ extern int tdep_trace (unw_cursor_t *cursor, void **addresses, int *n); >diff --git a/devel/libunwind/files/patch-src_setjmp_siglongjmp.c b/devel/libunwind/files/patch-src_setjmp_siglongjmp.c >new file mode 100644 >index 000000000000..61728ff11f02 >--- /dev/null >+++ b/devel/libunwind/files/patch-src_setjmp_siglongjmp.c >@@ -0,0 +1,11 @@ >+--- src/setjmp/siglongjmp.c.orig 2020-11-10 16:14:18 UTC >++++ src/setjmp/siglongjmp.c >+@@ -108,7 +108,7 @@ siglongjmp (sigjmp_buf env, int val) >+ && unw_set_reg (&c, UNW_REG_EH + 3, wp[JB_MASK + 1]) < 0)) >+ abort (); >+ #elif defined(__FreeBSD__) >+- if (unw_set_reg (&c, UNW_REG_EH + 2, &wp[JB_MASK]) < 0) >++ if (unw_set_reg (&c, UNW_REG_EH + 2, wp[JB_MASK]) < 0) >+ abort(); >+ #else >+ #error Port me
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 265519
: 235558