From 46b802056367bc4aa2598c58937e3faca341e1fa Mon Sep 17 00:00:00 2001
From: Josef Schlehofer <josef.schlehofer@nic.cz>
Date: Sun, 4 Sep 2022 13:19:14 +0200
Subject: [PATCH] patches/openwrt: backport OpenWrt include/u-boot.mk changes
 from master

This fixes compilation with uboot-mpc85xx
---
 ...t.mk-backport-OpenWrt-master-changes.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 patches/openwrt/to-upstream/0304-u-boot.mk-backport-OpenWrt-master-changes.patch

diff --git a/patches/openwrt/to-upstream/0304-u-boot.mk-backport-OpenWrt-master-changes.patch b/patches/openwrt/to-upstream/0304-u-boot.mk-backport-OpenWrt-master-changes.patch
new file mode 100644
index 000000000..1f04b3b7b
--- /dev/null
+++ b/patches/openwrt/to-upstream/0304-u-boot.mk-backport-OpenWrt-master-changes.patch
@@ -0,0 +1,31 @@
+From 29a19d8f28c1fc1a85f009a98ea23767018b6b40 Mon Sep 17 00:00:00 2001
+From: Josef Schlehofer <pepe.schlehofer@gmail.com>
+Date: Sun, 4 Sep 2022 13:18:39 +0200
+Subject: [PATCH] u-boot.mk: backport OpenWrt master changes
+
+---
+ include/u-boot.mk | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/include/u-boot.mk b/include/u-boot.mk
+index a3dc540ebe..8945e8e2b8 100644
+--- a/include/u-boot.mk
++++ b/include/u-boot.mk
+@@ -44,8 +44,13 @@ TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET))
+ UBOOT_MAKE_FLAGS = \
+ 	HOSTCC="$(HOSTCC)" \
+ 	HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \
++	HOSTLDFLAGS="$(HOST_LDFLAGS)" \
+ 	LOCALVERSION="-OpenWrt-$(REVISION)" \
+-	HOSTLDFLAGS="$(HOST_LDFLAGS)"
++	STAGING_PREFIX="$(STAGING_DIR_HOST)" \
++	PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig" \
++	PKG_CONFIG_LIBDIR="$(STAGING_DIR_HOST)/lib/pkgconfig" \
++	PKG_CONFIG_EXTRAARGS="--static" \
++	$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
+ 
+ define Build/U-Boot/Target
+   $(eval $(call U-Boot/Init,$(1)))
+-- 
+2.34.1
+
-- 
GitLab