mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
stdenv: linux: centralise updateAutotoolsGnuConfigScriptsHook in stageFun
The hook was added six times — once in each of stages 1, xgcc, 2, 3, 4 (and again at the final stdenv) — to teach configure scripts about non-x86_64 architectures. Wire it once inside stageFun instead, guarded by `prevStage ? updateAutotoolsGnuConfigScriptsHook` so the dummy stage (whose prevStage is the raw stub) is unaffected. The final stdenv (built outside stageFun) keeps its explicit entry. Eval-verified: stdenv.drvPath is unchanged from master (q2xn5647kadsgpz40xcmjssa0pmdmiwi-stdenv-linux.drv).
This commit is contained in:
parent
8627190cae
commit
5c20ed83dd
1 changed files with 7 additions and 15 deletions
|
|
@ -181,7 +181,13 @@ let
|
|||
buildPlatform = localSystem;
|
||||
hostPlatform = localSystem;
|
||||
targetPlatform = localSystem;
|
||||
inherit extraNativeBuildInputs;
|
||||
# Every real (post-dummy) stage needs this hook so configure scripts
|
||||
# can recognise architectures (LoongArch, RISC-V, etc.).
|
||||
extraNativeBuildInputs =
|
||||
extraNativeBuildInputs
|
||||
++ lib.optional (
|
||||
prevStage ? updateAutotoolsGnuConfigScriptsHook
|
||||
) prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
inherit (stage0) initialPath;
|
||||
preHook = ''
|
||||
# Don't patch #!/interpreter because it leads to retained
|
||||
|
|
@ -311,9 +317,6 @@ in
|
|||
};
|
||||
});
|
||||
};
|
||||
|
||||
# `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64.
|
||||
extraNativeBuildInputs = [ prevStage.updateAutotoolsGnuConfigScriptsHook ];
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -427,9 +430,6 @@ in
|
|||
'';
|
||||
});
|
||||
};
|
||||
|
||||
# `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64.
|
||||
extraNativeBuildInputs = [ prevStage.updateAutotoolsGnuConfigScriptsHook ];
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -531,10 +531,6 @@ in
|
|||
);
|
||||
|
||||
};
|
||||
|
||||
# `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64.
|
||||
# `libtool` comes with obsolete config.sub/config.guess that don't recognize Risc-V.
|
||||
extraNativeBuildInputs = [ prevStage.updateAutotoolsGnuConfigScriptsHook ];
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -605,8 +601,6 @@ in
|
|||
};
|
||||
extraNativeBuildInputs = [
|
||||
prevStage.patchelf
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
prevStage.updateAutotoolsGnuConfigScriptsHook
|
||||
];
|
||||
}
|
||||
)
|
||||
|
|
@ -671,8 +665,6 @@ in
|
|||
extraNativeBuildInputs = [
|
||||
prevStage.patchelf
|
||||
prevStage.xz
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
prevStage.updateAutotoolsGnuConfigScriptsHook
|
||||
];
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue