Merge pull request #40040 from obsidiansystems/gnu-config-arm

gnu-config: Update, allowing hacks to be removed
This commit is contained in:
John Ericson 2018-05-14 11:20:09 -04:00 committed by GitHub
commit d00cc1242f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 15 additions and 47 deletions

View file

@ -272,11 +272,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies

View file

@ -295,11 +295,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies

View file

@ -301,11 +301,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies

View file

@ -305,11 +305,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies

View file

@ -270,11 +270,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies

View file

@ -265,11 +265,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies

View file

@ -233,11 +233,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies

View file

@ -1,16 +1,16 @@
{ stdenv, fetchurl }: { stdenv, fetchurl }:
let let
rev = "6a82322dd05cdc57b4cd9f7effdf1e2fd6f7482b"; rev = "b75cdc942a6172f63b34faf642b8c797239f6776";
# Don't use fetchgit as this is needed during Aarch64 bootstrapping # Don't use fetchgit as this is needed during Aarch64 bootstrapping
configGuess = fetchurl { configGuess = fetchurl {
url = "http://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=${rev}"; url = "http://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=${rev}";
sha256 = "1yj9yi94h7z4z6jzickddv64ksz1aq5kj0c7krgzjn8xf8p3avmh"; sha256 = "1bb8z1wzjs81p9qrvji4bc2a8zyxjinz90k8xq7sxxdp6zrmq1sv";
}; };
configSub = fetchurl { configSub = fetchurl {
url = "http://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=${rev}"; url = "http://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=${rev}";
sha256 = "1qsqdpla6icbzskkk7v3zxrpzlpqlc94ny9hyy5wh5lm5rwwfvb7"; sha256 = "00dn5i2cp4iqap5vr368r5ifrgcjfq5pr97i4dkkdbha1han5hsc";
}; };
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {

View file

@ -104,11 +104,7 @@ stdenv.mkDerivation rec {
else "-static-libgcc"; else "-static-libgcc";
# TODO(@Ericson2314): Always pass "--target" and always targetPrefix. # TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = [ configureFlags = [
"--enable-targets=all" "--enable-64-bit-bfd" "--enable-targets=all" "--enable-64-bit-bfd"

View file

@ -249,7 +249,7 @@ in
}; };
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++ extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64. # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
lib.optional localSystem.isAarch64 prevStage.updateAutotoolsGnuConfigScriptsHook; lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
}) })
@ -290,7 +290,7 @@ in
}; };
extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++ extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64. # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
lib.optional localSystem.isAarch64 prevStage.updateAutotoolsGnuConfigScriptsHook; lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
}) })
# Construct the final stdenv. It uses the Glibc and GCC, and adds # Construct the final stdenv. It uses the Glibc and GCC, and adds
@ -322,7 +322,7 @@ in
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++ extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64. # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
lib.optional localSystem.isAarch64 prevStage.updateAutotoolsGnuConfigScriptsHook; lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
cc = prevStage.gcc; cc = prevStage.gcc;
@ -356,7 +356,7 @@ in
++ [ /*propagated from .dev*/ linuxHeaders ++ [ /*propagated from .dev*/ linuxHeaders
binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params
] ]
++ lib.optionals localSystem.isAarch64 ++ lib.optionals (!localSystem.isx86)
[ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ]; [ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ];
overrides = self: super: { overrides = self: super: {