The primary goal of this project is to define a portable and efficient C
programming interface (API) to determine the call-chain of a program. The API
additionally provides the means to manipulate the preserved (callee-saved) state
of each call-frame and to resume execution at any point in the call-chain
(non-local goto). The API supports both local (same-process) and remote
(across-process) operation. As such, the API is useful in a number of
applications. Some examples include:
- exception handling
The libunwind API makes it trivial to implement the stack-manipulation aspects
of exception handling.
- debuggers
The libunwind API makes it trivial for debuggers to generate the call-chain
(backtrace) of the threads in a running program.
- introspection
It is often useful for a running thread to determine its call-chain. For
example, this is useful to display error messages (to show how the error came
about) and for performance monitoring/analysis.
- efficient setjmp()
With libunwind, it is possible to implement an extremely efficient version of
setjmp(). Effectively, the only context that needs to be saved consists of the
stack-pointer(s).
devel/libunwind: link with -lgcc on armv7
This is required to get the __aeabi_uidivmod symbol. Random ports that
use libunwind fail to build or work if that symbol is not present.
Discussed with: andrew
Approved by: portmgr (build fix blanket)
MFH: 2025Q1
devel/libunwind: Clean up unwind.h patch
- Bump PORTREVISION for package change
unwind.h was installed to /usr/include in mid-February, 2022.
Since all supported FreeBSD releases have /usr/include/unwind.h, this patch is
no longer needed.
Reviewed by: tijl
Reference: https://cgit.freebsd.org/ports/commit/?id=975a5c1057579603c4041c2b8e3ac0933ea0eb89
devel/libunwind: fix packaging on powerpc64*
pkg-static: Unable to access file
/wrkdirs/usr/ports/devel/libunwind/work/stage/usr/local/include/libunwind-ppc3264le.h:No
such file or directory
pkg-static: Unable to access file
/wrkdirs/usr/ports/devel/libunwind/work/stage/usr/local/lib/libunwind-ppc3264le.a:No
such file or directory
pkg-static: Unable to access file
/wrkdirs/usr/ports/devel/libunwind/work/stage/usr/local/lib/libunwind-ppc3264le.so:No
such file or directory
pkg-static: Unable to access file
/wrkdirs/usr/ports/devel/libunwind/work/stage/usr/local/lib/libunwind-ppc3264le.so.8:No
such file or directory
pkg-static: Unable to access file
/wrkdirs/usr/ports/devel/libunwind/work/stage/usr/local/lib/libunwind-ppc3264le.so.8.0.1:No
such file or directory
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
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'
(Only the first 15 lines of the commit message are shown above )
devel: remove 'Created by' lines
A big Thank You to the original contributors of these ports:
* "Waitman Gobble" <uzimac@da3m0n8t3r.com>
* <jkoshy@FreeBSD.org>
* Aaron Dalton <aaron@FreeBSD.org>
* Aaron Dalton <aaron@daltons.ca>
* Aaron H. K. Diep <ahkdiep@gmail.com>
* Aaron Hurt <ahurt@anbcs.com>
* Abel Chow <abel_chow@yahoo.com>
* Adam McLaurin
* Adam Saponara <as@php.net>
* Adam Weinberger <adamw@FreeBSD.org>
* Ade Lovett <ade@FreeBSD.org>
(Only the first 15 lines of the commit message are shown above )
devel/libunwind: use base system unwind.h
- Add --disable-cxx-exceptions so libunwind does not implement the
_Unwind_* API and does not use its internal unwind.h. The base
system libgcc_s provides this API. This was already the upstream
default for most architectures.
- Add --disable-unwind-header to prevent installation of unwind.h.
Instead, install an unwind.h that forwards to the base system
unwind.h, but not on FreeBSD 14 where all implementations of
unwind.h (base, lang/gcc*, and devel/llvm*) are compatible.
PR: 263370
Approved by: sunpoet
devel/libunwind: Fix build with -fno-common
Fix the build of devel/libunwind with -fno-common (the default on FreeBSD
current after the llvm 11 update).
Add an upstream patch (pulling it from the official github mirror) to fix
the build woth -fno-common.
Port to aarch64. Tested for no-harm on amd64.
While here, pet portlint.
PR: 229057
Submitted by: greg at unrelenting.technology
Approved by: portmgr (tier-2 blanket)
devel/libunwind: set LLD_UNSAFE
libunwind.so has symbols with ELF protected visibility which various
test applications could preempt. Both GNU gold and LLVM's lld fail to
link this case, with errors like
lld:
/usr/bin/ld: error: cannot preempt symbol: _ULx86_64_init_local
>>> defined in ../src/.libs/libunwind.so
>>> referenced by Lperf-trace.c
>>> Lperf-trace.o:(main)
gold:
/usr/local/bin/ld.gold: error: Gperf-simple.o: cannot make copy relocation
for protected symbol '_Ux86_64_local_addr_space', defined in
../src/.libs/libunwind-x86_64.so
For now prevent libunwind from linking with lld. More information can be
found in libunwind upstream issue 58
https://github.com/libunwind/libunwind/issues/58
PR: 219524
Approved by: portmgr (LLD_UNSAFE blanket)
Sponsored by: The FreeBSD Foundation
- Add DOCS option. The configure script looks for latex2man tool to install docs
but
the man files are already built in the package, so we are just installing
them.
PR: 219582
Submitted by: John Hein
Use USES=pathfix where applicable.
PR: 213195
Submitted by: mat
Exp-run by: antoine
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D8093
The MAP_NORESERVE flag to mmap() has never been implemented in FreeBSD and
is being removed. No portrev bump needed since the kernel will continue to
accept this flag for old binaries even after support for it in new binaries
is removed.
PR: 193961
Approved by: portmgr (antoine)
- Return my ports back to the pool. I was unable to make any fixes to
my ports in the past 3 weeks while ports were broken on any 10.x
machines, which means I'm unable to maintain them. So let people know
that there's no available support for them until things are back to
normal (which also means that anyone with spare time will be able
to fix them without getting approval).
- Fix the unwind.h header, so it can be used in C++ applications.
Reported by: David Chisnall <theraven@theravensnest.org>
Untested by: me, because I don't have a working ports tree anymore