From patchwork Sun Mar 4 21:31:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 881232 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zvbq51DGdz9sYl for ; Mon, 5 Mar 2018 08:32:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C16358712C; Sun, 4 Mar 2018 21:32:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pWTGbPEveIy5; Sun, 4 Mar 2018 21:32:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0EDA386F82; Sun, 4 Mar 2018 21:32:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 66F921C2797 for ; Sun, 4 Mar 2018 21:32:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 637B6870BE for ; Sun, 4 Mar 2018 21:32:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qd0YLvAOhkko for ; Sun, 4 Mar 2018 21:32:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by fraxinus.osuosl.org (Postfix) with ESMTP id E132286EB1 for ; Sun, 4 Mar 2018 21:32:25 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id ADEBC207E9; Sun, 4 Mar 2018 22:32:23 +0100 (CET) Received: from localhost (LFbn-TOU-1-408-85.w86-206.abo.wanadoo.fr [86.206.234.85]) by mail.bootlin.com (Postfix) with ESMTPSA id 566C620784; Sun, 4 Mar 2018 22:32:23 +0100 (CET) From: Thomas Petazzoni To: buildroot@buildroot.org Date: Sun, 4 Mar 2018 22:31:16 +0100 Message-Id: <20180304213137.24681-3-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180304213137.24681-1-thomas.petazzoni@bootlin.com> References: <20180304213137.24681-1-thomas.petazzoni@bootlin.com> Subject: [Buildroot] [PATCH 02/23] linux: add BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Fabio Estevam , Sergey Matyukevich , Mathieu Audat MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some Linux kernel configuration options (such as CONFIG_UNWINDER_ORC) require building a host program that needs libelf. Users who have libelf installed on their system won't see a problem, but users who don't have libelf installed will get a build failure. Therefore, this commit adds an option that allows a user to indicate that his Linux kernel configuration requires libelf. When this option is enabled, we add host-elfutils to the dependencies of the linux package (host-elfutils provides the libelf library). Signed-off-by: Thomas Petazzoni --- linux/Config.in | 13 +++++++++++++ linux/linux.mk | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/linux/Config.in b/linux/Config.in index 663a4063e2..d1d99b2810 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -425,6 +425,19 @@ config BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL such as "scripts/extract-cert.c:21:25: fatal error: openssl/bio.h: No such file or directory". +config BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF + bool "Needs host libelf" + help + Some Linux kernel configuration options (such as + CONFIG_UNWINDER_ORC) require building a host program that + needs libelf. Enabling this option will ensure host-elfutils + (which provides libelf) gets built before the Linux kernel. + + Enable this option if you get a Linux kernel build failure + such as "Cannot generate ORC metadata for + CONFIG_UNWINDER_ORC=y, please install libelf-dev, + libelf-devel or elfutils-libelf-devel". + # Linux extensions source "linux/Config.ext.in" diff --git a/linux/linux.mk b/linux/linux.mk index 83c57b60ad..76bf2c2ea7 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -84,6 +84,10 @@ ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL),y) LINUX_DEPENDENCIES += host-openssl endif +ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF),y) +LINUX_DEPENDENCIES += host-elfutils +endif + # If host-uboot-tools is selected by the user, assume it is needed to # create a custom image ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS),y)