From 12d2821bf56be27d33b90f109220a342a11828ca Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 23 Jan 2023 15:34:53 +0000 Subject: treewide: remove -ldl linker flags With all libcs I'm aware of, libdl is now either empty (Glibc, musl, uclibc, illumos), a symlink to libc or equivalent (Apple), or does not exist (FreeBSD, NetBSD). So explicitly linking libdl now does nothing for the former platforms, and breaks the build for the latter platforms. With this patch I've removed -ldl from all overridden linker flags for all free packages in Nixpkgs. Everything still seems to build. --- pkgs/development/compilers/gcc/9/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/development/compilers/gcc/9/default.nix') diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 9b5f4504db8..36fea987ae2 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -182,7 +182,7 @@ stdenv.mkDerivation ({ depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package; - NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; + NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm"; preConfigure = import ../common/pre-configure.nix { inherit lib; -- cgit 1.4.1