From dc9b0fcb6a823ca5b83fd6ea718eece8329cafe1 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 3 Sep 2026 13:07:14 -0400 Subject: [PATCH] gccNGPackages.gfortran: put `libquadmath` on the link path `libgfortran.spec`, which the driver reads out of the `libgfortran` directory the wrapper already names, links `-lquadmath` unconditionally -- and does so even though `libgfortran` is configured `--disable-libquadmath`, which governs building the library rather than the reference to it. Nothing put that library anywhere the driver would look, so linking any Fortran failed. Not new in 16; 15 has the same spec. Co-authored-by: Ben Siraphob Assisted-by: Claude Code (Claude Opus 5) --- pkgs/development/compilers/gcc/ng/common/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/compilers/gcc/ng/common/default.nix b/pkgs/development/compilers/gcc/ng/common/default.nix index 7c9395528e4f..2a129f909ad7 100644 --- a/pkgs/development/compilers/gcc/ng/common/default.nix +++ b/pkgs/development/compilers/gcc/ng/common/default.nix @@ -187,6 +187,9 @@ makeScopeWithSplicing' { ++ [ "-B${targetGccPackages.libstdcxx}/lib" "-B${targetGccPackages.libgfortran}/lib/" + # `libgfortran.spec`, which the driver reads from the directory + # above, links `-lquadmath` unconditionally. + "-B${targetGccPackages.libquadmath}/lib" ] ++ threadsCflags; };