···237 });
238 });
239000000240 useLibsFrom = modelStdenv: targetStdenv:
241 let
242 ccForLibs = modelStdenv.cc.cc;
243- cc = pkgs.wrapCCWith {
244- /* NOTE: cc.cc is the unwrapped compiler. Should we respect the old
245- * wrapper instead? */
246- cc = targetStdenv.cc.cc;
247-248 /* NOTE(originally by rrbutani):
249 * Normally the `useCcForLibs`/`gccForLibs` mechanism is used to get a
250 * clang based `cc` to use `libstdc++` (from gcc).
···237 });
238 });
239240+ /* Copy the libstdc++ from the model stdenv to the target stdenv.
241+ *
242+ * TODO(@connorbaker):
243+ * This interface provides behavior which should be revisited prior to the
244+ * release of 24.05. For a more detailed explanation and discussion, see
245+ * https://github.com/NixOS/nixpkgs/issues/283517. */
246 useLibsFrom = modelStdenv: targetStdenv:
247 let
248 ccForLibs = modelStdenv.cc.cc;
249+ /* NOTE(@connorbaker):
250+ * This assumes targetStdenv.cc is a cc-wrapper. */
251+ cc = targetStdenv.cc.override {
00252 /* NOTE(originally by rrbutani):
253 * Normally the `useCcForLibs`/`gccForLibs` mechanism is used to get a
254 * clang based `cc` to use `libstdc++` (from gcc).