Skip to content

Commit 8bb50c6

Browse files
stinosdpgeorge
authored andcommitted
unix/Makefile: Remove explicit addition of -std=c++ flag.
This was added merely for building the C++ user module example, so it's a better fit to add it in the corresponding micropython.mk.
1 parent 9c05f3a commit 8bb50c6

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

examples/usercmodule/cppexample/micropython.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SRC_USERMOD_CXX += $(CPPEXAMPLE_MOD_DIR)/example.cpp
66

77
# Add our module directory to the include path.
88
CFLAGS_USERMOD += -I$(CPPEXAMPLE_MOD_DIR)
9-
CXXFLAGS_USERMOD += -I$(CPPEXAMPLE_MOD_DIR)
9+
CXXFLAGS_USERMOD += -I$(CPPEXAMPLE_MOD_DIR) -std=c++11
1010

1111
# We use C++ features so have to link against the standard library.
1212
LDFLAGS_USERMOD += -lstdc++

ports/unix/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,6 @@ CFLAGS += -DMPZ_DIG_SIZE=16 # force 16 bits to work on both 32 and 64 bit archs
270270
CFLAGS += -DMICROPY_MODULE_FROZEN_STR
271271
endif
272272

273-
HASCPP17 = $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7)
274-
ifeq ($(HASCPP17), 1)
275-
CXXFLAGS += -std=c++17
276-
else
277-
CXXFLAGS += -std=c++11
278-
endif
279273
CXXFLAGS += $(filter-out -Wmissing-prototypes -Wold-style-definition -std=gnu99,$(CFLAGS) $(CXXFLAGS_MOD))
280274

281275
ifeq ($(MICROPY_FORCE_32BIT),1)

0 commit comments

Comments
 (0)