From 6099fdc34d846db5b30eeecf27bdcd0991ba3217 Mon Sep 17 00:00:00 2001 From: ElonH Date: Thu, 16 Apr 2020 19:47:46 +0800 Subject: [PATCH] umbim: supress warning about pointers to members of a packed struct in gcc9 --- package/network/utils/umbim/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/network/utils/umbim/Makefile b/package/network/utils/umbim/Makefile index cc34002f6e..126efdbbc6 100644 --- a/package/network/utils/umbim/Makefile +++ b/package/network/utils/umbim/Makefile @@ -36,6 +36,10 @@ endef TARGET_CFLAGS += \ -I$(STAGING_DIR)/usr/include -ffunction-sections -fdata-sections +# Disable GCC 9 warning about pointers to members of a packed struct +GCCV_GE = $(filter $(1),$(shell echo -e "$(1)\n$(GCCV)" | sort -V | head -n1)) +TARGET_CFLAGS += $(if $(call GCCV_GE,9),-Wno-address-of-packed-member) + TARGET_LDFLAGS += -Wl,--gc-sections define Package/umbim/install