Merge pull request #173487 from NixOS/revert-171418-mingwW64-clang

Revert "Add mingwW64-llvm cross-system."

authored by John Ericson and committed by GitHub 15f3cc41 1d38b75c

+85 -681
-9
lib/systems/examples.nix
··· 301 301 libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain 302 302 }; 303 303 304 - # 64 bit mingw-w64 with a llvm-based toolchain targetting ucrt 305 - # 306 - # Inspired by mstorsjo/llvm-mingw 307 - mingwW64-llvm = { 308 - config = "x86_64-w64-mingw32"; 309 - libc = "ucrt"; 310 - useLLVM = true; 311 - }; 312 - 313 304 # BSDs 314 305 315 306 amd64-netbsd = lib.warn "The amd64-netbsd system example is deprecated. Use x86_64-netbsd instead." x86_64-netbsd;
-6
pkgs/build-support/bintools-wrapper/add-lld-ldflags-before.sh
··· 1 - # ld.lld has two incompatible command-line drivers: One for the gnu-compatible COFF linker and one for 2 - # the ELF linker. If no emulation is set (with -m), it will default to the ELF linker; 3 - # unfortunately, some configure scripts use `ld --help` to check for certain Windows-specific flags, 4 - # which don't show up in the help for the ELF linker. So we set a default -m here. 5 - 6 - extraBefore+=("-m" "@mtype@")
-32
pkgs/build-support/bintools-wrapper/default.nix
··· 31 31 32 32 # Darwin code signing support utilities 33 33 , postLinkSignHook ? null, signingUtils ? null 34 - 35 - # Linker type 36 - , isLld ? bintools.isLld or false 37 - , isCctools ? bintools.isCctools or false 38 - , isGNU ? bintools.isGNU or false 39 - , isGold ? bintools.isGold or false 40 - , isBfd ? bintools.isBfd or false 41 34 }: 42 35 43 36 with lib; ··· 119 112 120 113 passthru = { 121 114 inherit bintools libc nativeTools nativeLibc nativePrefix; 122 - 123 - inherit isLld isCctools isGNU isGold isBfd; 124 115 125 116 emacsBufferSetup = pkgs: '' 126 117 ; We should handle propagation here too ··· 302 293 echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/libc-ldflags 303 294 '' 304 295 305 - # lld's MinGW driver (e.g. `ld.lld -m i386pep`) does not support the `-z` flag. 306 - + optionalString (targetPlatform.isWindows && isLld) '' 307 - hardening_unsupported_flags+=" relro bindnow" 308 - '' 309 - 310 296 ## 311 297 ## GNU specific extra strip flags 312 298 ## ··· 350 336 substituteAll ${./add-darwin-ldflags-before.sh} $out/nix-support/add-local-ldflags-before.sh 351 337 '' 352 338 ) 353 - 354 - ## 355 - ## Set the default machine type so that $prefix-ld.lld uses the COFF driver for --help 356 - ## 357 - ## Needed because autotools parses --help for linker features... 358 - ## 359 - + optionalString (isLld && stdenv.targetPlatform.isWindows) (let 360 - mtype = 361 - /**/ if targetPlatform.isx86_32 then "i386pe" 362 - else if targetPlatform.isx86_64 then "i386pep" 363 - else if targetPlatform.isAarch32 then "thumb2pe" 364 - else if targetPlatform.isAarch64 then "arm64pe" 365 - else throw "unsupported target arch for lld"; 366 - in '' 367 - export mtype=${mtype} 368 - substituteAll ${./add-lld-ldflags-before.sh} add-local-ldflags-before.sh 369 - cat add-local-ldflags-before.sh >> $out/nix-support/add-local-ldflags-before.sh 370 - '') 371 339 372 340 ## 373 341 ## Code signing on Apple Silicon
+1 -4
pkgs/build-support/cc-wrapper/default.nix
··· 18 18 , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null 19 19 , buildPackages ? {} 20 20 , libcxx ? null 21 - , isCompilerRT ? false 22 21 }: 23 22 24 23 with lib; ··· 147 146 # Binutils, and Apple's "cctools"; "bintools" as an attempt to find an 148 147 # unused middle-ground name that evokes both. 149 148 inherit bintools; 150 - inherit libc nativeTools nativeLibc nativePrefix isGNU isClang isCompilerRT; 149 + inherit libc nativeTools nativeLibc nativePrefix isGNU isClang; 151 150 152 151 emacsBufferSetup = pkgs: '' 153 152 ; We should handle propagation here too ··· 480 479 hardening_unsupported_flags+=" pic" 481 480 '' + optionalString targetPlatform.isMinGW '' 482 481 hardening_unsupported_flags+=" stackprotector fortify" 483 - '' + optionalString (targetPlatform.isWindows && isClang) '' 484 - hardening_unsupported_flags+=" pic" 485 482 '' + optionalString targetPlatform.isAvr '' 486 483 hardening_unsupported_flags+=" stackprotector pic" 487 484 '' + optionalString (targetPlatform.libc == "newlib") ''
+2 -2
pkgs/development/compilers/gcc/10/default.nix
··· 79 79 }); 80 80 81 81 /* Cross-gcc settings (build == host != target) */ 82 - crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW; 82 + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 83 83 stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; 84 84 crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 85 85 ··· 292 292 }; 293 293 } 294 294 295 - // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.isMinGW && crossStageStatic) { 295 + // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) { 296 296 makeFlags = [ "all-gcc" "all-target-libgcc" ]; 297 297 installTargets = "install-gcc install-target-libgcc"; 298 298 }
+2 -2
pkgs/development/compilers/gcc/11/default.nix
··· 83 83 ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; 84 84 85 85 /* Cross-gcc settings (build == host != target) */ 86 - crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW; 86 + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 87 87 stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; 88 88 crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 89 89 ··· 297 297 }; 298 298 } 299 299 300 - // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.isMinGW && crossStageStatic) { 300 + // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) { 301 301 makeFlags = [ "all-gcc" "all-target-libgcc" ]; 302 302 installTargets = "install-gcc install-target-libgcc"; 303 303 }
+2 -2
pkgs/development/compilers/gcc/4.8/default.nix
··· 114 114 javaAwtGtk = langJava && x11Support; 115 115 116 116 /* Cross-gcc settings (build == host != target) */ 117 - crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW; 117 + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 118 118 stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; 119 119 crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 120 120 ··· 316 316 }; 317 317 } 318 318 319 - // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.isMinGW && crossStageStatic) { 319 + // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) { 320 320 makeFlags = [ "all-gcc" "all-target-libgcc" ]; 321 321 installTargets = "install-gcc install-target-libgcc"; 322 322 }
+2 -2
pkgs/development/compilers/gcc/4.9/default.nix
··· 130 130 javaAwtGtk = langJava && x11Support; 131 131 132 132 /* Cross-gcc settings (build == host != target) */ 133 - crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW; 133 + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 134 134 stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; 135 135 crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 136 136 ··· 332 332 }; 333 333 } 334 334 335 - // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.isMinGW && crossStageStatic) { 335 + // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) { 336 336 makeFlags = [ "all-gcc" "all-target-libgcc" ]; 337 337 installTargets = "install-gcc install-target-libgcc"; 338 338 }
+2 -2
pkgs/development/compilers/gcc/6/default.nix
··· 111 111 javaAwtGtk = langJava && x11Support; 112 112 113 113 /* Cross-gcc settings (build == host != target) */ 114 - crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW; 114 + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 115 115 stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; 116 116 crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 117 117 ··· 345 345 }; 346 346 } 347 347 348 - // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.isMinGW && crossStageStatic) { 348 + // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) { 349 349 makeFlags = [ "all-gcc" "all-target-libgcc" ]; 350 350 installTargets = "install-gcc install-target-libgcc"; 351 351 }
+2 -2
pkgs/development/compilers/gcc/7/default.nix
··· 87 87 ++ [ ../libsanitizer-no-cyclades-9.patch ]; 88 88 89 89 /* Cross-gcc settings (build == host != target) */ 90 - crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW; 90 + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 91 91 stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; 92 92 crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 93 93 ··· 301 301 }; 302 302 } 303 303 304 - // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.isMinGW && crossStageStatic) { 304 + // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) { 305 305 makeFlags = [ "all-gcc" "all-target-libgcc" ]; 306 306 installTargets = "install-gcc install-target-libgcc"; 307 307 }
+2 -2
pkgs/development/compilers/gcc/8/default.nix
··· 71 71 ++ [ ../libsanitizer-no-cyclades-9.patch ]; 72 72 73 73 /* Cross-gcc settings (build == host != target) */ 74 - crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW; 74 + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 75 75 stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; 76 76 crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 77 77 ··· 280 280 }; 281 281 } 282 282 283 - // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.isMinGW && crossStageStatic) { 283 + // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) { 284 284 makeFlags = [ "all-gcc" "all-target-libgcc" ]; 285 285 installTargets = "install-gcc install-target-libgcc"; 286 286 }
+2 -2
pkgs/development/compilers/gcc/9/default.nix
··· 98 98 ++ [ ../libsanitizer-no-cyclades-9.patch ]; 99 99 100 100 /* Cross-gcc settings (build == host != target) */ 101 - crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW; 101 + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 102 102 stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; 103 103 crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 104 104 ··· 311 311 }; 312 312 } 313 313 314 - // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.isMinGW && crossStageStatic) { 314 + // optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) { 315 315 makeFlags = [ "all-gcc" "all-target-libgcc" ]; 316 316 installTargets = "install-gcc install-target-libgcc"; 317 317 }
+1 -1
pkgs/development/compilers/gcc/common/configure-flags.nix
··· 41 41 inherit (stdenv) 42 42 buildPlatform hostPlatform targetPlatform; 43 43 44 - crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW; 44 + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 45 45 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 46 46 47 47 targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+1 -1
pkgs/development/compilers/llvm/10/bintools/default.nix
··· 5 5 if stdenv.hostPlatform != stdenv.targetPlatform 6 6 then "${stdenv.targetPlatform.config}-" 7 7 else ""; 8 - in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } '' 8 + in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' 9 9 mkdir -p $out/bin 10 10 for prog in ${lld}/bin/*; do 11 11 ln -s $prog $out/bin/${prefix}$(basename $prog)
+1 -1
pkgs/development/compilers/llvm/11/bintools/default.nix
··· 5 5 if stdenv.hostPlatform != stdenv.targetPlatform 6 6 then "${stdenv.targetPlatform.config}-" 7 7 else ""; 8 - in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } '' 8 + in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' 9 9 mkdir -p $out/bin 10 10 for prog in ${lld}/bin/*; do 11 11 ln -s $prog $out/bin/${prefix}$(basename $prog)
+1 -1
pkgs/development/compilers/llvm/12/bintools/default.nix
··· 5 5 if stdenv.hostPlatform != stdenv.targetPlatform 6 6 then "${stdenv.targetPlatform.config}-" 7 7 else ""; 8 - in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } '' 8 + in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' 9 9 mkdir -p $out/bin 10 10 for prog in ${lld}/bin/*; do 11 11 ln -s $prog $out/bin/${prefix}$(basename $prog)
+3 -12
pkgs/development/compilers/llvm/13/bintools/default.nix
··· 1 - { runCommand, stdenv, llvm, lld, version, lib }: 1 + { runCommand, stdenv, llvm, lld, version }: 2 2 3 3 let 4 4 prefix = 5 5 if stdenv.hostPlatform != stdenv.targetPlatform 6 6 then "${stdenv.targetPlatform.config}-" 7 7 else ""; 8 - in runCommand "llvm-binutils-${version}" { 9 - preferLocalBuild = true; 10 - passthru = { 11 - isLld = true; 12 - targetPrefix = prefix; 13 - }; 14 - } ('' 8 + in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' 15 9 mkdir -p $out/bin 16 10 for prog in ${lld}/bin/*; do 17 11 ln -s $prog $out/bin/${prefix}$(basename $prog) ··· 32 26 ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip 33 27 34 28 ln -s ${lld}/bin/lld $out/bin/${prefix}ld 35 - '' + lib.optionalString stdenv.targetPlatform.isWindows '' 36 - ln -s ${llvm}/bin/llvm-windres $out/bin/${prefix}windres 37 - ln -s ${llvm}/bin/llvm-dlltool $out/bin/${prefix}dlltool 38 - '') 29 + ''
-3
pkgs/development/compilers/llvm/13/default.nix
··· 168 168 '' + lib.optionalString stdenv.targetPlatform.isWasm '' 169 169 echo "-fno-exceptions" >> $out/nix-support/cc-cflags 170 170 '' + mkExtraBuildCommands cc; 171 - isCompilerRT = true; 172 171 }; 173 172 174 173 clangNoLibcxx = wrapCCWith rec { ··· 183 182 echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags 184 183 echo "-nostdlib++" >> $out/nix-support/cc-cflags 185 184 '' + mkExtraBuildCommands cc; 186 - isCompilerRT = true; 187 185 }; 188 186 189 187 clangNoLibc = wrapCCWith rec { ··· 197 195 echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags 198 196 echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags 199 197 '' + mkExtraBuildCommands cc; 200 - isCompilerRT = true; 201 198 }; 202 199 203 200 clangNoCompilerRt = wrapCCWith rec {
+3 -9
pkgs/development/compilers/llvm/13/libcxx/default.nix
··· 1 1 { lib, stdenv, llvm_meta, src, cmake, python3, fixDarwinDylibNames, version 2 - , libcxxabi, libunwind 2 + , libcxxabi 3 3 , enableShared ? !stdenv.hostPlatform.isStatic 4 4 5 5 # If headersOnly is true, the resulting package would only include the headers. ··· 32 32 nativeBuildInputs = [ cmake python3 ] 33 33 ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; 34 34 35 - buildInputs = lib.optionals (!headersOnly) ([ libcxxabi ] ++ lib.optional libcxxabi.useLLVMUnwinder libunwind); 35 + buildInputs = lib.optionals (!headersOnly) [ libcxxabi ]; 36 36 37 37 cmakeFlags = [ "-DLIBCXX_CXX_ABI=libcxxabi" ] 38 38 ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" ··· 41 41 "-DLIBCXX_ENABLE_THREADS=OFF" 42 42 "-DLIBCXX_ENABLE_FILESYSTEM=OFF" 43 43 "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" 44 - ] 45 - ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF" 46 - ++ lib.optionals (!headersOnly && libcxxabi.semi-static) [ 47 - "-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=TRUE" 48 - "-DLIBCXX_CXX_ABI_LIBRARY_PATH=${libcxxabi}/lib" 49 - ] ++ lib.optional (!headersOnly && libcxxabi.useLLVMUnwinder) 50 - "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"; 44 + ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"; 51 45 52 46 buildFlags = lib.optional headersOnly "generate-cxx-headers"; 53 47 installTargets = lib.optional headersOnly "install-cxx-headers";
+6 -17
pkgs/development/compilers/llvm/13/libcxxabi/default.nix
··· 2 2 , enableShared ? !stdenv.hostPlatform.isStatic 3 3 , standalone ? stdenv.hostPlatform.useLLVM or false 4 4 , withLibunwind ? !stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm 5 - }: let 6 - # lld doesn't support unresolved references on Windows https://github.com/llvm/llvm-project/issues/55245 7 - semi-static = enableShared && stdenv.hostPlatform.isWindows && stdenv.cc.bintools.isLld; 5 + }: 8 6 9 - enableShared' = enableShared && !semi-static; 10 - 11 - useLLVMUnwinder = standalone && withLibunwind; 12 - in stdenv.mkDerivation rec { 7 + stdenv.mkDerivation rec { 13 8 pname = "libcxxabi"; 14 9 inherit version; 15 10 ··· 31 26 nativeBuildInputs = [ cmake python3 ]; 32 27 buildInputs = lib.optional withLibunwind libunwind; 33 28 34 - passthru = { inherit semi-static useLLVMUnwinder; }; 35 - 36 29 cmakeFlags = [ 37 30 "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1" 38 31 ] ++ lib.optionals standalone [ 39 32 "-DLLVM_ENABLE_LIBCXX=ON" 40 - ] ++ lib.optionals useLLVMUnwinder [ 33 + ] ++ lib.optionals (standalone && withLibunwind) [ 41 34 "-DLIBCXXABI_USE_LLVM_UNWINDER=ON" 42 35 ] ++ lib.optionals stdenv.hostPlatform.isWasm [ 43 36 "-DLIBCXXABI_ENABLE_THREADS=OFF" 44 37 "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF" 45 - ] ++ lib.optionals (!enableShared') [ 38 + ] ++ lib.optionals (!enableShared) [ 46 39 "-DLIBCXXABI_ENABLE_SHARED=OFF" 47 - ] ++ lib.optionals semi-static [ 48 - "-DLIBCXX_ENABLE_SHARED=ON" 49 - "-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON" 50 - ] ++ lib.optional stdenv.cc.isCompilerRT 51 - "-DLIBCXXABI_USE_COMPILER_RT=ON"; 40 + ]; 52 41 53 42 installPhase = if stdenv.isDarwin 54 43 then '' ··· 67 56 install -d -m 755 $out/include $out/lib 68 57 install -m 644 lib/libc++abi.a $out/lib 69 58 install -m 644 ../include/cxxabi.h $out/include 70 - '' + lib.optionalString enableShared' '' 59 + '' + lib.optionalString enableShared '' 71 60 install -m 644 lib/libc++abi.so.1.0 $out/lib 72 61 ln -s libc++abi.so.1.0 $out/lib/libc++abi.so 73 62 ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
+1 -3
pkgs/development/compilers/llvm/13/libunwind/default.nix
··· 17 17 18 18 nativeBuildInputs = [ cmake ]; 19 19 20 - cmakeFlags = 21 - lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF" 22 - ++ lib.optional (stdenv.cc.isCompilerRT) "-DLIBUNWIND_USE_COMPILER_RT=TRUE"; 20 + cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF"; 23 21 24 22 meta = llvm_meta // { 25 23 # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+3 -12
pkgs/development/compilers/llvm/14/bintools/default.nix
··· 1 - { runCommand, stdenv, llvm, lld, version, lib }: 1 + { runCommand, stdenv, llvm, lld, version }: 2 2 3 3 let 4 4 prefix = 5 5 if stdenv.hostPlatform != stdenv.targetPlatform 6 6 then "${stdenv.targetPlatform.config}-" 7 7 else ""; 8 - in runCommand "llvm-binutils-${version}" { 9 - preferLocalBuild = true; 10 - passthru = { 11 - isLld = true; 12 - targetPrefix = prefix; 13 - }; 14 - } ('' 8 + in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' 15 9 mkdir -p $out/bin 16 10 for prog in ${lld}/bin/*; do 17 11 ln -s $prog $out/bin/${prefix}$(basename $prog) ··· 32 26 ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip 33 27 34 28 ln -s ${lld}/bin/lld $out/bin/${prefix}ld 35 - '' + lib.optionalString stdenv.targetPlatform.isWindows '' 36 - ln -s ${llvm}/bin/llvm-windres $out/bin/${prefix}windres 37 - ln -s ${llvm}/bin/llvm-dlltool $out/bin/${prefix}dlltool 38 - '') 29 + ''
-3
pkgs/development/compilers/llvm/14/default.nix
··· 169 169 (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) 170 170 "-lunwind" 171 171 ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; 172 - isCompilerRT = true; 173 172 }; 174 173 175 174 clangNoLibcxx = wrapCCWith rec { ··· 185 184 "-B${targetLlvmLibraries.compiler-rt}/lib" 186 185 "-nostdlib++" 187 186 ]; 188 - isCompilerRT = true; 189 187 }; 190 188 191 189 clangNoLibc = wrapCCWith rec { ··· 200 198 "-rtlib=compiler-rt" 201 199 "-B${targetLlvmLibraries.compiler-rt}/lib" 202 200 ]; 203 - isCompilerRT = true; 204 201 }; 205 202 206 203 clangNoCompilerRt = wrapCCWith rec {
+3 -9
pkgs/development/compilers/llvm/14/libcxx/default.nix
··· 1 1 { lib, stdenv, llvm_meta 2 2 , monorepoSrc, runCommand 3 3 , cmake, python3, fixDarwinDylibNames, version 4 - , libcxxabi, libunwind 4 + , libcxxabi 5 5 , enableShared ? !stdenv.hostPlatform.isStatic 6 6 7 7 # If headersOnly is true, the resulting package would only include the headers. ··· 48 48 nativeBuildInputs = [ cmake python3 ] 49 49 ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; 50 50 51 - buildInputs = lib.optionals (!headersOnly) ([ libcxxabi ] ++ lib.optional libcxxabi.useLLVMUnwinder libunwind); 51 + buildInputs = lib.optionals (!headersOnly) [ libcxxabi ]; 52 52 53 53 cmakeFlags = [ "-DLIBCXX_CXX_ABI=libcxxabi" ] 54 54 ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" ··· 57 57 "-DLIBCXX_ENABLE_THREADS=OFF" 58 58 "-DLIBCXX_ENABLE_FILESYSTEM=OFF" 59 59 "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" 60 - ] 61 - ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF" 62 - ++ lib.optionals (!headersOnly && libcxxabi.semi-static) [ 63 - "-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=TRUE" 64 - "-DLIBCXX_CXX_ABI_LIBRARY_PATH=${libcxxabi}/lib" 65 - ] ++ lib.optional (!headersOnly && libcxxabi.useLLVMUnwinder) 66 - "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"; 60 + ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"; 67 61 68 62 buildFlags = lib.optional headersOnly "generate-cxx-headers"; 69 63 installTargets = lib.optional headersOnly "install-cxx-headers";
+7 -22
pkgs/development/compilers/llvm/14/libcxxabi/default.nix
··· 2 2 , monorepoSrc, runCommand 3 3 , cxx-headers, libunwind, version 4 4 , enableShared ? !stdenv.hostPlatform.isStatic 5 - }: let 6 - withLibunwind = !stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm; 7 - 8 - semi-static = enableShared && stdenv.hostPlatform.isWindows && stdenv.cc.bintools.isLld; 9 - 10 - enableShared' = enableShared && !semi-static; 11 - 12 - standalone = stdenv.hostPlatform.useLLVM or false; 5 + }: 13 6 14 - useLLVMUnwinder = standalone && withLibunwind; 15 - in stdenv.mkDerivation rec { 7 + stdenv.mkDerivation rec { 16 8 pname = "libcxxabi"; 17 9 inherit version; 18 10 ··· 43 35 ]; 44 36 45 37 nativeBuildInputs = [ cmake python3 ]; 46 - buildInputs = lib.optional withLibunwind libunwind; 47 - 48 - passthru = { inherit semi-static useLLVMUnwinder; }; 38 + buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; 49 39 50 40 cmakeFlags = [ 51 41 "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1" 52 - ] ++ lib.optionals standalone [ 42 + ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [ 53 43 "-DLLVM_ENABLE_LIBCXX=ON" 54 - ] ++ lib.optionals useLLVMUnwinder [ 55 44 "-DLIBCXXABI_USE_LLVM_UNWINDER=ON" 56 45 ] ++ lib.optionals stdenv.hostPlatform.isWasm [ 57 46 "-DLIBCXXABI_ENABLE_THREADS=OFF" 58 47 "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF" 59 - ] ++ lib.optionals (!enableShared') [ 48 + ] ++ lib.optionals (!enableShared) [ 60 49 "-DLIBCXXABI_ENABLE_SHARED=OFF" 61 - ] ++ lib.optionals semi-static [ 62 - "-DLIBCXX_ENABLE_SHARED=ON" 63 - "-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON" 64 - ] ++ lib.optional stdenv.cc.isCompilerRT 65 - "-DLIBCXXABI_USE_COMPILER_RT=ON"; 50 + ]; 66 51 67 52 installPhase = if stdenv.isDarwin 68 53 then '' ··· 81 66 install -d -m 755 $out/include $out/lib 82 67 install -m 644 lib/libc++abi.a $out/lib 83 68 install -m 644 ../include/cxxabi.h $out/include 84 - '' + lib.optionalString enableShared' '' 69 + '' + lib.optionalString enableShared '' 85 70 install -m 644 lib/libc++abi.so.1.0 $out/lib 86 71 ln -s libc++abi.so.1.0 $out/lib/libc++abi.so 87 72 ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
+1 -3
pkgs/development/compilers/llvm/14/libunwind/default.nix
··· 31 31 32 32 nativeBuildInputs = [ cmake ]; 33 33 34 - cmakeFlags = 35 - lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF" 36 - ++ lib.optional (stdenv.cc.isCompilerRT) "-DLIBUNWIND_USE_COMPILER_RT=TRUE"; 34 + cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF"; 37 35 38 36 meta = llvm_meta // { 39 37 # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+1 -1
pkgs/development/compilers/llvm/7/bintools/default.nix
··· 5 5 if stdenv.hostPlatform != stdenv.targetPlatform 6 6 then "${stdenv.targetPlatform.config}-" 7 7 else ""; 8 - in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } '' 8 + in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' 9 9 mkdir -p $out/bin 10 10 for prog in ${lld}/bin/*; do 11 11 ln -s $prog $out/bin/${prefix}$(basename $prog)
+1 -1
pkgs/development/compilers/llvm/8/bintools/default.nix
··· 5 5 if stdenv.hostPlatform != stdenv.targetPlatform 6 6 then "${stdenv.targetPlatform.config}-" 7 7 else ""; 8 - in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } '' 8 + in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' 9 9 mkdir -p $out/bin 10 10 for prog in ${lld}/bin/*; do 11 11 ln -s $prog $out/bin/${prefix}$(basename $prog)
+1 -1
pkgs/development/compilers/llvm/9/bintools/default.nix
··· 5 5 if stdenv.hostPlatform != stdenv.targetPlatform 6 6 then "${stdenv.targetPlatform.config}-" 7 7 else ""; 8 - in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } '' 8 + in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' 9 9 mkdir -p $out/bin 10 10 for prog in ${lld}/bin/*; do 11 11 ln -s $prog $out/bin/${prefix}$(basename $prog)
+3 -12
pkgs/development/compilers/llvm/git/bintools/default.nix
··· 1 - { runCommand, stdenv, llvm, lld, version, lib }: 1 + { runCommand, stdenv, llvm, lld, version }: 2 2 3 3 let 4 4 prefix = 5 5 if stdenv.hostPlatform != stdenv.targetPlatform 6 6 then "${stdenv.targetPlatform.config}-" 7 7 else ""; 8 - in runCommand "llvm-binutils-${version}" { 9 - preferLocalBuild = true; 10 - passthru = { 11 - isLld = true; 12 - targetPrefix = prefix; 13 - }; 14 - } ('' 8 + in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' 15 9 mkdir -p $out/bin 16 10 for prog in ${lld}/bin/*; do 17 11 ln -s $prog $out/bin/${prefix}$(basename $prog) ··· 32 26 ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip 33 27 34 28 ln -s ${lld}/bin/lld $out/bin/${prefix}ld 35 - '' + lib.optionalString stdenv.targetPlatform.isWindows '' 36 - ln -s ${llvm}/bin/llvm-windres $out/bin/${prefix}windres 37 - ln -s ${llvm}/bin/llvm-dlltool $out/bin/${prefix}dlltool 38 - '') 29 + ''
-3
pkgs/development/compilers/llvm/git/default.nix
··· 168 168 '' + lib.optionalString stdenv.targetPlatform.isWasm '' 169 169 echo "-fno-exceptions" >> $out/nix-support/cc-cflags 170 170 '' + mkExtraBuildCommands cc; 171 - isCompilerRT = true; 172 171 }; 173 172 174 173 clangNoLibcxx = wrapCCWith rec { ··· 183 182 echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags 184 183 echo "-nostdlib++" >> $out/nix-support/cc-cflags 185 184 '' + mkExtraBuildCommands cc; 186 - isCompilerRT = true; 187 185 }; 188 186 189 187 clangNoLibc = wrapCCWith rec { ··· 197 195 echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags 198 196 echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags 199 197 '' + mkExtraBuildCommands cc; 200 - isCompilerRT = true; 201 198 }; 202 199 203 200 clangNoCompilerRt = wrapCCWith rec {
+3 -10
pkgs/development/compilers/llvm/git/libcxx/default.nix
··· 1 1 { lib, stdenv, llvm_meta 2 2 , monorepoSrc, runCommand 3 3 , cmake, python3, fixDarwinDylibNames, version 4 - , libcxxabi, libunwind 4 + , libcxxabi 5 5 , enableShared ? !stdenv.hostPlatform.isStatic 6 6 7 7 # If headersOnly is true, the resulting package would only include the headers. ··· 48 48 nativeBuildInputs = [ cmake python3 ] 49 49 ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; 50 50 51 - buildInputs = lib.optionals (!headersOnly) ([ libcxxabi ] ++ lib.optional libcxxabi.useLLVMUnwinder libunwind); 51 + buildInputs = lib.optionals (!headersOnly) [ libcxxabi ]; 52 52 53 53 cmakeFlags = [ "-DLIBCXX_CXX_ABI=libcxxabi" ] 54 54 ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" ··· 57 57 "-DLIBCXX_ENABLE_THREADS=OFF" 58 58 "-DLIBCXX_ENABLE_FILESYSTEM=OFF" 59 59 "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" 60 - ] 61 - ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF" 62 - ++ lib.optionals (!headersOnly && libcxxabi.semi-static) [ 63 - "-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=TRUE" 64 - "-DLIBCXX_CXX_ABI_LIBRARY_PATH=${libcxxabi}/lib" 65 - ] ++ lib.optional (!headersOnly && libcxxabi.useLLVMUnwinder) 66 - "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"; 67 - 60 + ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"; 68 61 69 62 buildFlags = lib.optional headersOnly "generate-cxx-headers"; 70 63 installTargets = lib.optional headersOnly "install-cxx-headers";
+6 -24
pkgs/development/compilers/llvm/git/libcxxabi/default.nix
··· 2 2 , monorepoSrc, runCommand 3 3 , cxx-headers, libunwind, version 4 4 , enableShared ? !stdenv.hostPlatform.isStatic 5 - }: let 6 - withLibunwind = !stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm; 7 - 8 - semi-static = enableShared && stdenv.hostPlatform.isWindows && stdenv.cc.bintools.isLld; 9 - 10 - enableShared' = enableShared && !semi-static; 11 - 12 - standalone = stdenv.hostPlatform.useLLVM or false; 13 - 14 - useLLVMUnwinder = standalone && withLibunwind; 15 - in 5 + }: 16 6 17 7 stdenv.mkDerivation rec { 18 8 pname = "libcxxabi"; ··· 45 35 ]; 46 36 47 37 nativeBuildInputs = [ cmake python3 ]; 48 - buildInputs = lib.optional withLibunwind libunwind; 49 - 50 - passthru = { inherit semi-static useLLVMUnwinder; }; 51 - 38 + buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; 52 39 53 40 cmakeFlags = [ 54 41 "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1" 55 - ] ++ lib.optionals standalone [ 42 + ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [ 56 43 "-DLLVM_ENABLE_LIBCXX=ON" 57 - ] ++ lib.optionals useLLVMUnwinder [ 58 44 "-DLIBCXXABI_USE_LLVM_UNWINDER=ON" 59 45 ] ++ lib.optionals stdenv.hostPlatform.isWasm [ 60 46 "-DLIBCXXABI_ENABLE_THREADS=OFF" 61 47 "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF" 62 - ] ++ lib.optionals (!enableShared') [ 48 + ] ++ lib.optionals (!enableShared) [ 63 49 "-DLIBCXXABI_ENABLE_SHARED=OFF" 64 - ] ++ lib.optionals semi-static [ 65 - "-DLIBCXX_ENABLE_SHARED=ON" 66 - "-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON" 67 - ] ++ lib.optional stdenv.cc.isCompilerRT 68 - "-DLIBCXXABI_USE_COMPILER_RT=ON"; 50 + ]; 69 51 70 52 installPhase = if stdenv.isDarwin 71 53 then '' ··· 84 66 install -d -m 755 $out/include $out/lib 85 67 install -m 644 lib/libc++abi.a $out/lib 86 68 install -m 644 ../include/cxxabi.h $out/include 87 - '' + lib.optionalString enableShared' '' 69 + '' + lib.optionalString enableShared '' 88 70 install -m 644 lib/libc++abi.so.1.0 $out/lib 89 71 ln -s libc++abi.so.1.0 $out/lib/libc++abi.so 90 72 ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
+1 -3
pkgs/development/compilers/llvm/git/libunwind/default.nix
··· 31 31 32 32 nativeBuildInputs = [ cmake ]; 33 33 34 - cmakeFlags = 35 - lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF" 36 - ++ lib.optional stdenv.cc.isCompilerRT "-DLIBUNWIND_USE_COMPILER_RT=TRUE"; 34 + cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF"; 37 35 38 36 meta = llvm_meta // { 39 37 # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+3 -3
pkgs/development/libraries/boost/generic.nix
··· 9 9 , enableDebug ? false 10 10 , enableSingleThreaded ? false 11 11 , enableMultiThreaded ? true 12 - , enableShared ? !(with stdenv.hostPlatform; isStatic || isMinGW) # problems for now 12 + , enableShared ? !(with stdenv.hostPlatform; isStatic || libc == "msvcrt") # problems for now 13 13 , enableStatic ? !enableShared 14 14 , enablePython ? false 15 15 , enableNumpy ? false ··· 103 103 ++ optional (toolset != null) "toolset=${toolset}" 104 104 ++ optional (!enablePython) "--without-python" 105 105 ++ optional needUserConfig "--user-config=user-config.jam" 106 - ++ optionals (stdenv.hostPlatform.isMinGW) [ 106 + ++ optionals (stdenv.hostPlatform.libc == "msvcrt") [ 107 107 "threadapi=win32" 108 108 ] ++ extraB2Args 109 109 ); ··· 257 257 # Make boost header paths relative so that they are not runtime dependencies 258 258 cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \ 259 259 -exec sed '1s/^\xef\xbb\xbf//;1i#line 1 "{}"' -i '{}' \; 260 - '' + optionalString (stdenv.hostPlatform.isMinGW) '' 260 + '' + optionalString (stdenv.hostPlatform.libc == "msvcrt") '' 261 261 $RANLIB "$out/lib/"*.a 262 262 ''; 263 263
+2 -2
pkgs/development/libraries/gmp/6.x.nix
··· 1 1 { lib, stdenv, fetchurl, m4 2 2 , cxx ? !stdenv.hostPlatform.useAndroidPrebuilt && !stdenv.hostPlatform.isWasm 3 - , buildPackages, autoreconfHook 3 + , buildPackages 4 4 , withStatic ? stdenv.hostPlatform.isStatic 5 5 }: 6 6 ··· 29 29 passthru.static = self.out; 30 30 31 31 depsBuildBuild = [ buildPackages.stdenv.cc ]; 32 - nativeBuildInputs = [ m4 ] ++ lib.optional stdenv.hostPlatform.isWindows autoreconfHook; 32 + nativeBuildInputs = [ m4 ]; 33 33 34 34 configureFlags = [ 35 35 "--with-pic"
+1 -5
pkgs/development/libraries/libffi/default.nix
··· 32 32 # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6155 33 33 # https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283 34 34 "--disable-exec-static-tramp" 35 - ] ++ 36 - # ld.lld on Windows doesn't support --version-script. 37 - lib.optional (stdenv.hostPlatform.isWindows && stdenv.cc.bintools.isLld) "--disable-symvers"; 35 + ]; 38 36 39 37 preCheck = '' 40 38 # The tests use -O0 which is not compatible with -D_FORTIFY_SOURCE. ··· 46 44 inherit doCheck; 47 45 48 46 checkInputs = [ dejagnu ]; 49 - 50 - nativeBuildInputs = lib.optional stdenv.hostPlatform.isWindows autoreconfHook; 51 47 52 48 meta = with lib; { 53 49 description = "A foreign function call interface library";
+1 -1
pkgs/development/libraries/libiconv/default.nix
··· 20 20 ]; 21 21 22 22 postPatch = 23 - lib.optionalString ((stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isMinGW) || stdenv.cc.nativeLibc) 23 + lib.optionalString ((stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc) 24 24 '' 25 25 sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h 26 26 ''
+1 -1
pkgs/development/libraries/libjpeg-turbo/default.nix
··· 27 27 28 28 # This is needed by freeimage 29 29 patches = [ ./0001-Compile-transupp.c-as-part-of-the-library.patch ] 30 - ++ lib.optional (stdenv.hostPlatform.isMinGW) 30 + ++ lib.optional (stdenv.hostPlatform.libc or null == "msvcrt") 31 31 ./mingw-boolean.patch; 32 32 33 33 outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ];
+1 -1
pkgs/development/libraries/libxml2/default.nix
··· 14 14 , pythonSupport ? enableShared && stdenv.buildPlatform == stdenv.hostPlatform 15 15 , icuSupport ? false 16 16 , icu 17 - , enableShared ? !stdenv.hostPlatform.isMinGW && !stdenv.hostPlatform.isStatic 17 + , enableShared ? stdenv.hostPlatform.libc != "msvcrt" && !stdenv.hostPlatform.isStatic 18 18 , enableStatic ? !enableShared 19 19 , gnome 20 20 }:
+1 -7
pkgs/development/libraries/ncurses/default.nix
··· 46 46 ]; 47 47 48 48 # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: 49 - CFLAGS = 50 - # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: 51 - /**/ if stdenv.isSunOS then "-D_XOPEN_SOURCE_EXTENDED" 52 - # ucrt doesn't support X_OK to access() without this flag 53 - else if stdenv.hostPlatform.libc == "ucrt" then "-D__USE_MINGW_ACCESS" 54 - else ""; 55 - 49 + CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; 56 50 57 51 depsBuildBuild = [ 58 52 buildPackages.stdenv.cc
+4 -4
pkgs/development/libraries/zlib/default.nix
··· 88 88 '' 89 89 # Non-typical naming confuses libtool which then refuses to use zlib's DLL 90 90 # in some cases, e.g. when compiling libpng. 91 - + lib.optionalString (stdenv.hostPlatform.isMinGW && shared) '' 91 + + lib.optionalString (stdenv.hostPlatform.libc == "msvcrt" && shared) '' 92 92 ln -s zlib1.dll $out/bin/libz.dll 93 93 ''; 94 94 ··· 101 101 dontStrip = stdenv.hostPlatform != stdenv.buildPlatform && static; 102 102 configurePlatforms = []; 103 103 104 - installFlags = lib.optionals (stdenv.hostPlatform.isMinGW) [ 104 + installFlags = lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ 105 105 "BINARY_PATH=$(out)/bin" 106 106 "INCLUDE_PATH=$(dev)/include" 107 107 "LIBRARY_PATH=$(out)/lib" ··· 112 112 113 113 makeFlags = [ 114 114 "PREFIX=${stdenv.cc.targetPrefix}" 115 - ] ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ 115 + ] ++ lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ 116 116 "-f" "win32/Makefile.gcc" 117 117 ] ++ lib.optionals shared [ 118 118 # Note that as of writing (zlib 1.2.11), this flag only has an effect ··· 134 134 preConfigure = '' 135 135 export CHOST=${stdenv.hostPlatform.config} 136 136 ''; 137 - } // lib.optionalAttrs (stdenv.hostPlatform.isMinGW) { 137 + } // lib.optionalAttrs (stdenv.hostPlatform.libc == "msvcrt") { 138 138 dontConfigure = true; 139 139 })
-5
pkgs/development/tools/misc/binutils/default.nix
··· 203 203 inherit targetPrefix; 204 204 hasGold = enableGold; 205 205 isGNU = true; 206 - # TODO Currently platform.linker == "gold" has no effect outside 207 - # of building GHC. If/when that's fixed, these flags should 208 - # probably move to the invocations of bintools-wrapper 209 - isGold = false; 210 - isBfd = true; 211 206 }; 212 207 213 208 meta = with lib; {
-99
pkgs/development/tools/misc/libtool/0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch
··· 1 - [PATCH 2/6] [cygwin|mingw] Create UAC manifest files. 2 - 3 - * build-aux/ltmain.in (func_emit_exe_manifest): New function. 4 - (func_mode_link) [cygwin|mingw]: Create manifest files for wrapper 5 - and target exe when target name matches heuristic that triggers 6 - UAC problems for newer win32 OSs. Clean up $cwrapper.manifest on 7 - error. Ensure manifest files have executable permission. 8 - (func_mode_uninstall): Clean up manifest files. 9 - Various reports by Eric Blake, Kai Tietz, and Cesar Strauss. 10 - --- 11 - build-auxltmain.in | 50 ++++++++++++++++++++++++++++++++++++++++++- 12 - 1 files changed, 48 insertions(+), 2 deletions(-) 13 - 14 - diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in 15 - index 0418007..1821779 100644 16 - --- a/build-aux/ltmain.in 17 - +++ b/build-aux/ltmain.in 18 - @@ -4277,6 +4277,41 @@ EOF 19 - } 20 - # end: func_emit_cwrapperexe_src 21 - 22 - +# func_emit_exe_manifest 23 - +# emit a Win32 UAC manifest for executable on stdout 24 - +# Must ONLY be called from within func_mode_link because 25 - +# it depends on a number of variable set therein. 26 - +func_emit_exe_manifest () 27 - +{ 28 - + cat <<EOF 29 - +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 30 - +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 31 - + <assemblyIdentity version="1.0.0.0" 32 - +EOF 33 - + 34 - + case $host in 35 - + i?86-*-* ) echo ' processorArchitecture="x86"' ;; 36 - + ia64-*-* ) echo ' processorArchitecture="ia64"' ;; 37 - + x86_64-*-* ) echo ' processorArchitecture="amd64"' ;; 38 - + *) echo ' processorArchitecture="*"' ;; 39 - + esac 40 - + 41 - + cat <<EOF 42 - + name="$host_os.$PROGRAM.$outputname" 43 - + type="win32"/> 44 - + 45 - + <!-- Identify the application security requirements. --> 46 - + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> 47 - + <security> 48 - + <requestedPrivileges> 49 - + <requestedExecutionLevel level="asInvoker" uiAccess="false"/> 50 - + </requestedPrivileges> 51 - + </security> 52 - + </trustInfo> 53 - +</assembly> 54 - +EOF 55 - +} 56 - + 57 - # func_win32_import_lib_p ARG 58 - # True if ARG is an import lib, as indicated by $file_magic_cmd 59 - func_win32_import_lib_p () 60 - @@ -8237,7 +8272,7 @@ EOF 61 - cwrappersource="$output_path/$objdir/lt-$output_name.c" 62 - cwrapper="$output_path/$output_name.exe" 63 - $RM $cwrappersource $cwrapper 64 - - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 65 - + trap "$RM $cwrappersource $cwrapper $cwrapper.manifest; exit $EXIT_FAILURE" 1 2 15 66 - 67 - func_emit_cwrapperexe_src > $cwrappersource 68 - 69 - @@ -8257,6 +8292,16 @@ EOF 70 - $opt_dry_run || { 71 - # note: this script will not be executed, so do not chmod. 72 - if test "x$build" = "x$host"; then 73 - + # Create the UAC manifests first if necessary (but the 74 - + # manifest files must have executable permission regardless). 75 - + case $output_name in 76 - + *instal*|*patch*|*setup*|*update*) 77 - + func_emit_exe_manifest > $cwrapper.manifest 78 - + func_emit_exe_manifest > $output_path/$objdir/$output_name.exe.manifest 79 - + chmod +x $cwrapper.manifest 80 - + chmod +x $output_path/$objdir/$output_name.exe.manifest 81 - + ;; 82 - + esac 83 - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result 84 - else 85 - func_emit_wrapper no > $func_ltwrapper_scriptname_result 86 - @@ -8777,8 +8822,9 @@ func_mode_uninstall () 87 - # note $name still contains .exe if it was in $file originally 88 - # as does the version of $file that was added into $rmfiles 89 - func_append rmfiles " $odir/$name $odir/${name}S.$objext" 90 - + func_append rmfiles " ${name}.manifest $objdir/${name}.manifest" 91 - if test yes = "$fast_install" && test -n "$relink_command"; then 92 - - func_append rmfiles " $odir/lt-$name" 93 - + func_append rmfiles " $odir/lt-$name $objdir/lt-${name}.manifest" 94 - fi 95 - if test "X$noexename" != "X$name"; then 96 - func_append rmfiles " $odir/lt-$noexename.c" 97 - -- 98 - 1.7.1 99 -
-24
pkgs/development/tools/misc/libtool/0005-Fix-seems-to-be-moved.patch
··· 1 - [PATCH 5/6] Fix "seems to be moved" 2 - * build-aux/ltmain.in (func_mode_link): Compare files by inode 3 - to fix "seems to be moved" warning. 4 - --- 5 - build-aux/ltmain.in | 4 +++- 6 - 1 files changed, 3 insertions(+), 1 deletions(-) 7 - 8 - diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in 9 - index af46cb8..244bb5b 100644 10 - --- a/build-aux/ltmain.in 11 - +++ b/build-aux/ltmain.in 12 - @@ -6283,7 +6283,9 @@ func_mode_link () 13 - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 14 - test -z "$libdir" && \ 15 - func_fatal_error "'$deplib' is not a valid libtool archive" 16 - - test "$absdir" != "$libdir" && \ 17 - + abs_inode=`ls -i "$deplib" | awk '{print $1}'` 18 - + lib_inode=`ls -i "$libdir/$(basename $deplib)" | awk '{print $1}'` 19 - + test "$abs_inode" != "$lib_inode" && \ 20 - func_warning "'$deplib' seems to be moved" 21 - 22 - path=-L$absdir 23 - -- 24 - 1.7.0.2.msysgit.0
-22
pkgs/development/tools/misc/libtool/0006-Fix-strict-ansi-vs-posix.patch
··· 1 - [PATCH 6/6] Fix STRICT_ANSI vs POSIX 2 - * build-aux/ltmain.in (func_mode_link): Also check for _POSIX 3 - as well as __STRICT_ANSI__ to avoid re-definitions. 4 - --- 5 - build-aux/ltmain.in | 4 +++- 6 - 1 files changed, 1 insertions(+), 1 deletions(-) 7 - 8 - diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in 9 - index af46cb8..244bb5b 100644 10 - --- a/build-aux/ltmain.in 11 - +++ b/build-aux/ltmain.in 12 - @@ -3382,7 +3382,7 @@ 13 - 14 - /* declarations of non-ANSI functions */ 15 - #if defined __MINGW32__ 16 - -# ifdef __STRICT_ANSI__ 17 - +# if defined(__STRICT_ANSI__) && !defined(__MINGW64_VERSION_MAJOR) || defined(_POSIX_) 18 - int _putenv (const char *); 19 - # endif 20 - #elif defined __CYGWIN__ 21 - -- 22 - 1.7.0.2.msysgit.0
-22
pkgs/development/tools/misc/libtool/0007-fix-cr-for-awk-in-configure.all.patch
··· 1 - --- libtool-2.4.2/configure.orig 2011-10-17 10:18:58.000000000 +0000 2 - +++ libtool-2.4.2/configure 2013-08-04 19:01:30.220494400 +0000 3 - @@ -28825,7 +28825,7 @@ 4 - fi 5 - ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 6 - if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 7 - - ac_cs_awk_cr='\\r' 8 - + ac_cs_awk_cr='\r' 9 - else 10 - ac_cs_awk_cr=$ac_cr 11 - fi 12 - --- libtool-2.4.2/libltdl/configure.orig 2011-10-17 10:19:47.000000000 +0000 13 - +++ libtool-2.4.2/libltdl/configure 2013-08-05 11:49:24.990792500 +0000 14 - @@ -13574,7 +13574,7 @@ 15 - fi 16 - ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 17 - if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 18 - - ac_cs_awk_cr='\\r' 19 - + ac_cs_awk_cr='\r' 20 - else 21 - ac_cs_awk_cr=$ac_cr 22 - fi
-24
pkgs/development/tools/misc/libtool/0010-libtool-2.4.2-include-process-h.patch
··· 1 - diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in 2 - index 0418007..91276c2 100644 3 - --- a/build-aux/ltmain.in 4 - +++ b/build-aux/ltmain.in 5 - @@ -4163,6 +4163,7 @@ 6 - # include <unistd.h> 7 - # include <stdint.h> 8 - # ifdef __CYGWIN__ 9 - +# include <process.h> 10 - # include <io.h> 11 - # endif 12 - #endif 13 - diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh 14 - index 0418007..91276c2 100644 15 - --- a/build-aux/ltmain.sh 16 - +++ b/build-aux/ltmain.sh 17 - @@ -4163,6 +4163,7 @@ 18 - # include <unistd.h> 19 - # include <stdint.h> 20 - # ifdef __CYGWIN__ 21 - +# include <process.h> 22 - # include <io.h> 23 - # endif 24 - #endif
-33
pkgs/development/tools/misc/libtool/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
··· 1 - From a18473ed4e5574dab899db640b8efeff78939b54 Mon Sep 17 00:00:00 2001 2 - From: Manoj Gupta <manojgupta@chromium.org> 3 - Date: Wed, 10 Oct 2018 10:50:23 +0300 4 - Subject: [PATCH 1/2] Pick up clang_rt static archives compiler internal 5 - libraries 6 - 7 - Libtool checks only for libraries linked as -l* when trying to 8 - find internal compiler libraries. Clang, however uses the absolute 9 - path to link its internal libraries e.g. compiler_rt. This patch 10 - handles clang's statically linked libraries when finding internal 11 - compiler libraries. 12 - https://crbug.com/749263 13 - https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866 14 - --- 15 - m4/libtool.m4 | 2 +- 16 - 1 file changed, 1 insertion(+), 1 deletion(-) 17 - 18 - diff --git a/m4/libtool.m4 b/m4/libtool.m4 19 - index b55a6e5..d9322d0 100644 20 - --- a/m4/libtool.m4 21 - +++ b/m4/libtool.m4 22 - @@ -7556,7 +7556,7 @@ if AC_TRY_EVAL(ac_compile); then 23 - for p in `eval "$output_verbose_link_cmd"`; do 24 - case $prev$p in 25 - 26 - - -L* | -R* | -l*) 27 - + -L* | -R* | -l* | */libclang_rt.*.a) 28 - # Some compilers place space between "-{L,R}" and the path. 29 - # Remove the space. 30 - if test x-L = "$p" || 31 - -- 32 - 2.7.4 33 -
-83
pkgs/development/tools/misc/libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch
··· 1 - From ec15841963ca3aab3bc88fb0932c014337284bfc Mon Sep 17 00:00:00 2001 2 - From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st> 3 - Date: Wed, 10 Oct 2018 10:47:21 +0300 4 - Subject: [PATCH 2/2] Prefer response files over linker scripts for mingw tools 5 - 6 - The GCC/binutils tools support response files just fine, while 7 - lld (impersonating GNU ld) only supports response files, not 8 - linker scripts. Using a linker script as input just to pass a 9 - list of files is overkill for cases when a response file is enough. 10 - --- 11 - build-aux/ltmain.in | 28 ++++++++++++++-------------- 12 - m4/libtool.m4 | 2 ++ 13 - 2 files changed, 16 insertions(+), 14 deletions(-) 14 - 15 - diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in 16 - index e2fb263..db5d590 100644 17 - --- a/build-aux/ltmain.in 18 - +++ b/build-aux/ltmain.in 19 - @@ -7932,20 +7932,7 @@ EOF 20 - last_robj= 21 - k=1 22 - 23 - - if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then 24 - - output=$output_objdir/$output_la.lnkscript 25 - - func_verbose "creating GNU ld script: $output" 26 - - echo 'INPUT (' > $output 27 - - for obj in $save_libobjs 28 - - do 29 - - func_to_tool_file "$obj" 30 - - $ECHO "$func_to_tool_file_result" >> $output 31 - - done 32 - - echo ')' >> $output 33 - - func_append delfiles " $output" 34 - - func_to_tool_file "$output" 35 - - output=$func_to_tool_file_result 36 - - elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then 37 - + if test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then 38 - output=$output_objdir/$output_la.lnk 39 - func_verbose "creating linker input file list: $output" 40 - : > $output 41 - @@ -7964,6 +7951,19 @@ EOF 42 - func_append delfiles " $output" 43 - func_to_tool_file "$output" 44 - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" 45 - + elif test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then 46 - + output=$output_objdir/$output_la.lnkscript 47 - + func_verbose "creating GNU ld script: $output" 48 - + echo 'INPUT (' > $output 49 - + for obj in $save_libobjs 50 - + do 51 - + func_to_tool_file "$obj" 52 - + $ECHO "$func_to_tool_file_result" >> $output 53 - + done 54 - + echo ')' >> $output 55 - + func_append delfiles " $output" 56 - + func_to_tool_file "$output" 57 - + output=$func_to_tool_file_result 58 - else 59 - if test -n "$save_libobjs"; then 60 - func_verbose "creating reloadable object files..." 61 - diff --git a/m4/libtool.m4 b/m4/libtool.m4 62 - index d9322d0..9046a84 100644 63 - --- a/m4/libtool.m4 64 - +++ b/m4/libtool.m4 65 - @@ -5130,6 +5130,7 @@ _LT_EOF 66 - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67 - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 68 - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 69 - + _LT_TAGVAR(file_list_spec, $1)='@' 70 - 71 - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 72 - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 73 - @@ -6706,6 +6707,7 @@ if test yes != "$_lt_caught_CXX_error"; then 74 - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 75 - _LT_TAGVAR(always_export_symbols, $1)=no 76 - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 77 - + _LT_TAGVAR(file_list_spec, $1)='@' 78 - 79 - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 80 - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 81 - -- 82 - 2.7.4 83 -
-38
pkgs/development/tools/misc/libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch
··· 1 - From b9f77cae8cfbe850e58cac686fcb4d246b5bfc51 Mon Sep 17 00:00:00 2001 2 - From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st> 3 - Date: Mon, 19 Aug 2019 13:34:51 +0300 4 - Subject: [PATCH] Allow statically linking compiler support libraries when 5 - linking a library 6 - 7 - For cases with deplibs_check_method="file_magic ..." (as it is for mingw), 8 - there were previously no way that a static library could be accepted 9 - here. 10 - --- 11 - build-aux/ltmain.in | 11 +++++++++-- 12 - 1 file changed, 9 insertions(+), 2 deletions(-) 13 - 14 - diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in 15 - index e2fb2633..db4d775c 100644 16 - --- a/build-aux/ltmain.in 17 - +++ b/build-aux/ltmain.in 18 - @@ -5870,8 +5870,15 @@ func_mode_link () 19 - fi 20 - case $linkmode in 21 - lib) 22 - - # Linking convenience modules into shared libraries is allowed, 23 - - # but linking other static libraries is non-portable. 24 - + # Linking convenience modules and compiler provided static libraries 25 - + # into shared libraries is allowed, but linking other static 26 - + # libraries is non-portable. 27 - + case $deplib in 28 - + */libgcc*.$libext | */libclang_rt*.$libext) 29 - + deplibs="$deplib $deplibs" 30 - + continue 31 - + ;; 32 - + esac 33 - case " $dlpreconveniencelibs " in 34 - *" $deplib "*) ;; 35 - *) 36 - -- 37 - 2.17.1 38 -
-39
pkgs/development/tools/misc/libtool/0014-Support-llvm-objdump-f-output.patch
··· 1 - From 03dabb6a70847761e65572a2a7b770a3b1b9f123 Mon Sep 17 00:00:00 2001 2 - From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= <mati865@gmail.com> 3 - Date: Mon, 12 Apr 2021 23:44:10 +0200 4 - Subject: [PATCH] Support llvm-objdump -f output 5 - 6 - --- 7 - build-aux/ltmain.in | 2 +- 8 - m4/libtool.m4 | 2 +- 9 - 2 files changed, 2 insertions(+), 2 deletions(-) 10 - 11 - diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in 12 - index a9f070a..4a434cc 100644 13 - --- a/build-aux/ltmain.in 14 - +++ b/build-aux/ltmain.in 15 - @@ -3019,7 +3019,7 @@ func_win32_libid () 16 - *ar\ archive*) # could be an import, or static 17 - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. 18 - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | 19 - - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then 20 - + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|coff-arm|coff-arm64|coff-i386|coff-x86-64)' >/dev/null; then 21 - case $nm_interface in 22 - "MS dumpbin") 23 - if func_cygming_ms_implib_p "$1" || 24 - diff --git a/m4/libtool.m4 b/m4/libtool.m4 25 - index 21a7d60..594be9c 100644 26 - --- a/m4/libtool.m4 27 - +++ b/m4/libtool.m4 28 - @@ -3473,7 +3473,7 @@ mingw* | pw32*) 29 - lt_cv_file_magic_cmd='func_win32_libid' 30 - else 31 - # Keep this pattern in sync with the one in func_win32_libid. 32 - - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 33 - + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|coff-arm|coff-arm64|coff-i386|coff-x86-64)' 34 - lt_cv_file_magic_cmd='$OBJDUMP -f' 35 - fi 36 - ;; 37 - -- 38 - 2.31.1 39 -
-14
pkgs/development/tools/misc/libtool/libtool2.nix
··· 23 23 # https://lists.gnu.org/archive/html/autotools-announce/2022-03/msg00000.html 24 24 FILECMD = "${file}/bin/file"; 25 25 26 - patches = [ 27 - # Patches from msys2 fixing various bugs with useClang platforms 28 - # targeting Windows. Especially https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866 29 - ./0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch 30 - ./0005-Fix-seems-to-be-moved.patch 31 - ./0006-Fix-strict-ansi-vs-posix.patch 32 - ./0007-fix-cr-for-awk-in-configure.all.patch 33 - ./0010-libtool-2.4.2-include-process-h.patch 34 - ./0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch 35 - ./0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch 36 - ./0013-Allow-statically-linking-compiler-support-libraries-.patch 37 - ./0014-Support-llvm-objdump-f-output.patch 38 - ]; 39 - 40 26 # Normally we'd use autoreconfHook, but that includes libtoolize. 41 27 postPatch = '' 42 28 aclocal -I m4
-1
pkgs/os-specific/darwin/binutils/default.nix
··· 65 65 66 66 passthru = { 67 67 inherit targetPrefix; 68 - isCctools = true; 69 68 }; 70 69 71 70 meta = {
+3 -23
pkgs/os-specific/windows/mingw-w64/default.nix
··· 1 1 { lib, stdenv, windows, fetchurl }: 2 2 3 3 let 4 - version = "10.0.0"; 5 - 6 - knownArches = [ "32" "64" "arm32" "arm64" ]; 7 - enabledArch = 8 - if stdenv.targetPlatform.isAarch32 9 - then "arm32" 10 - else if stdenv.targetPlatform.isAarch64 11 - then "arm64" 12 - else if stdenv.targetPlatform.isx86_32 13 - then "32" 14 - else if stdenv.targetPlatform.isx86_64 15 - then "64" 16 - else null; 17 - archFlags = 18 - if enabledArch == null 19 - then [] # maybe autoconf will save us 20 - else map (arch: lib.enableFeature (arch == enabledArch) "lib${arch}") knownArches; 21 - 22 - crt = stdenv.hostPlatform.libc; 4 + version = "9.0.0"; 23 5 in stdenv.mkDerivation { 24 6 pname = "mingw-w64"; 25 7 inherit version; 26 8 27 9 src = fetchurl { 28 10 url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2"; 29 - sha256 = "sha256-umtDCu1yxjo3aFMfaj/8Kw/eLFejslFFDc9ImolPCJQ="; 11 + sha256 = "10a15bi4lyfi0k0haj0klqambicwma6yi7vssgbz8prg815vja8r"; 30 12 }; 31 13 32 14 outputs = [ "out" "dev" ]; ··· 34 16 configureFlags = [ 35 17 "--enable-idl" 36 18 "--enable-secure-api" 37 - "--with-default-msvcrt=${crt}" 38 - ] ++ archFlags; 19 + ]; 39 20 40 21 enableParallelBuilding = true; 41 22 ··· 45 26 46 27 meta = { 47 28 platforms = lib.platforms.windows; 48 - broken = !(lib.elem crt [ "msvcrt" "ucrt" ]); 49 29 }; 50 30 }
+1 -9
pkgs/os-specific/windows/mingw-w64/headers.nix
··· 1 1 { stdenvNoCC, mingw_w64 }: 2 2 3 - let 4 - crt = stdenvNoCC.hostPlatform.libc; 5 - in stdenvNoCC.mkDerivation { 3 + stdenvNoCC.mkDerivation { 6 4 name = "${mingw_w64.name}-headers"; 7 5 inherit (mingw_w64) src meta; 8 6 9 7 preConfigure = '' 10 8 cd mingw-w64-headers 11 9 ''; 12 - 13 - configureFlags = [ 14 - "--enable-idl" 15 - "--enable-secure-api" 16 - "--with-default-msvcrt=${crt}" 17 - ]; 18 10 19 11 }
+2 -2
pkgs/top-level/all-packages.nix
··· 17402 17402 # These are used when buiding compiler-rt / libgcc, prior to building libc. 17403 17403 preLibcCrossHeaders = let 17404 17404 inherit (stdenv.targetPlatform) libc; 17405 - in if libc == "msvcrt" || libc == "ucrt" then targetPackages.windows.mingw_w64_headers or windows.mingw_w64_headers 17405 + in if libc == "msvcrt" then targetPackages.windows.mingw_w64_headers or windows.mingw_w64_headers 17406 17406 else if libc == "nblibc" then targetPackages.netbsdCross.headers or netbsdCross.headers 17407 17407 else if libc == "libSystem" && stdenv.targetPlatform.isAarch64 then targetPackages.darwin.LibsystemCross or darwin.LibsystemCross 17408 17408 else null; ··· 17421 17421 else if name == "newlib" then targetPackages.newlibCross or newlibCross 17422 17422 else if name == "newlib-nano" then targetPackages.newlib-nanoCross or newlib-nanoCross 17423 17423 else if name == "musl" then targetPackages.muslCross or muslCross 17424 - else if name == "msvcrt" || name == "ucrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64 17424 + else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64 17425 17425 else if name == "libSystem" then 17426 17426 if stdenv.targetPlatform.useiOSPrebuilt 17427 17427 then targetPackages.darwin.iosSdkPkgs.libraries or darwin.iosSdkPkgs.libraries
+1
pkgs/top-level/haskell-packages.nix
··· 145 145 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 146 146 buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12; 147 147 llvmPackages = pkgs.llvmPackages_12; 148 + libffi = pkgs.libffi; 148 149 }; 149 150 150 151 ghcjs = compiler.ghcjs810;