@@ -26,6 +26,11 @@ BIN := main
2626override PURSFLAGS += compile --codegen corefn
2727override CXXFLAGS += --std=c++11
2828
29+CXXVERSION = $(shell $(CXX) --version)
30+ifneq (,$(findstring g++,$(CXXVERSION)))
31+ PSCPPFLAGS += "--ucns"
32+endif
33+
2934DEBUG := "-DDEBUG -g"
3035RELEASE := "-DNDEBUG -O3"
3136
@@ -53,7 +58,7 @@ corefn: $(PURESCRIPT_PKGS)
5358.PHONY: codegen
5459codegen: COREFN_SRCS=$(call rwildcard,$(OUTPUT)/,corefn.json)
5560codegen: corefn
56− @$(PSCPP) $(COREFN_SRCS)
61+ @$(PSCPP) $(PSCPPFLAGS) $(COREFN_SRCS)
5762
5863$(PURESCRIPT_PKGS):
5964 @echo "Getting packages using" $(PSC_PACKAGE) "..."