gcc: Get rid of crossAttrs

Only a little bit was left
This commit is contained in:
John Ericson 2018-05-10 11:56:52 -04:00
parent 1e966f9aa6
commit c42118bb82
7 changed files with 47 additions and 85 deletions

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, darwin ? null
, buildPlatform, hostPlatform, targetPlatform
@ -371,21 +372,17 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = if bootstrap then
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -487,8 +484,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, darwin ? null
, buildPlatform, hostPlatform, targetPlatform
@ -393,21 +394,17 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = if bootstrap then
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -505,9 +502,6 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
// optionalAttrs (langJava) {

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -396,21 +397,17 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = if bootstrap then
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -508,8 +505,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -400,20 +401,17 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags =
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -511,9 +509,6 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
// optionalAttrs (langJava) {

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -406,20 +407,17 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags =
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -517,8 +515,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)

View File

@ -18,7 +18,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -347,20 +348,17 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags =
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -447,8 +445,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -371,17 +372,14 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
dontStrip = !stripped;
NIX_STRIP_DEBUG = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -481,8 +479,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; NIX_STRIP_DEBUG = 0; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)