ravpower-mcu: add CPPFLAGS

Forward the OpenWrt CPPFLAGS to the compile process. This fixes fortify
sources support.

Link: https://github.com/openwrt/openwrt/pull/22056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens 2026-02-17 00:55:27 +01:00
parent d69b283068
commit ddb1c1ab33
2 changed files with 14 additions and 1 deletions

View file

@ -23,7 +23,9 @@ endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) -Wall"
CFLAGS="$(TARGET_CFLAGS) -Wall" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)"
endef
define Package/ravpower-mcu/install

View file

@ -0,0 +1,11 @@
--- a/src/Makefile
+++ b/src/Makefile
@@ -3,7 +3,7 @@ CFLAGS:=-I.
OUTDIR:=./
main: main.c
- $(CC) -o $(OUTDIR)/ravpower-mcu main.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(OUTDIR)/ravpower-mcu main.c
clean:
rm ravpower-pmic