gcc: move cygwin DLLs to $target/bin

This commit is contained in:
David McFarland
2026-02-08 18:34:46 -04:00
parent f42d59445b
commit f2ac4eef52
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -603,7 +603,7 @@ stdenvNoCC.mkDerivation {
installPhase =
if targetPlatform.isCygwin then
''
echo addToSearchPath "HOST_PATH" "${cc_bin}/lib" >> $out
echo addToSearchPath "HOST_PATH" "${cc_solib}/bin" >> $out
# Work around build failure caused by the gnulib workaround for
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870. remove after
# gnulib is updated in core packages (e.g. iconv, gnupatch, gnugrep)
@@ -363,6 +363,13 @@ originalAttrs:
fi
done
''
+ lib.optionalString stdenv.targetPlatform.isCygwin ''
targetBinDir="''${targetConfig+$targetConfig/}bin"
for i in "''${!outputBin}/$targetLibDir"/cyg*.dll; do
mkdir -p "''${!outputLib}/$targetBinDir"
mv "$i" "''${!outputLib}/$targetBinDir"/
done
''
# if cross-compiling, link from $lib/lib to $lib/${targetConfig}.
# since native-compiles have $lib/lib as a directory (not a
# symlink), this ensures that in every case we can assume that