]> 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)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Apr 2025 10:53:03 +0000 (12:53 +0200)
This is needed as we rename the file. We try to not include the
SONAME, but some systems include it anyway.

(cherry picked from commit 223917e2886dd3a8fb8a72ea4267dd2fc6961c65)

builder-support/helpers/install_quiche.sh

index 57656bf2c65336b321cc8abb252ff59558527865..830c076f4803f19026258a0aa3e9e090a966955a 100755 (executable)
@@ -31,6 +31,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} "${INSTALL_PREFIX}"/lib/libdnsdist-quiche.${SOEXT}