[source] mdadm: fix parameter quoting

LEDE Commits lede-commits at lists.infradead.org
Thu Oct 26 18:26:44 PDT 2017


jow pushed a commit to source.git, branch master:
https://git.lede-project.org/d4e7af52788fe6a5495064606e674ed6897a69cb

commit d4e7af52788fe6a5495064606e674ed6897a69cb
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Fri Oct 27 03:25:29 2017 +0200

    mdadm: fix parameter quoting
    
    Ensure that path defines are passed quoted to the compiler in order
    to avoid cpp syntax errors.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 package/utils/mdadm/Makefile | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/package/utils/mdadm/Makefile b/package/utils/mdadm/Makefile
index 8264242..2b44db2 100644
--- a/package/utils/mdadm/Makefile
+++ b/package/utils/mdadm/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mdadm
 PKG_VERSION:=4.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -41,16 +41,20 @@ define Package/mdadm/conffiles
 /etc/config/mdadm
 endef
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS -DCONFFILE="/var/etc/mdadm.conf" -DMAP_DIR="/var/run/mdadm" -DMDMON_DIR="/var/run/mdadm" -DFAILED_SLOTS_DIR="/var/run/mdadm/failed-slots"
+TARGET_CFLAGS += \
+	-ffunction-sections -fdata-sections \
+	-DHAVE_STDINT_H -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS \
+	-DCONFFILE='\"/var/etc/mdadm.conf\"' \
+	-DMAP_DIR='\"/var/run/mdadm\"' \
+	-DMDMON_DIR='\"/var/run/mdadm\"' \
+	-DFAILED_SLOTS_DIR='\"/var/run/mdadm/failed-slots\"'
+
 TARGET_LDFLAGS += -Wl,--gc-sections
 
+MAKE_VARS += CHECK_RUN_DIR=0
+
 define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CC="$(TARGET_CC)" \
-		CFLAGS="$(TARGET_CFLAGS) -DHAVE_STDINT_H" \
-		LDFLAGS="$(TARGET_LDFLAGS)" \
-		CHECK_RUN_DIR=0 \
-		mdadm
+	$(call Build/Compile/Default,mdadm)
 endef
 
 define Package/mdadm/install



More information about the lede-commits mailing list