summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-01-28 21:40:32 +0000
committerGitHub <noreply@github.com>2023-01-28 21:40:32 +0000
commitf53b71ae34f1ef41d5140802b2403a95f179121a (patch)
tree126f1b684dbc33e2b5cd78bb96945ba6c8978a1b
parent66ba2cf84d3001a7de38bf263dd81bc401634b39 (diff)
parent7c73d1e0258453b7ee08305e284197f8a7f7940c (diff)
downloadnixpkgs-f53b71ae34f1ef41d5140802b2403a95f179121a.tar
nixpkgs-f53b71ae34f1ef41d5140802b2403a95f179121a.tar.gz
nixpkgs-f53b71ae34f1ef41d5140802b2403a95f179121a.tar.bz2
nixpkgs-f53b71ae34f1ef41d5140802b2403a95f179121a.tar.lz
nixpkgs-f53b71ae34f1ef41d5140802b2403a95f179121a.tar.xz
nixpkgs-f53b71ae34f1ef41d5140802b2403a95f179121a.tar.zst
nixpkgs-f53b71ae34f1ef41d5140802b2403a95f179121a.zip
Merge pull request #213141 from trofi/dmd-sysroot-workaround
dmd: set --sysroot=/ to avoid cc-wrapper value
-rw-r--r--pkgs/development/compilers/dmd/generic.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/compilers/dmd/generic.nix b/pkgs/development/compilers/dmd/generic.nix
index 3f8871df4f9..c1fb9abf77d 100644
--- a/pkgs/development/compilers/dmd/generic.nix
+++ b/pkgs/development/compilers/dmd/generic.nix
@@ -151,6 +151,13 @@ stdenv.mkDerivation rec {
     git
   ];
 
+  # Workaround cc-wrapper's --sysroot= value for `staging-next`: it
+  # breaks library lookup via RUNPATH:
+  #   ld: warning: libm.so.6, needed by ./generated/linux/release/64/lib.so, not found (try using -rpath or -rpath-link)
+  #   ld: /build/druntime/generated/linux/release/64/libdruntime.so: undefined reference to `log10@GLIBC_2.2.5'
+  # TODO(trofi): remove the workaround once cc-wrapper is fixed.
+  NIX_CFLAGS_COMPILE = [ "--sysroot=/" ];
+
   buildInputs = [
     curl
     tzdata