From d8f42e2ba2bf2785e176cc84b804daab9953e166 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sun, 11 Feb 2024 20:36:33 +0000 Subject: [PATCH] libbacktrace: Use proper patch file to fix shared library --- .../0001-libbacktrace-no-undefined.patch | 12 ++++++++++++ mingw-w64-libbacktrace/PKGBUILD | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 mingw-w64-libbacktrace/0001-libbacktrace-no-undefined.patch diff --git a/mingw-w64-libbacktrace/0001-libbacktrace-no-undefined.patch b/mingw-w64-libbacktrace/0001-libbacktrace-no-undefined.patch new file mode 100644 index 0000000000..cdc874221b --- /dev/null +++ b/mingw-w64-libbacktrace/0001-libbacktrace-no-undefined.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile.am b/Makefile.am +index 5f1d0f8..b6a8595 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -84,6 +84,7 @@ libbacktrace_la_LIBADD = \ + + libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD) + ++libbacktrace_la_LDFLAGS = -no-undefined + # Testsuite. + + # Add a test to this variable if you want it to be built as a program, diff --git a/mingw-w64-libbacktrace/PKGBUILD b/mingw-w64-libbacktrace/PKGBUILD index 2617fcf7b7..8397e1512f 100644 --- a/mingw-w64-libbacktrace/PKGBUILD +++ b/mingw-w64-libbacktrace/PKGBUILD @@ -15,8 +15,10 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-autotools" 'git') source=("git+https://github.com/ianlancetaylor/libbacktrace.git#commit=${_commit}" + "0001-libbacktrace-no-undefined.patch" "libbacktrace.pc") sha256sums=('SKIP' + 'cd4b22ecf0c775407919144a3adcb1a2069829432d65b6e019bfbcc5f3cef91e' '4f17323b633a0d0a80dc1ff29855c0caa7946562aa3a22d2fae4e426122d16ca') pkgver() { @@ -28,7 +30,7 @@ prepare () { cd "${srcdir}/${_realname}" # dont allow undefined symbols to build the dll - sed -i "87ilibbacktrace_la_LDFLAGS = -no-undefined" Makefile.am + git apply "${srcdir}/0001-libbacktrace-no-undefined.patch" autoreconf -vfi }