From b84b45ca06c17e4aee0b85c16e7a8e5f314b60d2 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Fri, 6 Sep 2024 20:15:25 +0200 Subject: [PATCH] clarify configure option to limit the number of cores used by Guix. Signed-off-by: Denis 'GNUtoo' Carikli Acked-by: Adrien 'neox' Bourmault --- configure.ac | 16 +++++++++------- .../i945-thinkpads-install-utilities/Makefile.am | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 2d08102..4880b58 100644 --- a/configure.ac +++ b/configure.ac @@ -20,16 +20,16 @@ AC_CONFIG_FILES([ resources/packages/i945-thinkpads-install-utilities/Makefile ]) -AC_SUBST([GUIX_BUILD_CORES], []) +AC_SUBST([GUIX_BUILD_MAX_CORES], []) -# --with-guix-build-cores -AC_ARG_WITH([guix-build-cores], - [AS_HELP_STRING([--with-guix-build-cores=N], +# --with-guix-build-max-cores +AC_ARG_WITH([guix-build-max-cores], + [AS_HELP_STRING([--with-guix-build-max-cores=N], [Force guix build the use of up to N CPU cores for the build. Lowering the number of cores used can help when there is not enough RAM per core.])], - [GUIX_BUILD_CORES=$withval], - [GUIX_BUILD_CORES=0]) + [GUIX_BUILD_MAX_CORES=$withval], + [GUIX_BUILD_MAX_CORES=0]) AC_CHECK_PROG([FOUND_GUIX], [guix], [guix]) AS_IF([test x"$FOUND_GUIX" = x""], @@ -45,4 +45,6 @@ AC_OUTPUT AS_ECHO(["Configuration options:"]) -AS_ECHO([" GUIX_BUILD_CORES: $GUIX_BUILD_CORES"]) +AS_IF([test x"$GUIX_BUILD_MAX_CORES" = x"0"], + AS_ECHO([" GUIX_BUILD_MAX_CORES: not limited."]), + AS_ECHO([" GUIX_BUILD_MAX_CORES: $GUIX_BUILD_MAX_CORES"])) diff --git a/resources/packages/i945-thinkpads-install-utilities/Makefile.am b/resources/packages/i945-thinkpads-install-utilities/Makefile.am index 27d5c27..050c907 100644 --- a/resources/packages/i945-thinkpads-install-utilities/Makefile.am +++ b/resources/packages/i945-thinkpads-install-utilities/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Denis 'GNUtoo' Carikli +# Copyright (C) 2023,2024 Denis 'GNUtoo' Carikli # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -71,7 +71,7 @@ $(RELEASE_DIR)/packages_src.tar: Makefile source_guix_profile && \ guix time-machine --commit=$(GUIX_REVISION) -- \ build \ - -c $(GUIX_BUILD_CORES) \ + -c $(GUIX_BUILD_MAX_CORES) \ -L $(TOPDIR)/resources/guix/ \ -L $(TOPDIR)/resources/guix/gnuboot/patches \ --sources=transitive \