diff --git a/gcc/libstdc++-v3/src/c++17/Makefile.am b/gcc/libstdc++-v3/src/c++17/Makefile.am index cb94aff5f1..2aebc6d525 100644 --- a/gcc/libstdc++-v3/src/c++17/Makefile.am +++ b/gcc/libstdc++-v3/src/c++17/Makefile.am @@ -79,7 +79,7 @@ endif # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden # as the occasion calls for it. AM_CXXFLAGS = \ - -std=gnu++17 \ + -std=gnu++17 -nostdinc++ \ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \ diff --git a/gcc/libstdc++-v3/src/c++17/Makefile.in b/gcc/libstdc++-v3/src/c++17/Makefile.in index 63984ecd52..8c02be6514 100644 --- a/gcc/libstdc++-v3/src/c++17/Makefile.in +++ b/gcc/libstdc++-v3/src/c++17/Makefile.in @@ -455,7 +455,7 @@ libc__17convenience_la_SOURCES = $(sources) $(inst_sources) # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden # as the occasion calls for it. AM_CXXFLAGS = \ - -std=gnu++17 \ + -std=gnu++17 -nostdinc++ \ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \