diff mbox series

deb-pkg: generate correct build dependencies

Message ID 1552411404-32271-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit e3a22850664ffbe5b786c80249b3cfea61b659c6
Headers show
Series deb-pkg: generate correct build dependencies | expand

Commit Message

Masahiro Yamada March 12, 2019, 5:23 p.m. UTC
From: Riku Voipio <riku.voipio@linaro.org>


bison/flex is now needed always for building for kconfig. Some build
dependencies depend on kernel configuration, enable them as needed:

- libelf-dev when UNWINDER_ORC is set
- libssl-dev for SYSTEM_TRUSTED_KEYRING

Since the libssl-dev is needed for extract_cert binary, denote with
:native to install the libssl-dev for the build machines architecture,
rather than for the architecture of the kernel being built.

Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>

Reviewed-by: Ben Hutchings <ben@decadent.org.uk>

Acked-by: maximilian attems <maks@stro.at>

[masahiro.yamada: add change 'flex' to 'flex | flex:native' ]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

---

Hi Riku,

I did not get your update, but anyway I changed
'flex' to 'flex | flex:native'.

With this change, now I am able to cross-compile deb-pkg.


 scripts/package/mkdebian | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.7.4

Comments

Masahiro Yamada March 13, 2019, 5:43 p.m. UTC | #1
On Wed, Mar 13, 2019 at 2:24 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>

> From: Riku Voipio <riku.voipio@linaro.org>

>

> bison/flex is now needed always for building for kconfig. Some build

> dependencies depend on kernel configuration, enable them as needed:

>

> - libelf-dev when UNWINDER_ORC is set

> - libssl-dev for SYSTEM_TRUSTED_KEYRING

>

> Since the libssl-dev is needed for extract_cert binary, denote with

> :native to install the libssl-dev for the build machines architecture,

> rather than for the architecture of the kernel being built.

>

> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>

> Reviewed-by: Ben Hutchings <ben@decadent.org.uk>

> Acked-by: maximilian attems <maks@stro.at>

> [masahiro.yamada: add change 'flex' to 'flex | flex:native' ]

> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

> ---

>



Applied to linux-kbuild.


> Hi Riku,

>

> I did not get your update, but anyway I changed

> 'flex' to 'flex | flex:native'.

>

> With this change, now I am able to cross-compile deb-pkg.

>

>

>  scripts/package/mkdebian | 4 +++-

>  1 file changed, 3 insertions(+), 1 deletion(-)

>

> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian

> index f030961..110cd8d 100755

> --- a/scripts/package/mkdebian

> +++ b/scripts/package/mkdebian

> @@ -134,6 +134,8 @@ fi

>

>  mkdir -p debian/

>  echo $debarch > debian/arch

> +extra_build_depends=", $(if_enabled_echo UNWINDER_ORC libelf-dev)"

> +extra_build_depends="$extra_build_depends, $(if_enabled_echo SYSTEM_TRUSTED_KEYRING libssl-dev:native)"

>

>  # Generate a simple changelog template

>  cat <<EOF > debian/changelog

> @@ -170,7 +172,7 @@ Source: $sourcename

>  Section: kernel

>  Priority: optional

>  Maintainer: $maintainer

> -Build-Depends: bc, kmod, cpio

> +Build-Depends: bc, kmod, cpio, bison, flex | flex:native $extra_build_depends

>  Homepage: http://www.kernel.org/

>

>  Package: $packagename

> --

> 2.7.4

>



-- 
Best Regards
Masahiro Yamada
diff mbox series

Patch

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index f030961..110cd8d 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -134,6 +134,8 @@  fi
 
 mkdir -p debian/
 echo $debarch > debian/arch
+extra_build_depends=", $(if_enabled_echo UNWINDER_ORC libelf-dev)"
+extra_build_depends="$extra_build_depends, $(if_enabled_echo SYSTEM_TRUSTED_KEYRING libssl-dev:native)"
 
 # Generate a simple changelog template
 cat <<EOF > debian/changelog
@@ -170,7 +172,7 @@  Source: $sourcename
 Section: kernel
 Priority: optional
 Maintainer: $maintainer
-Build-Depends: bc, kmod, cpio
+Build-Depends: bc, kmod, cpio, bison, flex | flex:native $extra_build_depends
 Homepage: http://www.kernel.org/
 
 Package: $packagename