diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2016-03-05 02:28:23 +0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2017-01-25 00:01:52 +0200 |
commit | c909f1b18e9c5deecdfe6d46c7e9901fe3e6cf83 (patch) | |
tree | dae9070347f134502f6897a9544cb235162c56d0 /pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh | |
parent | 6e46dbf8e7c2362aab5823207c27c6d7e3870f11 (diff) |
stdenv: Add updateAutoconfGnuConfigScriptsHook for aarch64
This is required for Aarch64 since a lot of source tarballs ship with outdated configure scripts that don't recognize aarch64. Simply replacing the config.guess and config.sub with new versions from upstream makes them build again. This same approach is used by at least Buildroot and Fedora. In principle this could be enabled for all architectures but conditionalizing this on aarch64 avoids a mass rebuild on x86.
Diffstat (limited to 'pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh')
-rw-r--r-- | pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh b/pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh new file mode 100644 index 0000000000000..5e33ace42b372 --- /dev/null +++ b/pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh @@ -0,0 +1,12 @@ +preConfigurePhases+=" updateAutotoolsGnuConfigScriptsPhase" + +updateAutotoolsGnuConfigScriptsPhase() { + if [ -n "$dontUpdateAutotoolsGnuConfigScripts" ]; then return; fi + + for script in config.sub config.guess; do + for f in $(find . -name "$script"); do + echo "Updating Autotools / GNU config script to a newer upstream version: $f" + cp -f "@gnu_config@/$script" "$f" + done + done +} |