Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

openmp: fix cross compile

squalus 4b07aeae e0e0c4db

+70 -20
+2 -1
pkgs/development/compilers/llvm/10/default.nix
··· 3 3 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith 4 4 , buildLlvmTools # tools, but from the previous stage, for cross 5 5 , targetLlvmLibraries # libraries, but from the next stage, for cross 6 + , targetLlvm 6 7 # This is the default binutils, but with *this* version of LLD rather 7 8 # than the default LLVM verion's, if LLD is the choice. We use these for 8 9 # the `useLLVM` bootstrapping below. ··· 259 260 }; 260 261 261 262 openmp = callPackage ./openmp { 262 - inherit llvm_meta; 263 + inherit llvm_meta targetLlvm; 263 264 }; 264 265 }); 265 266
+4 -1
pkgs/development/compilers/llvm/10/openmp/default.nix
··· 4 4 , fetch 5 5 , cmake 6 6 , llvm 7 + , targetLlvm 7 8 , perl 8 9 , version 9 10 }: ··· 15 16 src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi"; 16 17 17 18 nativeBuildInputs = [ cmake perl ]; 18 - buildInputs = [ llvm ]; 19 + buildInputs = [ 20 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 21 + ]; 19 22 20 23 meta = llvm_meta // { 21 24 homepage = "https://openmp.llvm.org/";
+2 -1
pkgs/development/compilers/llvm/11/default.nix
··· 3 3 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith 4 4 , buildLlvmTools # tools, but from the previous stage, for cross 5 5 , targetLlvmLibraries # libraries, but from the next stage, for cross 6 + , targetLlvm 6 7 # This is the default binutils, but with *this* version of LLD rather 7 8 # than the default LLVM verion's, if LLD is the choice. We use these for 8 9 # the `useLLVM` bootstrapping below. ··· 274 275 }; 275 276 276 277 openmp = callPackage ./openmp { 277 - inherit llvm_meta; 278 + inherit llvm_meta targetLlvm; 278 279 }; 279 280 }); 280 281
+4 -1
pkgs/development/compilers/llvm/11/openmp/default.nix
··· 5 5 , fetchpatch 6 6 , cmake 7 7 , llvm 8 + , targetLlvm 8 9 , perl 9 10 , version 10 11 }: ··· 25 26 ]; 26 27 27 28 nativeBuildInputs = [ cmake perl ]; 28 - buildInputs = [ llvm ]; 29 + buildInputs = [ 30 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 31 + ]; 29 32 30 33 meta = llvm_meta // { 31 34 homepage = "https://openmp.llvm.org/";
+2 -1
pkgs/development/compilers/llvm/12/default.nix
··· 3 3 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith 4 4 , buildLlvmTools # tools, but from the previous stage, for cross 5 5 , targetLlvmLibraries # libraries, but from the next stage, for cross 6 + , targetLlvm 6 7 # This is the default binutils, but with *this* version of LLD rather 7 8 # than the default LLVM verion's, if LLD is the choice. We use these for 8 9 # the `useLLVM` bootstrapping below. ··· 267 268 }; 268 269 269 270 openmp = callPackage ./openmp { 270 - inherit llvm_meta; 271 + inherit llvm_meta targetLlvm; 271 272 }; 272 273 }); 273 274
+4 -1
pkgs/development/compilers/llvm/12/openmp/default.nix
··· 4 4 , fetch 5 5 , cmake 6 6 , llvm 7 + , targetLlvm 7 8 , perl 8 9 , version 9 10 }: ··· 15 16 src = fetch pname "14dh0r6h2xh747ffgnsl4z08h0ri04azi9vf79cbz7ma1r27kzk0"; 16 17 17 18 nativeBuildInputs = [ cmake perl ]; 18 - buildInputs = [ llvm ]; 19 + buildInputs = [ 20 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 21 + ]; 19 22 20 23 meta = llvm_meta // { 21 24 homepage = "https://openmp.llvm.org/";
+2 -1
pkgs/development/compilers/llvm/13/default.nix
··· 3 3 , libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith 4 4 , buildLlvmTools # tools, but from the previous stage, for cross 5 5 , targetLlvmLibraries # libraries, but from the next stage, for cross 6 + , targetLlvm 6 7 # This is the default binutils, but with *this* version of LLD rather 7 8 # than the default LLVM verion's, if LLD is the choice. We use these for 8 9 # the `useLLVM` bootstrapping below. ··· 276 277 }; 277 278 278 279 openmp = callPackage ./openmp { 279 - inherit llvm_meta; 280 + inherit llvm_meta targetLlvm; 280 281 }; 281 282 }); 282 283
+4 -1
pkgs/development/compilers/llvm/13/openmp/default.nix
··· 4 4 , src 5 5 , cmake 6 6 , llvm 7 + , targetLlvm 7 8 , perl 8 9 , version 9 10 }: ··· 16 17 sourceRoot = "source/${pname}"; 17 18 18 19 nativeBuildInputs = [ cmake perl ]; 19 - buildInputs = [ llvm ]; 20 + buildInputs = [ 21 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 22 + ]; 20 23 21 24 cmakeFlags = [ 22 25 "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" # Building the AMDGCN device RTL currently fails
+2 -1
pkgs/development/compilers/llvm/14/default.nix
··· 3 3 , libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith 4 4 , buildLlvmTools # tools, but from the previous stage, for cross 5 5 , targetLlvmLibraries # libraries, but from the next stage, for cross 6 + , targetLlvm 6 7 # This is the default binutils, but with *this* version of LLD rather 7 8 # than the default LLVM verion's, if LLD is the choice. We use these for 8 9 # the `useLLVM` bootstrapping below. ··· 273 274 }; 274 275 275 276 openmp = callPackage ./openmp { 276 - inherit llvm_meta; 277 + inherit llvm_meta targetLlvm; 277 278 }; 278 279 }); 279 280
+4 -1
pkgs/development/compilers/llvm/14/openmp/default.nix
··· 5 5 , runCommand 6 6 , cmake 7 7 , llvm 8 + , targetLlvm 8 9 , lit 9 10 , clang-unwrapped 10 11 , perl ··· 32 33 outputs = [ "out" "dev" ]; 33 34 34 35 nativeBuildInputs = [ cmake perl pkg-config lit ]; 35 - buildInputs = [ llvm ]; 36 + buildInputs = [ 37 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 38 + ]; 36 39 37 40 # Unsup:Pass:XFail:Fail 38 41 # 26:267:16:8
+2 -1
pkgs/development/compilers/llvm/5/default.nix
··· 2 2 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith 3 3 , buildLlvmTools # tools, but from the previous stage, for cross 4 4 , targetLlvmLibraries # libraries, but from the next stage, for cross 5 + , targetLlvm 5 6 }: 6 7 7 8 let ··· 121 122 }; 122 123 123 124 openmp = callPackage ./openmp { 124 - inherit llvm_meta; 125 + inherit llvm_meta targetLlvm; 125 126 }; 126 127 }); 127 128
+4 -1
pkgs/development/compilers/llvm/5/openmp/default.nix
··· 4 4 , fetch 5 5 , cmake 6 6 , llvm 7 + , targetLlvm 7 8 , perl 8 9 , version 9 10 }: ··· 15 16 src = fetch "openmp" "0p2n52676wlq6y9q99n5pivq6pvvda1p994r69fxj206ahn59jir"; 16 17 17 18 nativeBuildInputs = [ cmake perl ]; 18 - buildInputs = [ llvm ]; 19 + buildInputs = [ 20 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 21 + ]; 19 22 20 23 meta = llvm_meta // { 21 24 homepage = "https://openmp.llvm.org/";
+2 -1
pkgs/development/compilers/llvm/6/default.nix
··· 2 2 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith 3 3 , buildLlvmTools # tools, but from the previous stage, for cross 4 4 , targetLlvmLibraries # libraries, but from the next stage, for cross 5 + , targetLlvm 5 6 }: 6 7 7 8 let ··· 122 123 }; 123 124 124 125 openmp = callPackage ./openmp { 125 - inherit llvm_meta; 126 + inherit llvm_meta targetLlvm; 126 127 }; 127 128 }); 128 129
+4 -1
pkgs/development/compilers/llvm/6/openmp/default.nix
··· 4 4 , fetch 5 5 , cmake 6 6 , llvm 7 + , targetLlvm 7 8 , perl 8 9 , version 9 10 }: ··· 15 16 src = fetch "openmp" "0nhwfba9c351r16zgyjyfwdayr98nairky3c2f0b2lc360mwmbv6"; 16 17 17 18 nativeBuildInputs = [ cmake perl ]; 18 - buildInputs = [ llvm ]; 19 + buildInputs = [ 20 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 21 + ]; 19 22 20 23 meta = llvm_meta // { 21 24 homepage = "https://openmp.llvm.org/";
+2 -1
pkgs/development/compilers/llvm/7/default.nix
··· 3 3 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith 4 4 , buildLlvmTools # tools, but from the previous stage, for cross 5 5 , targetLlvmLibraries # libraries, but from the next stage, for cross 6 + , targetLlvm 6 7 # This is the default binutils, but with *this* version of LLD rather 7 8 # than the default LLVM verion's, if LLD is the choice. We use these for 8 9 # the `useLLVM` bootstrapping below. ··· 268 269 }; 269 270 270 271 openmp = callPackage ./openmp { 271 - inherit llvm_meta; 272 + inherit llvm_meta targetLlvm; 272 273 }; 273 274 }); 274 275
+4 -1
pkgs/development/compilers/llvm/7/openmp/default.nix
··· 4 4 , fetch 5 5 , cmake 6 6 , llvm 7 + , targetLlvm 7 8 , perl 8 9 , version 9 10 }: ··· 15 16 src = fetch "openmp" "1dg53wzsci2kra8lh1y0chh60h2l8h1by93br5spzvzlxshkmrqy"; 16 17 17 18 nativeBuildInputs = [ cmake perl ]; 18 - buildInputs = [ llvm ]; 19 + buildInputs = [ 20 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 21 + ]; 19 22 20 23 meta = llvm_meta // { 21 24 homepage = "https://openmp.llvm.org/";
+2 -1
pkgs/development/compilers/llvm/8/default.nix
··· 3 3 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith 4 4 , buildLlvmTools # tools, but from the previous stage, for cross 5 5 , targetLlvmLibraries # libraries, but from the next stage, for cross 6 + , targetLlvm 6 7 # This is the default binutils, but with *this* version of LLD rather 7 8 # than the default LLVM verion's, if LLD is the choice. We use these for 8 9 # the `useLLVM` bootstrapping below. ··· 267 268 }; 268 269 269 270 openmp = callPackage ./openmp { 270 - inherit llvm_meta; 271 + inherit llvm_meta targetLlvm; 271 272 }; 272 273 }); 273 274
+4 -1
pkgs/development/compilers/llvm/8/openmp/default.nix
··· 4 4 , fetch 5 5 , cmake 6 6 , llvm 7 + , targetLlvm 7 8 , perl 8 9 , version 9 10 }: ··· 15 16 src = fetch "openmp" "0b3jlxhqbpyd1nqkpxjfggm5d9va5qpyf7d4i5y7n4a1mlydv19y"; 16 17 17 18 nativeBuildInputs = [ cmake perl ]; 18 - buildInputs = [ llvm ]; 19 + buildInputs = [ 20 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 21 + ]; 19 22 20 23 meta = llvm_meta // { 21 24 homepage = "https://openmp.llvm.org/";
+2 -1
pkgs/development/compilers/llvm/9/default.nix
··· 3 3 , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith 4 4 , buildLlvmTools # tools, but from the previous stage, for cross 5 5 , targetLlvmLibraries # libraries, but from the next stage, for cross 6 + , targetLlvm 6 7 # This is the default binutils, but with *this* version of LLD rather 7 8 # than the default LLVM verion's, if LLD is the choice. We use these for 8 9 # the `useLLVM` bootstrapping below. ··· 267 268 }; 268 269 269 270 openmp = callPackage ./openmp { 270 - inherit llvm_meta; 271 + inherit llvm_meta targetLlvm; 271 272 }; 272 273 }); 273 274
+4 -1
pkgs/development/compilers/llvm/9/openmp/default.nix
··· 4 4 , fetch 5 5 , cmake 6 6 , llvm 7 + , targetLlvm 7 8 , perl 8 9 , version 9 10 }: ··· 15 16 src = fetch pname "1knafnpp0f7hylx8q20lkd6g1sf0flly572dayc5d5kghh7hd52w"; 16 17 17 18 nativeBuildInputs = [ cmake perl ]; 18 - buildInputs = [ llvm ]; 19 + buildInputs = [ 20 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 21 + ]; 19 22 20 23 meta = llvm_meta // { 21 24 homepage = "https://openmp.llvm.org/";
+10
pkgs/top-level/all-packages.nix
··· 14521 14521 llvmPackages_5 = recurseIntoAttrs (callPackage ../development/compilers/llvm/5 { 14522 14522 inherit (stdenvAdapters) overrideCC; 14523 14523 buildLlvmTools = buildPackages.llvmPackages_5.tools; 14524 + targetLlvm = targetPackages.llvmPackages_5.llvm or llvmPackages_5.llvm; 14524 14525 targetLlvmLibraries = targetPackages.llvmPackages_5.libraries or llvmPackages_5.libraries; 14525 14526 }); 14526 14527 14527 14528 llvmPackages_6 = recurseIntoAttrs (callPackage ../development/compilers/llvm/6 { 14528 14529 inherit (stdenvAdapters) overrideCC; 14529 14530 buildLlvmTools = buildPackages.llvmPackages_6.tools; 14531 + targetLlvm = targetPackages.llvmPackages_6.llvm or llvmPackages_6.llvm; 14530 14532 targetLlvmLibraries = targetPackages.llvmPackages_6.libraries or llvmPackages_6.libraries; 14531 14533 }); 14532 14534 14533 14535 llvmPackages_7 = recurseIntoAttrs (callPackage ../development/compilers/llvm/7 { 14534 14536 inherit (stdenvAdapters) overrideCC; 14535 14537 buildLlvmTools = buildPackages.llvmPackages_7.tools; 14538 + targetLlvm = targetPackages.llvmPackages_7.llvm or llvmPackages_7.llvm; 14536 14539 targetLlvmLibraries = targetPackages.llvmPackages_7.libraries or llvmPackages_7.libraries; 14537 14540 }); 14538 14541 14539 14542 llvmPackages_8 = recurseIntoAttrs (callPackage ../development/compilers/llvm/8 { 14540 14543 inherit (stdenvAdapters) overrideCC; 14541 14544 buildLlvmTools = buildPackages.llvmPackages_8.tools; 14545 + targetLlvm = targetPackages.llvmPackages_8.llvm or llvmPackages_8.llvm; 14542 14546 targetLlvmLibraries = targetPackages.llvmPackages_8.libraries or llvmPackages_8.libraries; 14543 14547 }); 14544 14548 14545 14549 llvmPackages_9 = recurseIntoAttrs (callPackage ../development/compilers/llvm/9 { 14546 14550 inherit (stdenvAdapters) overrideCC; 14547 14551 buildLlvmTools = buildPackages.llvmPackages_9.tools; 14552 + targetLlvm = targetPackages.llvmPackages_9.llvm or llvmPackages_9.llvm; 14548 14553 targetLlvmLibraries = targetPackages.llvmPackages_9.libraries or llvmPackages_9.libraries; 14549 14554 }); 14550 14555 14551 14556 llvmPackages_10 = recurseIntoAttrs (callPackage ../development/compilers/llvm/10 { 14552 14557 inherit (stdenvAdapters) overrideCC; 14553 14558 buildLlvmTools = buildPackages.llvmPackages_10.tools; 14559 + targetLlvm = targetPackages.llvmPackages_10.llvm or llvmPackages_10.llvm; 14554 14560 targetLlvmLibraries = targetPackages.llvmPackages_10.libraries or llvmPackages_10.libraries; 14555 14561 }); 14556 14562 ··· 14558 14564 inherit (stdenvAdapters) overrideCC; 14559 14565 buildLlvmTools = buildPackages.llvmPackages_11.tools; 14560 14566 targetLlvmLibraries = targetPackages.llvmPackages_11.libraries or llvmPackages_11.libraries; 14567 + targetLlvm = targetPackages.llvmPackages_11.llvm or llvmPackages_11.llvm; 14561 14568 } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.hostPlatform == stdenv.buildPlatform && buildPackages.stdenv.cc.isGNU) { 14562 14569 stdenv = gcc7Stdenv; 14563 14570 })); ··· 14566 14573 inherit (stdenvAdapters) overrideCC; 14567 14574 buildLlvmTools = buildPackages.llvmPackages_12.tools; 14568 14575 targetLlvmLibraries = targetPackages.llvmPackages_12.libraries or llvmPackages_12.libraries; 14576 + targetLlvm = targetPackages.llvmPackages_12.llvm or llvmPackages_12.llvm; 14569 14577 } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.hostPlatform == stdenv.buildPlatform && buildPackages.stdenv.cc.isGNU) { 14570 14578 stdenv = gcc7Stdenv; 14571 14579 })); ··· 14574 14582 inherit (stdenvAdapters) overrideCC; 14575 14583 buildLlvmTools = buildPackages.llvmPackages_13.tools; 14576 14584 targetLlvmLibraries = targetPackages.llvmPackages_13.libraries or llvmPackages_13.libraries; 14585 + targetLlvm = targetPackages.llvmPackages_13.llvm or llvmPackages_13.llvm; 14577 14586 } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.hostPlatform == stdenv.buildPlatform && buildPackages.stdenv.cc.isGNU) { 14578 14587 stdenv = gcc7Stdenv; 14579 14588 })); ··· 14582 14591 inherit (stdenvAdapters) overrideCC; 14583 14592 buildLlvmTools = buildPackages.llvmPackages_14.tools; 14584 14593 targetLlvmLibraries = targetPackages.llvmPackages_14.libraries or llvmPackages_14.libraries; 14594 + targetLlvm = targetPackages.llvmPackages_14.llvm or llvmPackages_14.llvm; 14585 14595 } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.hostPlatform == stdenv.buildPlatform && buildPackages.stdenv.cc.isGNU) { 14586 14596 stdenv = gcc7Stdenv; 14587 14597 }));