mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 13:16:35 +00:00
linux: use host pkg-config when host libelf is set
A patch was added to the Linux kernel in 5.1.0-rc3 which adds a requirement that the host build environment include pkg-config. Add the correct host-pkgconf dependency and environment variables to ensure Linux picks up the correct libraries. Move the existing LINUX_MAKE_ENV assignment earlier, to simplify the append-assignment in the libelf conditional block. Fixes: #11761 Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Suggested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Stuart Summers <stuart.summers@intel.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Arnout: extend commit message as suggested by Yann] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commit 615e2edc2ae8351519448d1965f0c4eec4e793b1) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
a7da7760f8
commit
e08d1aa6d6
@ -59,6 +59,10 @@ BR_NO_CHECK_HASH_FOR += $(notdir $(LINUX_PATCHES))
|
|||||||
# be directories in the patch list (unlike for other packages).
|
# be directories in the patch list (unlike for other packages).
|
||||||
LINUX_PATCH = $(filter ftp://% http://% https://%,$(LINUX_PATCHES))
|
LINUX_PATCH = $(filter ftp://% http://% https://%,$(LINUX_PATCHES))
|
||||||
|
|
||||||
|
LINUX_MAKE_ENV = \
|
||||||
|
$(TARGET_MAKE_ENV) \
|
||||||
|
BR_BINARIES_DIR=$(BINARIES_DIR)
|
||||||
|
|
||||||
LINUX_INSTALL_IMAGES = YES
|
LINUX_INSTALL_IMAGES = YES
|
||||||
LINUX_DEPENDENCIES = host-kmod
|
LINUX_DEPENDENCIES = host-kmod
|
||||||
|
|
||||||
@ -95,7 +99,13 @@ LINUX_DEPENDENCIES += host-openssl
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF),y)
|
ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF),y)
|
||||||
LINUX_DEPENDENCIES += host-elfutils
|
LINUX_DEPENDENCIES += host-elfutils host-pkgconf
|
||||||
|
LINUX_MAKE_ENV += \
|
||||||
|
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
|
||||||
|
PKG_CONFIG_SYSROOT_DIR="/" \
|
||||||
|
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
|
||||||
|
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
|
||||||
|
PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# If host-uboot-tools is selected by the user, assume it is needed to
|
# If host-uboot-tools is selected by the user, assume it is needed to
|
||||||
@ -119,10 +129,6 @@ LINUX_MAKE_FLAGS = \
|
|||||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||||
DEPMOD=$(HOST_DIR)/sbin/depmod
|
DEPMOD=$(HOST_DIR)/sbin/depmod
|
||||||
|
|
||||||
LINUX_MAKE_ENV = \
|
|
||||||
$(TARGET_MAKE_ENV) \
|
|
||||||
BR_BINARIES_DIR=$(BINARIES_DIR)
|
|
||||||
|
|
||||||
ifeq ($(BR2_REPRODUCIBLE),y)
|
ifeq ($(BR2_REPRODUCIBLE),y)
|
||||||
LINUX_MAKE_ENV += \
|
LINUX_MAKE_ENV += \
|
||||||
KBUILD_BUILD_VERSION=1 \
|
KBUILD_BUILD_VERSION=1 \
|
||||||
|
@ -179,7 +179,9 @@ endif
|
|||||||
# nconfig, gconfig, xconfig).
|
# nconfig, gconfig, xconfig).
|
||||||
# So we simply remove our PATH and PKG_CONFIG_* variables.
|
# So we simply remove our PATH and PKG_CONFIG_* variables.
|
||||||
$(2)_CONFIGURATOR_MAKE_ENV = \
|
$(2)_CONFIGURATOR_MAKE_ENV = \
|
||||||
$$(filter-out PATH=% PKG_CONFIG=% PKG_CONFIG_SYSROOT_DIR=% PKG_CONFIG_LIBDIR=%,$$($(2)_MAKE_ENV)) \
|
$$(filter-out PATH=% PKG_CONFIG=% PKG_CONFIG_SYSROOT_DIR=% \
|
||||||
|
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=% PKG_CONFIG_ALLOW_SYSTEM_LIBS=% \
|
||||||
|
PKG_CONFIG_LIBDIR=%,$$($(2)_MAKE_ENV)) \
|
||||||
PKG_CONFIG_PATH="$(HOST_PKG_CONFIG_PATH)"
|
PKG_CONFIG_PATH="$(HOST_PKG_CONFIG_PATH)"
|
||||||
|
|
||||||
# Configuration editors (menuconfig, ...)
|
# Configuration editors (menuconfig, ...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user