From c53b7ba4497dc0187dcd68197589de51185636b5 Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Mon, 31 Jan 2022 03:09:55 +0300 Subject: [PATCH] libowfat: fix build on macos libowfat target-build fails on macos due to using system `ar` and `ranlib` tools not compatible with the objects generated by OpenWrt GCC toolchain. This patch specifies CROSS= make flag that is used as a prefix for `ar` and `ranlib` tools. This patch also specifies CCC= make flag due to CCC= has invalid value after specifying CROSS= make flag (CCC=$(CROSS)$(CC)) Signed-off-by: Sergey V. Lobanov --- libs/libowfat/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/libowfat/Makefile b/libs/libowfat/Makefile index 7f7c4534f..8e57a5547 100644 --- a/libs/libowfat/Makefile +++ b/libs/libowfat/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libowfat PKG_VERSION:=0.32 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.fefe.de/libowfat @@ -37,6 +37,8 @@ endef TARGET_CFLAGS += $(FPIC) LOWFAT_MAKEOPTS = $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \ + CCC="$(TARGET_CC)" \ + CROSS="$(TARGET_CROSS)" \ DEBUG="$(DEBUG)" \ VERSION="$(PKG_VERSION)" \ OS="Linux"