Skip to content

Commit

Permalink
uqmi: fix build with arm64 in GCC11
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Jan 22, 2024
1 parent ce91432 commit 311b20a
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions package/network/utils/uqmi/Makefile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>

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
Expand All @@ -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
Expand All @@ -46,4 +52,4 @@ define Package/uqmi/install
$(CP) ./files/* $(1)/
endef

$(eval $(call BuildPackage,uqmi))
$(eval $(call BuildPackage,uqmi))

0 comments on commit 311b20a

Please sign in to comment.