]> Git Repo - buildroot-mgba.git/commitdiff
linux: add BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
authorThomas Petazzoni <[email protected]>
Sun, 4 Mar 2018 21:31:16 +0000 (22:31 +0100)
committerPeter Korsgaard <[email protected]>
Tue, 6 Mar 2018 14:25:08 +0000 (15:25 +0100)
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 <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
linux/Config.in
linux/linux.mk

index 57bb11c2cd7b5140f40dc7661d1108d1821098f7..e299af4008b6d11dd6eb2443fb0553d8a7399514 100644 (file)
@@ -420,6 +420,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"
 
index 91d8751a712bf720a15729f652980eaa798cf6af..28d799f946f0dc277c3424b9618a46e823615641 100644 (file)
@@ -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)
This page took 0.03706 seconds and 4 git commands to generate.