From 87cd3169394e021f54e50e19fbc84d0513c2e785 Mon Sep 17 00:00:00 2001 From: Tomaz Zaman Date: Wed, 12 Aug 2026 01:32:45 +0200 Subject: [PATCH 42/72] ask/cmm: build with the official feature flags Match the vendor's documented cmm build flags: add -DFLOW_STATS -DSEC_PROFILE_SUPPORT -DUSE_QOSCONNMARK -DENABLE_INGRESS_QOS -DIPSEC_NO_FLOW_CACHE to the -DVLAN_FILTER we already passed (AUTO_BRIDGE/LS1043/WIFI_ENABLE come from the vendor Makefile), lighting up the policer, flow-stats and ingress-QoS surface the base build compiled out. The official build uses -Wno-error; the vendor Makefile hardcodes -Werror and our CFLAGS are appended before it, so neutralise it at the source in Build/Prepare. Verified: cmm compiles clean with all nine defines + -Wno-error, binary built. Co-Authored-By: Claude Opus 4.8 --- package/ask/cmm/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package/ask/cmm/Makefile b/package/ask/cmm/Makefile index cba1ef1754..67b075425e 100644 --- a/package/ask/cmm/Makefile +++ b/package/ask/cmm/Makefile @@ -35,6 +35,12 @@ endef define Build/Prepare mkdir -p $(PKG_BUILD_DIR) xzcat $(DL_DIR)/$(ASK_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xf - + # The official cmm build uses -Wno-error. The vendor Makefile hardcodes + # -Werror and our CFLAGS come from the environment (appended *before* the + # vendor's), so a -Wno-error we pass would be overridden - neutralise it + # at the source instead. The extra feature defines below light up code + # (module_stat/module_qm/policer) that the base build never warned on. + sed -i 's/-Werror/-Wno-error/g' $(PKG_BUILD_DIR)/cmm/Makefile endef # CFLAGS/LDFLAGS go through the environment, not the command line: both @@ -44,7 +50,7 @@ define Build/Compile +CFLAGS="$(TARGET_CFLAGS)" \ $(MAKE) -C $(PKG_BUILD_DIR)/fci/lib \ CC="$(TARGET_CC)" AR="$(TARGET_AR)" - +CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DVLAN_FILTER" \ + +CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DLS1043 -DFLOW_STATS -DWIFI_ENABLE -DAUTO_BRIDGE -DSEC_PROFILE_SUPPORT -DUSE_QOSCONNMARK -DENABLE_INGRESS_QOS -DIPSEC_NO_FLOW_CACHE -DVLAN_FILTER" \ LDFLAGS="$(TARGET_LDFLAGS)" \ $(MAKE) -C $(PKG_BUILD_DIR)/cmm \ CC="$(TARGET_CC)" \ -- 2.47.3