Skip to content

Commit

Permalink
fix(main/binutils-libs): append -Wl,--undefined-version to LDFLAGS (#…
Browse files Browse the repository at this point in the history
…18813)

Saw this in #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 #18750

[skip ci]
  • Loading branch information
tstein authored Dec 25, 2023
1 parent 7fb6027 commit 54b157e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/binutils-libs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ termux_step_pre_configure() {
rm -rf $TERMUX_HOSTBUILD_MARKER

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

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

0 comments on commit 54b157e

Please sign in to comment.