]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Test building packages without `-Wl,--no-as-needed`
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 6 Mar 2025 09:04:50 +0000 (10:04 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 7 Mar 2025 16:25:06 +0000 (17:25 +0100)
builder-support/debian/dnsdist/debian-bookworm/rules
builder-support/debian/dnsdist/debian-buster/rules
builder-support/specs/dnsdist.spec

index d6ab520fa4120dcbfa462f3c4e9cec637abe7d6e..e25401a510eceada9f01155fd1b04208b5b8477d 100755 (executable)
@@ -42,13 +42,10 @@ override_dh_auto_clean:
 #LDFLAGS += -latomic
 # We need clang (LLVM) to link the Rust static library and the C++ code with LTO enabled
 # build-id SHA1 prevents an issue with the debug symbols ("export: `-Wl,--build-id=sha1': not a valid identifier")
-# and the --no-as-needed -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
-# LDFLAGS += -fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl
-# CC=clang
-# CXX=clang++
+# and the -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
 
 override_dh_auto_configure:
-       LDFLAGS="-latomic -fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl" \
+       LDFLAGS="-latomic -fuse-ld=lld -Wl,--build-id=sha1 -ldl" \
        CC=clang \
        CXX=clang++ \
        PKG_CONFIG_PATH=/opt/lib/pkgconfig dh_auto_configure -- \
index a19db4f1b9391b92db3c3442c5b3130c4e91f2d1..9bd76d0d175e187effe7d37ca4c51010505a7e7e 100755 (executable)
@@ -12,8 +12,8 @@ include /usr/share/dpkg/default.mk
 LDFLAGS += -latomic
 # We need clang (LLVM) to link the Rust static library and the C++ code with LTO enabled
 # build-id SHA1 prevents an issue with the debug symbols ("export: `-Wl,--build-id=sha1': not a valid identifier")
-# and the --no-as-needed -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
-LDFLAGS += -fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl
+# and the -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
+LDFLAGS += -fuse-ld=lld -Wl,--build-id=sha1 -ldl
 CC=clang
 CXX=clang++
 
index 12284be1bac7a20b2d08eab734c8aa87919b2bfb..bf9da0a1c1dc19cec687ae9d70ed680e8129ed5e 100644 (file)
@@ -73,8 +73,8 @@ dnsdist is a high-performance DNS loadbalancer that is scriptable in Lua.
 export CC=clang
 export CXX=clang++
 # build-id SHA1 prevents an issue with the debug symbols ("export: `-Wl,--build-id=sha1': not a valid identifier")
-# and the --no-as-needed -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
-export LDFLAGS="-fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl"
+# and -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
+export LDFLAGS="-fuse-ld=lld -Wl,--build-id=sha1 -ldl"
 %if 0%{?rhel} < 9
 export CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -gdwarf-4"
 export CXXFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -gdwarf-4"