]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
If SONAME is present in the generated quiche lib set it to the correct value
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 16 Apr 2025 11:43:03 +0000 (13:43 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 16 Apr 2025 11:44:34 +0000 (13:44 +0200)
This is needed as we rename the file. We try to not include the
SONAME, but some systems include it anyway.

builder-support/helpers/install_quiche.sh

index 0674ebcbbb7e57ce090e3b3955808e60a2056a42..5f36d5460593b71578ca07a9f2e1b08fb6a3493d 100755 (executable)
@@ -42,6 +42,15 @@ sed -i 's/ffi = \["dep:cdylib-link-lines"\]/ffi = \[\]/' quiche/Cargo.toml
 sed -i 's,cdylib_link_lines::metabuild();,//cdylib_link_lines::metabuild();,' quiche/src/build.rs
 RUST_BACKTRACE=1 cargo build --release --no-default-features --features ffi,boringssl-boring-crate --package quiche
 
+# While we tried to get rid of the SONAME in libquiche.so, on debian trixie's
+# packaged rustc puts it in anyway.
+# See (https://sources.debian.org/patches/rustc/1.85.0%2Bdfsg2-3/behaviour/d-rustc-add-soname.patch/).
+# So if it is present, patch it to the correct name.
+if objdump -p target/release/libquiche.${SOEXT} | fgrep -q SONAME
+then
+  patchelf --set-soname libdnsdist-quiche.so target/release/libquiche.${SOEXT}
+fi
+
 install -m644 quiche/include/quiche.h "${INSTALL_PREFIX}"/include
 install -m644 target/release/libquiche.${SOEXT} "${LIBDIR}"/libdnsdist-quiche.${SOEXT}