summaryrefslogtreecommitdiff
path: root/sys-libs/libbacktrace
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-03 01:13:47 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-03 01:13:47 +0100
commit7748146936014bb364c51e2547982e9f59a5f31a (patch)
tree07d616b7c4f3455728c1226ab7a989051efc7f6a /sys-libs/libbacktrace
parenteb2235d914984bff74c625de4fa4887d4f86f971 (diff)
gentoo auto-resync : 03:10:2022 - 01:13:47
Diffstat (limited to 'sys-libs/libbacktrace')
-rw-r--r--sys-libs/libbacktrace/Manifest3
-rw-r--r--sys-libs/libbacktrace/files/libbacktrace-1.0_p20220709-teststatic.patch287
-rw-r--r--sys-libs/libbacktrace/libbacktrace-1.0_p20220709.ebuild45
3 files changed, 335 insertions, 0 deletions
diff --git a/sys-libs/libbacktrace/Manifest b/sys-libs/libbacktrace/Manifest
index fbb35dfcbc12..042bd8ab36d9 100644
--- a/sys-libs/libbacktrace/Manifest
+++ b/sys-libs/libbacktrace/Manifest
@@ -1,3 +1,6 @@
+AUX libbacktrace-1.0_p20220709-teststatic.patch 13681 BLAKE2B 02ea2efbd9c2259bb0f1310045a5cd7f92af147e37104ebe8c4c1b309965396210630cc41a5e47bad6fa82c03d9d49897a41ffe332a90c315d5b04464c1ada25 SHA512 54d8a2e548cfa3faca254e4878017a0262a4ebd5bce7383bc1ac23d8c92f372e6078047a975bf8092789e6af3628783fdb514e2d384f9f5da6509e98ab329c97
DIST libbacktrace-1.0_p20220226.tgz 665988 BLAKE2B 0d8aff7f6261446fabe713653896b0cf2fec2d3aec508423577182383a7deb359100579817eaf64d65848c49ce655d8f57cf67452f16e3c88559aeae28cafd95 SHA512 700cb1930c409e4f1fe99e46920e83ea2b359daaea9f96e2b73b81857dea895c0ade0fc2b4dbe6b7c94df7d494dcd80a9f6686d9acad8452ca59760aafa74c2f
+DIST libbacktrace-1.0_p20220709.tar.gz 666166 BLAKE2B 1b35e0dafe31bc5d4fcc826f87f2e8200c27a4194719ee22d278b25fe081ec604e579aee72ebd7ea6d401b1a5bbc4b496b1083e3d761117bc3ccf23aabe046eb SHA512 8f303ff11250cbc644c91a07a55ffb1c6d52ca5eb76e3ea9405645bdd00715a25f57d1f39c7af16efbbe5b008ec76890f7fb3bca95eb89e7cd9a55c14a211643
EBUILD libbacktrace-1.0_p20220226.ebuild 520 BLAKE2B 87c85657c75b005b9c3a1237887c967b57339cc3eed3ed5b79d2ea67cd3f69b14d468d982caf897af8f51a3d1f78476e25a22aa24a2bb51fd461eaea0829b6a4 SHA512 7d9e81365b513da810942113c8ebd45ff455d2adaa92e369ddfab0d8d240f1bf7ee0314e603e96c435193153e0685eff3517b91d2bdfd26e97b221d51e599b20
+EBUILD libbacktrace-1.0_p20220709.ebuild 891 BLAKE2B 3a7b72ef7127ff2402d407c6e016a0546c58dc06a62efc74c00aa9fc43a0b9b8ca3bac023976f3bd0eea9a8f4574d26714ac4ea102702bc8384fb3260f6274ee SHA512 65f3f47639ad626146b6f92f80d5b456240ecfe510f9019149d64ff720fc88ccf25695cf55654573fd611abcc1384152573e40645b40b3fa9250621cc2a072fe
MISC metadata.xml 253 BLAKE2B 18358124554750550f4d403241c450e59df895e455eaa1b442ed49b3b3f72e4bc25d43aa3e23aae3fa932b8d22bc64de55c8166b749c9219b911b15971083250 SHA512 d69655b8f85ce0d4eba55033e667a0b697844773a17f91bc0f3bdb05b42f2208db2fb58d2d7ee58acadb9586af246dd2cf6d7cef04b66b0db4721fa941b3ae54
diff --git a/sys-libs/libbacktrace/files/libbacktrace-1.0_p20220709-teststatic.patch b/sys-libs/libbacktrace/files/libbacktrace-1.0_p20220709-teststatic.patch
new file mode 100644
index 000000000000..7b160c93ef80
--- /dev/null
+++ b/sys-libs/libbacktrace/files/libbacktrace-1.0_p20220709-teststatic.patch
@@ -0,0 +1,287 @@
+From 831887cbaff488ceef489b2415b93f681a734373 Mon Sep 17 00:00:00 2001
+From: Matt Whitlock <libbacktrace@mattwhitlock.name>
+Date: Fri, 16 Sep 2022 00:09:44 -0400
+Subject: [PATCH] libbacktrace: always link test programs statically
+
+When configured with --enable-shared, libtool was linking the test
+programs dynamically and placing the real binaries in .libs/ and wrapper
+scripts in the build root. objcopy pukes when given these wrapper
+scripts as input. The simplest workaround is to link libbacktrace into
+the test programs statically.
+---
+ Makefile.am | 14 ++++++++++++--
+ Makefile.in | 34 ++++++++++++++++++++++------------
+ 2 files changed, 34 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 598e6cb..37ff3f6 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -213,6 +213,7 @@ BUILDTESTS += test_unknown
+
+ unittest_SOURCES = unittest.c testlib.c
+ unittest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++unittest_LDFLAGS = -static
+ unittest_LDADD = libbacktrace.la
+
+ BUILDTESTS += unittest
+@@ -276,6 +277,7 @@ endif HAVE_ELF
+
+ btest_SOURCES = btest.c testlib.c
+ btest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
++btest_LDFLAGS = -static
+ btest_LDADD = libbacktrace.la
+
+ BUILDTESTS += btest
+@@ -288,6 +290,7 @@ if HAVE_ELF
+
+ btest_lto_SOURCES = btest.c testlib.c
+ btest_lto_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O -flto
++btest_lto_LDFLAGS = -static
+ btest_lto_LDADD = libbacktrace.la
+
+ BUILDTESTS += btest_lto
+@@ -330,6 +333,7 @@ endif HAVE_DWZ
+
+ stest_SOURCES = stest.c
+ stest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++stest_LDFLAGS = -static
+ stest_LDADD = libbacktrace.la
+
+ BUILDTESTS += stest
+@@ -352,6 +356,7 @@ if HAVE_ELF
+
+ ztest_SOURCES = ztest.c testlib.c
+ ztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
++ztest_LDFLAGS = -static
+ ztest_LDADD = libbacktrace.la
+ ztest_alloc_LDADD = libbacktrace_alloc.la
+
+@@ -373,6 +378,7 @@ endif HAVE_ELF
+
+ edtest_SOURCES = edtest.c edtest2_build.c testlib.c
+ edtest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++edtest_LDFLAGS = -static
+ edtest_LDADD = libbacktrace.la
+
+ BUILDTESTS += edtest
+@@ -403,6 +409,7 @@ BUILDTESTS += ttest
+
+ ttest_SOURCES = ttest.c testlib.c
+ ttest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -pthread
++ttest_LDFLAGS = -static
+ ttest_LDADD = libbacktrace.la
+
+ if USE_DSYMUTIL
+@@ -441,12 +448,12 @@ if HAVE_COMPRESSED_DEBUG
+
+ ctestg_SOURCES = btest.c testlib.c
+ ctestg_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+-ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu
++ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu -static
+ ctestg_LDADD = libbacktrace.la
+
+ ctesta_SOURCES = btest.c testlib.c
+ ctesta_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+-ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi
++ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi -static
+ ctesta_LDADD = libbacktrace.la
+
+ BUILDTESTS += ctestg ctesta
+@@ -469,6 +476,7 @@ if HAVE_DWARF5
+
+ dwarf5_SOURCES = btest.c testlib.c
+ dwarf5_CFLAGS = $(libbacktrace_TEST_CFLAGS) -gdwarf-5
++dwarf5_LDFLAGS = -static
+ dwarf5_LDADD = libbacktrace.la
+
+ BUILDTESTS += dwarf5
+@@ -491,6 +499,7 @@ endif
+
+ mtest_SOURCES = mtest.c testlib.c
+ mtest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
++mtest_LDFLAGS = -static
+ mtest_LDADD = libbacktrace.la
+
+ BUILDTESTS += mtest
+@@ -523,6 +532,7 @@ if HAVE_ELF
+
+ xztest_SOURCES = xztest.c testlib.c
+ xztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
++xztest_LDFLAGS = -static
+ xztest_LDADD = libbacktrace.la
+
+ xztest_alloc_SOURCES = $(xztest_SOURCES)
+diff --git a/Makefile.in b/Makefile.in
+index e05b149..8283023 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -304,7 +304,7 @@ btest_OBJECTS = $(am_btest_OBJECTS)
+ @NATIVE_TRUE@btest_DEPENDENCIES = libbacktrace.la
+ btest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(btest_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(btest_LDFLAGS) $(LDFLAGS) -o $@
+ @NATIVE_TRUE@am__objects_4 = btest_alloc-btest.$(OBJEXT) \
+ @NATIVE_TRUE@ btest_alloc-testlib.$(OBJEXT)
+ @NATIVE_TRUE@am_btest_alloc_OBJECTS = $(am__objects_4)
+@@ -320,7 +320,7 @@ btest_lto_OBJECTS = $(am_btest_lto_OBJECTS)
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@btest_lto_DEPENDENCIES = libbacktrace.la
+ btest_lto_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(btest_lto_CFLAGS) \
+- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(CFLAGS) $(btest_lto_LDFLAGS) $(LDFLAGS) -o $@
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am_ctesta_OBJECTS = ctesta-btest.$(OBJEXT) \
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ ctesta-testlib.$(OBJEXT)
+ ctesta_OBJECTS = $(am_ctesta_OBJECTS)
+@@ -362,7 +362,7 @@ dwarf5_OBJECTS = $(am_dwarf5_OBJECTS)
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@dwarf5_DEPENDENCIES = libbacktrace.la
+ dwarf5_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dwarf5_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(dwarf5_LDFLAGS) $(LDFLAGS) -o $@
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@am__objects_7 = \
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@ dwarf5_alloc-btest.$(OBJEXT) \
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@ dwarf5_alloc-testlib.$(OBJEXT)
+@@ -381,7 +381,7 @@ edtest_OBJECTS = $(am_edtest_OBJECTS)
+ @NATIVE_TRUE@edtest_DEPENDENCIES = libbacktrace.la
+ edtest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(edtest_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(edtest_LDFLAGS) $(LDFLAGS) -o $@
+ @NATIVE_TRUE@am__objects_8 = edtest_alloc-edtest.$(OBJEXT) \
+ @NATIVE_TRUE@ edtest_alloc-edtest2_build.$(OBJEXT) \
+ @NATIVE_TRUE@ edtest_alloc-testlib.$(OBJEXT)
+@@ -397,13 +397,13 @@ mtest_OBJECTS = $(am_mtest_OBJECTS)
+ @NATIVE_TRUE@mtest_DEPENDENCIES = libbacktrace.la
+ mtest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(mtest_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(mtest_LDFLAGS) $(LDFLAGS) -o $@
+ @NATIVE_TRUE@am_stest_OBJECTS = stest-stest.$(OBJEXT)
+ stest_OBJECTS = $(am_stest_OBJECTS)
+ @NATIVE_TRUE@stest_DEPENDENCIES = libbacktrace.la
+ stest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(stest_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(stest_LDFLAGS) $(LDFLAGS) -o $@
+ @NATIVE_TRUE@am__objects_9 = stest_alloc-stest.$(OBJEXT)
+ @NATIVE_TRUE@am_stest_alloc_OBJECTS = $(am__objects_9)
+ stest_alloc_OBJECTS = $(am_stest_alloc_OBJECTS)
+@@ -480,7 +480,7 @@ ttest_OBJECTS = $(am_ttest_OBJECTS)
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_DEPENDENCIES = libbacktrace.la
+ ttest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ttest_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(ttest_LDFLAGS) $(LDFLAGS) -o $@
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__objects_10 = \
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ ttest_alloc-ttest.$(OBJEXT) \
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ ttest_alloc-testlib.$(OBJEXT)
+@@ -498,7 +498,7 @@ unittest_OBJECTS = $(am_unittest_OBJECTS)
+ @NATIVE_TRUE@unittest_DEPENDENCIES = libbacktrace.la
+ unittest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(unittest_CFLAGS) \
+- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(CFLAGS) $(unittest_LDFLAGS) $(LDFLAGS) -o $@
+ @NATIVE_TRUE@am__objects_11 = unittest_alloc-unittest.$(OBJEXT) \
+ @NATIVE_TRUE@ unittest_alloc-testlib.$(OBJEXT)
+ @NATIVE_TRUE@am_unittest_alloc_OBJECTS = $(am__objects_11)
+@@ -515,7 +515,7 @@ xztest_OBJECTS = $(am_xztest_OBJECTS)
+ @HAVE_ELF_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ xztest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(xztest_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(xztest_LDFLAGS) $(LDFLAGS) -o $@
+ @HAVE_ELF_TRUE@am__objects_12 = xztest_alloc-xztest.$(OBJEXT) \
+ @HAVE_ELF_TRUE@ xztest_alloc-testlib.$(OBJEXT)
+ @HAVE_ELF_TRUE@am_xztest_alloc_OBJECTS = $(am__objects_12)
+@@ -533,7 +533,7 @@ ztest_OBJECTS = $(am_ztest_OBJECTS)
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__DEPENDENCIES_1)
+ ztest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ztest_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(ztest_LDFLAGS) $(LDFLAGS) -o $@
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@am__objects_13 = \
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@ ztest_alloc-ztest.$(OBJEXT) \
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@ ztest_alloc-testlib.$(OBJEXT)
+@@ -1040,6 +1040,7 @@ libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
+ @NATIVE_TRUE@test_unknown_LDADD = libbacktrace_noformat.la unknown.lo
+ @NATIVE_TRUE@unittest_SOURCES = unittest.c testlib.c
+ @NATIVE_TRUE@unittest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++@NATIVE_TRUE@unittest_LDFLAGS = -static
+ @NATIVE_TRUE@unittest_LDADD = libbacktrace.la
+ @NATIVE_TRUE@unittest_alloc_SOURCES = $(unittest_SOURCES)
+ @NATIVE_TRUE@unittest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+@@ -1064,21 +1065,25 @@ libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
+ @HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_LDADD = libbacktrace_elf_for_test.la
+ @NATIVE_TRUE@btest_SOURCES = btest.c testlib.c
+ @NATIVE_TRUE@btest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
++@NATIVE_TRUE@btest_LDFLAGS = -static
+ @NATIVE_TRUE@btest_LDADD = libbacktrace.la
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@btest_lto_SOURCES = btest.c testlib.c
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@btest_lto_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O -flto
++@HAVE_ELF_TRUE@@NATIVE_TRUE@btest_lto_LDFLAGS = -static
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@btest_lto_LDADD = libbacktrace.la
+ @NATIVE_TRUE@btest_alloc_SOURCES = $(btest_SOURCES)
+ @NATIVE_TRUE@btest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+ @NATIVE_TRUE@btest_alloc_LDADD = libbacktrace_alloc.la
+ @NATIVE_TRUE@stest_SOURCES = stest.c
+ @NATIVE_TRUE@stest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++@NATIVE_TRUE@stest_LDFLAGS = -static
+ @NATIVE_TRUE@stest_LDADD = libbacktrace.la
+ @NATIVE_TRUE@stest_alloc_SOURCES = $(stest_SOURCES)
+ @NATIVE_TRUE@stest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+ @NATIVE_TRUE@stest_alloc_LDADD = libbacktrace_alloc.la
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_SOURCES = ztest.c testlib.c
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
++@HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_LDFLAGS = -static
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_LDADD = libbacktrace.la \
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@ $(am__append_14) \
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@ $(CLOCK_GETTIME_LINK)
+@@ -1089,23 +1094,25 @@ libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
+ @HAVE_ELF_TRUE@@NATIVE_TRUE@ztest_alloc_CFLAGS = $(ztest_CFLAGS)
+ @NATIVE_TRUE@edtest_SOURCES = edtest.c edtest2_build.c testlib.c
+ @NATIVE_TRUE@edtest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++@NATIVE_TRUE@edtest_LDFLAGS = -static
+ @NATIVE_TRUE@edtest_LDADD = libbacktrace.la
+ @NATIVE_TRUE@edtest_alloc_SOURCES = $(edtest_SOURCES)
+ @NATIVE_TRUE@edtest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+ @NATIVE_TRUE@edtest_alloc_LDADD = libbacktrace_alloc.la
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_SOURCES = ttest.c testlib.c
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -pthread
++@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_LDFLAGS = -static
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_LDADD = libbacktrace.la
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_alloc_SOURCES = $(ttest_SOURCES)
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_alloc_CFLAGS = $(ttest_CFLAGS)
+ @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_alloc_LDADD = libbacktrace_alloc.la
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_SOURCES = btest.c testlib.c
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+-@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu
++@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu -static
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_LDADD = libbacktrace.la
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_SOURCES = btest.c testlib.c
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+-@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi
++@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi -static
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_LDADD = libbacktrace.la
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_alloc_SOURCES = $(ctestg_SOURCES)
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctestg_alloc_CFLAGS = $(ctestg_CFLAGS)
+@@ -1117,15 +1124,18 @@ libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
+ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ctesta_alloc_LDADD = libbacktrace_alloc.la
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@dwarf5_SOURCES = btest.c testlib.c
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@dwarf5_CFLAGS = $(libbacktrace_TEST_CFLAGS) -gdwarf-5
++@HAVE_DWARF5_TRUE@@NATIVE_TRUE@dwarf5_LDFLAGS = -static
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@dwarf5_LDADD = libbacktrace.la
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@dwarf5_alloc_SOURCES = $(dwarf5_SOURCES)
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@dwarf5_alloc_CFLAGS = $(dwarf5_CFLAGS)
+ @HAVE_DWARF5_TRUE@@NATIVE_TRUE@dwarf5_alloc_LDADD = libbacktrace_alloc.la
+ @NATIVE_TRUE@mtest_SOURCES = mtest.c testlib.c
+ @NATIVE_TRUE@mtest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
++@NATIVE_TRUE@mtest_LDFLAGS = -static
+ @NATIVE_TRUE@mtest_LDADD = libbacktrace.la
+ @HAVE_ELF_TRUE@xztest_SOURCES = xztest.c testlib.c
+ @HAVE_ELF_TRUE@xztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
++@HAVE_ELF_TRUE@xztest_LDFLAGS = -static
+ @HAVE_ELF_TRUE@xztest_LDADD = libbacktrace.la $(am__append_27) \
+ @HAVE_ELF_TRUE@ $(CLOCK_GETTIME_LINK)
+ @HAVE_ELF_TRUE@xztest_alloc_SOURCES = $(xztest_SOURCES)
diff --git a/sys-libs/libbacktrace/libbacktrace-1.0_p20220709.ebuild b/sys-libs/libbacktrace/libbacktrace-1.0_p20220709.ebuild
new file mode 100644
index 000000000000..bf0e1a15abf2
--- /dev/null
+++ b/sys-libs/libbacktrace/libbacktrace-1.0_p20220709.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A C library that may be linked into a C/C++ program to produce symbolic backtraces"
+HOMEPAGE="https://github.com/ianlancetaylor/libbacktrace"
+
+COMMITHASH="8602fda64e78f1f46563220f2ee9f7e70819c51d"
+SRC_URI="https://github.com/ianlancetaylor/libbacktrace/archive/${COMMITHASH}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMITHASH}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/libbacktrace-1.0_p20220709-teststatic.patch"
+)
+
+BDEPEND="
+ test? (
+ app-arch/xz-utils
+ sys-libs/zlib
+ )
+"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-shared \
+ $(use_enable static{-libs,})
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}