]> git.99rst.org Git - openwrt-packages.git/commitdiff
nanomq: use ATOMIC64_DEPENDS
authorDaniel Golle <redacted>
Thu, 10 Sep 2026 14:40:04 +0000 (15:40 +0100)
committerDaniel Golle <redacted>
Wed, 16 Sep 2026 15:35:19 +0000 (16:35 +0100)
The daemon imports 64-bit atomics from libatomic where the compiler
cannot inline them, but the CMake build links the library on every
architecture. ATOMIC64_DEPENDS restricts the dependency to the targets
that need it; --as-needed drops the unused library elsewhere.

Signed-off-by: Daniel Golle <redacted>
net/nanomq/Makefile

index b6ca08f09686045d125b32741d420d5320f0ba64..eccd4b7f87a12bdfff86f30d3327699158ec223e 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nanomq
 PKG_VERSION:=0.24.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nanomq/nanomq.git
@@ -21,6 +21,8 @@ PKG_CPE_ID:=cpe:/a:emqx:nanomq
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
+TARGET_LDFLAGS += -Wl,--as-needed
+
 CMAKE_OPTIONS+= \
        -DBUILD_CLIENT=OFF
 
@@ -29,7 +31,7 @@ define Package/nanomq
   CATEGORY:=Network
   TITLE:=NanoMQ Broker
   URL:=https://github.com/nanomq/nanomq
-  DEPENDS:=+libatomic
+  DEPENDS:=$(ATOMIC64_DEPENDS)
 endef
 
 define Package/nanomq/description
git clone https://git.99rst.org/PROJECT