u-boot.mk: fix pkg-config usage
authorAndre Heider <a.heider@gmail.com>
Wed, 13 Oct 2021 10:51:22 +0000 (12:51 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 24 Oct 2021 16:00:49 +0000 (18:00 +0200)
Using Host/Exports doesn't work as intended, explicitly add the
required vars so that u-boot finds the required libraries when building
its tools.

Signed-off-by: Andre Heider <a.heider@gmail.com>
include/u-boot.mk
package/boot/uboot-mediatek/Makefile
package/boot/uboot-mvebu/Makefile
package/boot/uboot-mxs/Makefile
package/boot/uboot-zynq/Makefile

index c0a1e87bf3d61a082bde3c6baba4c7b99007fca3..8c6941b88ac5d99b4338405c7de50b83bdeec3e1 100644 (file)
@@ -45,6 +45,9 @@ UBOOT_MAKE_FLAGS = \
        HOSTCC="$(HOSTCC)" \
        HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \
        HOSTLDFLAGS="$(HOST_LDFLAGS)" \
+       STAGING_PREFIX="$(STAGING_DIR_HOST)" \
+       PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig" \
+       PKG_CONFIG_LIBDIR="$(STAGING_DIR_HOST)/lib/pkgconfig" \
        $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
 
 define Build/U-Boot/Target
index a5801afa2d37a071b2d1c06b6388dd7948e94659..5d9459d461f48d7912e7e443cfd3efa99a44438b 100644 (file)
@@ -111,8 +111,6 @@ UBOOT_TARGETS := \
 
 UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE:.fip=.bin)
 
-Build/Exports:=$(Host/Exports)
-
 define Build/fip-image
        $(STAGING_DIR_HOST)/bin/fiptool create \
                --soc-fw $(STAGING_DIR_IMAGE)/$(BUILD_SUBTARGET)-$(BL2_BOOTDEV)-$(BL2_DDRBLOB)ddr-bl31.bin \
index bf03fdd2b2a8a2706d5217d8177d482f38eb8944..e2f2a2a38253fcd6e257021b2357f83d4d69ac84 100644 (file)
@@ -53,8 +53,6 @@ UBOOT_TARGETS:= \
        espressobin \
        uDPU
 
-Build/Exports:=$(Host/Exports)
-
 define Build/Configure
        # enable additional options beyond <device>_defconfig
        echo CONFIG_CMD_SETEXPR=y >> $(PKG_BUILD_DIR)/configs/$(UBOOT_CONFIG)_defconfig
index f4211d3a549ff03b0c08830419d4fcdf83e40676..3c908874faa36b6e27eab6ec8768a7eb1c54c927 100644 (file)
@@ -38,8 +38,6 @@ UBOOT_TARGETS := \
 
 UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE)
 
-Build/Exports:=$(Host/Exports)
-
 define Build/InstallDev
        $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
index b6b1dc8b85ff32e45d0ed54b5d639d96afe5c548..c605cfaeb2aa747ab58d9dec75e18b63aa971f3b 100644 (file)
@@ -60,6 +60,4 @@ endef
 define Package/u-boot/install/default
 endef
 
-Build/Exports:=$(Host/Exports)
-
 $(eval $(call BuildPackage/U-Boot))