Merge pull request #39458 from oxij/stdenv/beautifications

stdenv: better names for cc and bintools
This commit is contained in:
John Ericson 2018-04-26 11:41:18 -04:00 committed by GitHub
commit 591d8c7a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 13 deletions

View File

@ -74,7 +74,7 @@ in
stdenv.mkDerivation {
name = targetPrefix
+ (if name != "" then name else "${bintoolsName}-wrapper")
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${bintoolsName}-wrapper")
+ (stdenv.lib.optionalString (bintools != null && bintoolsVersion != "") "-${bintoolsVersion}");
preferLocalBuild = true;

View File

@ -71,7 +71,7 @@ assert nativePrefix == bintools.nativePrefix;
stdenv.mkDerivation {
name = targetPrefix
+ (if name != "" then name else "${ccName}-wrapper")
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${ccName}-wrapper")
+ (stdenv.lib.optionalString (cc != null && ccVersion != "") "-${ccVersion}");
preferLocalBuild = true;

View File

@ -170,7 +170,7 @@ let version = "4.8.5";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
@ -180,7 +180,7 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;

View File

@ -164,7 +164,7 @@ let version = "4.9.4";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
@ -174,7 +174,7 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;

View File

@ -168,7 +168,7 @@ let version = "5.5.0";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
@ -178,7 +178,7 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;

View File

@ -167,7 +167,7 @@ let version = "6.4.0";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
@ -177,7 +177,7 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;

View File

@ -172,7 +172,7 @@ let version = "7.3.0";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
@ -182,7 +182,7 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;

View File

@ -6128,7 +6128,6 @@ with pkgs;
libc = libcCross1;
};
in wrapCCWith {
name = "gcc-cross-wrapper";
cc = gccFun {
# copy-pasted
inherit noSysDirs;