Skip to content

Commit 918c1ee

Browse files
committed
fix(main/binutils-libs): Downgrade a new llvm error so we can keep building.
Saw this in termux#18758. llvm appears to have upgraded a warning to an error (https://reviews.llvm.org/D135402), and while they're not wrong to do so, this package and others (rust-lang/rust#105967) depended on it. This is the simple fix, per the llvm reviews link. Fixes termux#18750.
1 parent 0676550 commit 918c1ee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/binutils-libs/build.sh

+8
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ termux_step_pre_configure() {
4949
rm -rf $TERMUX_HOSTBUILD_MARKER
5050

5151
export CPPFLAGS="$CPPFLAGS -Wno-c++11-narrowing"
52+
# llvm upgraded a warning to an error, which caused this build (and some
53+
# others, including the rust toolchain) to fail like so:
54+
#
55+
# ld.lld: error: version script assignment of 'LIBCTF_1.0' to symbol 'ctf_label_set' failed: symbol not defined
56+
# ld.lld: error: version script assignment of 'LIBCTF_1.0' to symbol 'ctf_label_get' failed: symbol not defined
57+
# These flags restore it to a warning.
58+
# https://reviews.llvm.org/D135402
59+
export LDFLAGS="$LDFLAGS -Wl,--undefined-version"
5260

5361
if [ $TERMUX_ARCH_BITS = 32 ]; then
5462
export LIB_PATH="${TERMUX_PREFIX}/lib:/system/lib"

0 commit comments

Comments
 (0)