diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 0b25d70b14a2b..67cea19a5999b 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -277,9 +277,8 @@ stdenv.mkDerivation { else if givenLibcxx then { kind = "libc++"; package = libcxx; solib = libcxx_solib;} else - # We're probably using the `libstdc++` that came with our `gcc`. - # TODO: this is maybe not always correct? - # TODO: what happens when `nativeTools = true`? + # Fallback to assuming libstdc++. This currently doesn't account e.g. for + # `nativeTools = true` { kind = "libstdc++"; package = cc; solib = cc_solib; } ; @@ -462,13 +461,6 @@ stdenv.mkDerivation { echo "-L${gccForLibs}/lib/gcc/${targetPlatform.config}/${gccForLibs.version}" >> $out/nix-support/cc-ldflags echo "-L${gccForLibs_solib}/lib" >> $out/nix-support/cc-ldflags '' - # The above "fix" may be incorrect; gcc.cc.lib doesn't contain a - # `target-triple` dir but the correct fix may be to just remove the above? - # - # For clang it's not necessary (see `--gcc-toolchain` below) and for other - # situations adding in the above will bring in lots of other gcc libraries - # (i.e. sanitizer libraries, `libatomic`, `libquadmath`) besides just - # `libstdc++`; this may actually break clang. # TODO We would like to connect this to `useGccForLibs`, but we cannot yet # because `libcxxStdenv` on linux still needs this. Maybe someday we'll