diff --git a/config/rules.mk b/config/rules.mk index 16816975456d..1c34ca24b079 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -528,7 +528,11 @@ endif ifdef IS_COMPONENT DEPENDENT_LIBS = $(patsubst -l%,$(LIB_PREFIX)%$(DLL_SUFFIX),$(filter -l%, $(EXTRA_DSO_LDOPTS))) ifneq (,$(strip $(DEPENDENT_LIBS))) -DEFINES += -DDEPENDENT_LIBS="$(foreach f,$(DEPENDENT_LIBS),\"${f}\",)" +_BEFORE := , \" +_AFTER := ,\" +_DEP_DEFINES = -DDEPENDENT_LIBS="$(foreach f,$(DEPENDENT_LIBS),\"${f}\",)" +_DEP_DEFINES := $(subst $(_BEFORE),$(_AFTER),$(_DEP_DEFINES)) +DEFINES += $(_DEP_DEFINES) endif endif