File tree Expand file tree Collapse file tree
development/compilers/gcc
os-specific/linux/minimal-bootstrap/gcc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 enablePlugin ,
2121 disableGdbPlugin ? ! enablePlugin ,
2222 enableShared ,
23+ targetPrefix ,
2324
2425 langC ,
2526 langCC ,
5960 crossDarwin =
6061 ( ! lib . systems . equals targetPlatform hostPlatform ) && targetPlatform . libc == "libSystem" ;
6162
62- targetPrefix = lib . optionalString (
63- ! lib . systems . equals stdenv . targetPlatform stdenv . hostPlatform
64- ) "${ stdenv . targetPlatform . config } -" ;
65-
6663 crossConfigureFlags =
6764 # Ensure that -print-prog-name is able to find the correct programs.
6865 [
Original file line number Diff line number Diff line change 1- { lib , version } :
1+ {
2+ lib ,
3+ version ,
4+ targetPrefix ,
5+ } :
26
37let
48 inherit ( lib )
2428
2529 platforms = platforms . unix ;
2630 teams = [ teams . gcc ] ;
31+ mainProgram = "${ targetPrefix } gcc" ;
2732
2833}
Original file line number Diff line number Diff line change 119119 ! lib . systems . equals targetPlatform hostPlatform
120120 ) "${ targetPlatform . config } ${ stageNameAddon } -" ;
121121
122+ targetPrefix = lib . optionalString (
123+ ! lib . systems . equals stdenv . targetPlatform stdenv . hostPlatform
124+ ) "${ stdenv . targetPlatform . config } -" ;
125+
122126 callFile = callPackageWith {
123127 # lets
124128 inherit
340344 "target"
341345 ] ;
342346
343- configureFlags = callFile ./common/configure-flags.nix { } ;
347+ configureFlags = callFile ./common/configure-flags.nix { inherit targetPrefix ; } ;
344348
345349 inherit targetConfig ;
346350
@@ -449,13 +453,14 @@ pipe
449453 inherit enableShared enableMultilib ;
450454
451455 meta = {
452- inherit ( callFile ./common/meta.nix { } )
456+ inherit ( callFile ./common/meta.nix { inherit targetPrefix ; } )
453457 homepage
454458 license
455459 description
456460 longDescription
457461 platforms
458462 teams
463+ mainProgram
459464 ;
460465 }
461466 // optionalAttrs ( ! atLeast11 ) {
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ bash.runCommand "${pname}-${version}"
102102 license = licenses . gpl3Plus ;
103103 teams = [ teams . minimal-bootstrap ] ;
104104 platforms = platforms . unix ;
105+ mainProgram = "gcc" ;
105106 } ;
106107 }
107108 ''
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ bash.runCommand "${pname}-${version}"
8484 license = licenses . gpl3Plus ;
8585 teams = [ teams . minimal-bootstrap ] ;
8686 platforms = platforms . unix ;
87+ mainProgram = "gcc" ;
8788 } ;
8889 }
8990 ''
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ bash.runCommand "${pname}-${version}"
101101 license = licenses . gpl3Plus ;
102102 teams = [ teams . minimal-bootstrap ] ;
103103 platforms = platforms . unix ;
104+ mainProgram = "gcc" ;
104105 } ;
105106 }
106107 ''
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ bash.runCommand "${pname}-${version}"
100100 license = licenses . gpl3Plus ;
101101 teams = [ teams . minimal-bootstrap ] ;
102102 platforms = platforms . unix ;
103+ mainProgram = "gcc" ;
103104 } ;
104105 }
105106 ''
You can’t perform that action at this time.
0 commit comments