On 13/10/2021 10:30, Rafał Miłecki wrote:
On 13.10.2021 10:23, Andre Heider wrote:
On 13/10/2021 10:10, Rafał Miłecki wrote:
*** Manual pkg-config test ***

I'm not sure if I test it correctly but output looks OK:

$ PATH=/home/rmilecki/openwrt/openwrt-master-bcm4908/staging_dir/host/bin:$PATH ./staging_dir/host/bin/pkg-config --libs libssl libcrypto
-L/lib64 -lssl -lcrypto

I think -L should point at ./staging_dir/host/lib or whereever the libraris from the libressl host package are, since we're building against that and not against your system open/libressl?

This may be a result of my manual pkg-config call with hacked PATH. I'm
not sure how to fully emulate OpenWrt's context for calling it. That was
meant only for a quick test of --static switch (which appears to work).

I guess if we can make:
1. pkg-config work in U-Boot building context
2. U-Boot use --static

That could fix building issue.

This appears to fix 1) a little, I think the Host/Exports are not applied are expected:

diff --git a/include/u-boot.mk b/include/u-boot.mk
index c0a1e87bf3..85d3fbd73c 100644
--- a/include/u-boot.mk
+++ b/include/u-boot.mk
@@ -45,6 +45,9 @@ UBOOT_MAKE_FLAGS = \
    HOSTCC="$(HOSTCC)" \
    HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \
    HOSTLDFLAGS="$(HOST_LDFLAGS)" \
+   STAGING_PREFIX="$(HOST_BUILD_PREFIX)" \
+ PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig:$(HOST_BUILD_PREFIX)/lib/pkgconfig" \
+   PKG_CONFIG_LIBDIR="$(HOST_BUILD_PREFIX)/lib/pkgconfig" \
    $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')

 define Build/U-Boot/Target
diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile
index e9578a492b..b186d0bde9 100644
--- a/package/boot/uboot-mvebu/Makefile
+++ b/package/boot/uboot-mvebu/Makefile
@@ -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


u-boot still doesn't build its tools with that, but that might be a different issue.

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to