Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] linux/linux.mk: use HOST_MAKE_ENV rather than TARGET_MAKE_ENV
@ 2020-01-31 17:49 Peter Korsgaard
  2020-02-02 20:07 ` Thomas Petazzoni
  2020-03-07 20:39 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-01-31 17:49 UTC (permalink / raw)
  To: buildroot

While the kernel is built for the target, the build may need various host
libraries depending on config (and kernel version), so use HOST_MAKE_ENV
instead of TARGET_MAKE_ENV.

In particular, this ensures that our host-pkgconf will look for host
libraries and not target ones.

Fixes building scripts/dtc for Buildroot configurations enabling libyaml and
host-pkgconf for kernels after commit 067c650c45 (dtc: Use pkg-config to
locate libyaml).

With this enabled, we can drop the PKG_CONFIG_* variables for the
_NEEDS_HOST_LIBELF conditional, as those are included in HOST_MAKE_ENV.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 linux/linux.mk | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 7d66c9aeea..9a2f63d4df 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -60,8 +60,12 @@ BR_NO_CHECK_HASH_FOR += $(notdir $(LINUX_PATCHES))
 # be directories in the patch list (unlike for other packages).
 LINUX_PATCH = $(filter ftp://% http://% https://%,$(LINUX_PATCHES))
 
+# while the kernel is built for the target, the build may need various
+# host libraries depending on config (and version), so use
+# HOST_MAKE_ENV here. In particular, this ensures that our
+# host-pkgconf will look for host libraries and not target ones.
 LINUX_MAKE_ENV = \
-	$(TARGET_MAKE_ENV) \
+	$(HOST_MAKE_ENV) \
 	BR_BINARIES_DIR=$(BINARIES_DIR)
 
 LINUX_INSTALL_IMAGES = YES
@@ -102,12 +106,6 @@ endif
 
 ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF),y)
 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
 
 # If host-uboot-tools is selected by the user, assume it is needed to
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] linux/linux.mk: use HOST_MAKE_ENV rather than TARGET_MAKE_ENV
  2020-01-31 17:49 [Buildroot] [PATCH] linux/linux.mk: use HOST_MAKE_ENV rather than TARGET_MAKE_ENV Peter Korsgaard
@ 2020-02-02 20:07 ` Thomas Petazzoni
  2020-03-07 20:39 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2020-02-02 20:07 UTC (permalink / raw)
  To: buildroot

On Fri, 31 Jan 2020 18:49:39 +0100
Peter Korsgaard <peter@korsgaard.com> wrote:

> While the kernel is built for the target, the build may need various host
> libraries depending on config (and kernel version), so use HOST_MAKE_ENV
> instead of TARGET_MAKE_ENV.
> 
> In particular, this ensures that our host-pkgconf will look for host
> libraries and not target ones.
> 
> Fixes building scripts/dtc for Buildroot configurations enabling libyaml and
> host-pkgconf for kernels after commit 067c650c45 (dtc: Use pkg-config to
> locate libyaml).
> 
> With this enabled, we can drop the PKG_CONFIG_* variables for the
> _NEEDS_HOST_LIBELF conditional, as those are included in HOST_MAKE_ENV.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
>  linux/linux.mk | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] linux/linux.mk: use HOST_MAKE_ENV rather than TARGET_MAKE_ENV
  2020-01-31 17:49 [Buildroot] [PATCH] linux/linux.mk: use HOST_MAKE_ENV rather than TARGET_MAKE_ENV Peter Korsgaard
  2020-02-02 20:07 ` Thomas Petazzoni
@ 2020-03-07 20:39 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-03-07 20:39 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > While the kernel is built for the target, the build may need various host
 > libraries depending on config (and kernel version), so use HOST_MAKE_ENV
 > instead of TARGET_MAKE_ENV.

 > In particular, this ensures that our host-pkgconf will look for host
 > libraries and not target ones.

 > Fixes building scripts/dtc for Buildroot configurations enabling libyaml and
 > host-pkgconf for kernels after commit 067c650c45 (dtc: Use pkg-config to
 > locate libyaml).

 > With this enabled, we can drop the PKG_CONFIG_* variables for the
 > _NEEDS_HOST_LIBELF conditional, as those are included in HOST_MAKE_ENV.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2019.02.x and 2019.11.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-07 20:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-31 17:49 [Buildroot] [PATCH] linux/linux.mk: use HOST_MAKE_ENV rather than TARGET_MAKE_ENV Peter Korsgaard
2020-02-02 20:07 ` Thomas Petazzoni
2020-03-07 20:39 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox