blob: 1a6ec54c3b44e6e25f9220c627d05a73c0f2063f [file] [log] [blame]
From b2fcb2b8693fa1ac80b800c7a0c089563570b63d Mon Sep 17 00:00:00 2001
From: Ard Biesheuvel <>
Date: Mon, 30 Dec 2019 15:07:47 +0100
Subject: [PATCH] kbuild/deb-pkg: annotate libelf-dev dependency as :native
commit 8ffdc54b6f4cd718a45802e645bb853e3a46a078 upstream.
Cross compiling the x86 kernel on a non-x86 build machine produces
the following error when CONFIG_UNWINDER_ORC is enabled, regardless
of whether libelf-dev is installed or not.
dpkg-checkbuilddeps: error: Unmet build dependencies: libelf-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
Since this is a build time dependency for a build tool, we need to
depend on the native version of libelf-dev so add the appropriate
Signed-off-by: Ard Biesheuvel <>
Signed-off-by: Masahiro Yamada <>
Signed-off-by: Paul Gortmaker <>
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index a6a7a0f93739..de4d89c5306f 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -136,7 +136,7 @@ mkdir -p debian/source/
echo "1.0" > debian/source/format
echo $debarch > debian/arch
-extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev)"
+extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev:native)"
extra_build_depends="$extra_build_depends, $(if_enabled_echo CONFIG_SYSTEM_TRUSTED_KEYRING libssl-dev:native)"
# Generate a simple changelog template