uqmi: fix build with arm64 in GCC11

This commit is contained in:
coolsnowwolf 2024-01-22 14:39:21 +08:00
parent ce91432bb0
commit 311b20a4cd

View File

@ -1,20 +1,19 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uqmi
PKG_RELEASE:=1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git
PKG_SOURCE_DATE:=2024-01-16
PKG_SOURCE_VERSION:=c3488b831ce6285c8107704156b9b8ed7d59deb3
PKG_MIRROR_HASH:=3ca47f2ae22bc1adcb05560e6dbea824063fa914670c13f107e7e78f33399779
PKG_SOURCE_DATE:=2022-05-04
PKG_SOURCE_VERSION:=56cb2d4056fef132ccf78dfb6f3074ae5d109992
PKG_MIRROR_HASH:=cc832b5318805df8c8387a3650f250dee72d5f1dbda4e4866b5503e186b2210c
PKG_MAINTAINER:=Matti Laakso <malaakso@elisanet.fi>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
PKG_FLAGS:=nonshared
PKG_BUILD_FLAGS:=gc-sections
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@ -32,10 +31,17 @@ define Package/uqmi/description
the QMI-protocol.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-Wno-error=dangling-pointer \
-Wno-error=maybe-uninitialized
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -ffunction-sections -fdata-sections
ifeq ($(GCC_MAJOR_VERSION),12)
TARGET_CFLAGS += -Wno-error=dangling-pointer -Wno-error=maybe-uninitialized
endif
ifeq ($(GCC_MAJOR_VERSION),13)
TARGET_CFLAGS += -Wno-error=dangling-pointer -Wno-error=maybe-uninitialized
endif
TARGET_LDFLAGS += -Wl,--gc-sections
CMAKE_OPTIONS += \
-DDEBUG=1