From e5a3c1e28cb862376bc441cee1dcef92a865e534 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sun, 10 Feb 2019 10:30:55 +0000 Subject: [PATCH] MzScheme and Travis CXXFLAGS/CFLAGS support mzc seems to use the CFLAGS, but not the CXXFLAGS env variables. Pass the CXXFLAGS as ++ccf options when compiling c++. --- Examples/Makefile.in | 4 ++-- Tools/testflags.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Examples/Makefile.in b/Examples/Makefile.in index c5dcb1ee1..7022166a0 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -821,12 +821,12 @@ MZSCHEME_SCRIPT = $(SRCDIR)$(RUNME).scm mzscheme: $(SRCDIR_SRCS) $(SWIG) -mzscheme $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH) - $(COMPILETOOL) $(MZC) `echo $(CPPFLAGS) $(INCLUDES) | sed 's/-I/++ccf -I/g'` --cc $(ISRCS) $(SRCDIR_SRCS) + $(COMPILETOOL) $(MZC) `echo " $(CPPFLAGS) $(INCLUDES) $(CFLAGS)" | sed 's/ -/ ++ccf -/g'` --cc $(ISRCS) $(SRCDIR_SRCS) $(COMPILETOOL) $(MZC) --ld $(TARGET)$(MZSCHEME_SO) $(OBJS) $(IOBJS) mzscheme_cpp: $(SRCDIR_SRCS) $(SWIG) -mzscheme -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH) - $(COMPILETOOL) $(MZC) `echo $(CPPFLAGS) $(INCLUDES) | sed 's/-I/++ccf -I/g'` --cc $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) + env CFLAGS= $(COMPILETOOL) $(MZC) `echo " $(CPPFLAGS) $(INCLUDES) $(CXXFLAGS)" | sed 's/ -/ ++ccf -/g'` --cc $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(CXXSHARED) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $(LIBPREFIX)$(TARGET)$(MZSCHEME_SO) $(OBJS) $(IOBJS) $(MZDYNOBJ) $(CPP_DLLIBS) # ----------------------------------------------------------------- diff --git a/Tools/testflags.py b/Tools/testflags.py index ac8048e5f..bf85f5680 100755 --- a/Tools/testflags.py +++ b/Tools/testflags.py @@ -12,6 +12,7 @@ def get_cflags(language, std, compiler): "java":"-Werror " + c_common, "javascript":"-Werror " + c_common, "lua":"-Werror " + c_common, + "mzscheme":"-Werror " + c_common, "ocaml":"-Werror " + c_common, "octave":"-Werror " + c_common, "perl5":"-Werror " + c_common, @@ -42,6 +43,7 @@ def get_cxxflags(language, std, compiler): "java":"-Werror " + cxx_common, "javascript":"-Werror " + cxx_common + " -Wno-error=unused-function", # Until overload_rename is fixed for node "lua":"-Werror " + cxx_common, + "mzscheme":"-Werror " + cxx_common, "ocaml":"-Werror " + cxx_common, "octave":"-Werror " + cxx_common, "perl5":"-Werror " + cxx_common,