From 266b6a1dd9062c349800df5af3a6c0584cec340e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 11:26:37 -0500 Subject: [PATCH] mkrules: Fix warning preprocessing C++ files Messages like 'command-line option is [not valid] for C++' can result from the way the preprocessor is invoked by `genlast`. Instead, cause the files to be preprocessed as though their content is "C". This should generally be OK, as they'll eventually be _compiled_ as C++. When preprocessed as C, the file simply needs to generate all the same QSTRS and TRANSLATEs. --- py/mkrules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/mkrules.mk b/py/mkrules.mk index 81dd961ac6..50f35ffb22 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -65,7 +65,7 @@ vpath %.cpp . $(TOP) $(USER_C_MODULES) $(BUILD)/%.o: %.cpp $(call compile_cxx) -QSTR_GEN_EXTRA_CFLAGS += -DNO_QSTR +QSTR_GEN_EXTRA_CFLAGS += -DNO_QSTR -x c # frozen.c and frozen_mpy.c are created in $(BUILD), so use our rule # for those as well.