lkml.org 
[lkml]   [2023]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/1] kbuild: deb-pkg: Allow parallel build
On Tue, Mar 14, 2023 at 2:10 AM Bastian Germann <bage@linutronix.de> wrote:
>
> Currently, the only way to build the deb-pkg generated package parallely
> is adding -jN to the MAKEFLAGS environment variable. The package ignores
> the usual parallel build option that is described in Debian Policy §4.9.1.



"dpkg-buildpackage -b -j16" worked for me.







> Derive make's -j parameter from the DEB_BUILD_OPTIONS environment variable
> that ends up being set by Debian's build tools.
>
> Link: https://www.debian.org/doc/debian-policy/ch-source.html
> Signed-off-by: Bastian Germann <bage@linutronix.de>
> ---
> scripts/package/deb-build-option | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/scripts/package/deb-build-option b/scripts/package/deb-build-option
> index b079b0d121d4..dd170e2b3018 100755
> --- a/scripts/package/deb-build-option
> +++ b/scripts/package/deb-build-option
> @@ -7,6 +7,12 @@ if [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUI
> echo CROSS_COMPILE=${DEB_HOST_GNU_TYPE}-
> fi
>
> +for build_opt in $DEB_BUILD_OPTIONS; do
> + if [ "${build_opt#parallel=}" != "$build_opt" ]; then
> + echo -j${build_opt#parallel=}
> + fi
> +done
> +
> version=$(dpkg-parsechangelog -S Version)
> version_upstream="${version%-*}"
> debian_revision="${version#${version_upstream}}"
> --
> 2.39.2
>


--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2023-03-27 00:57    [W:0.042 / U:2.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site