From c87a63e821dafe44514ab23bfcc4f6b11a82bc6c Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Mon, 19 Nov 2018 08:59:39 +0000 Subject: [PATCH] Use -std=c++11 -std=c++0x / -std=gnu++0x was the working name of what is nowadays known as C++11. Use the standard name to avoid accidentally depending on GCC-specific extensions and other quirks. --- GNUmakefile.am | 4 +--- Makefile | 8 +++----- src/GNUmakefile.am | 6 +----- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/GNUmakefile.am b/GNUmakefile.am index d197261e74..6fe6759265 100644 --- a/GNUmakefile.am +++ b/GNUmakefile.am @@ -18,11 +18,9 @@ AM_LDFLAGS = $(AM_COPT) $(AM_COVLDFLAGS) AM_CPPFLAGS += -I$(top_srcdir) RESOURCES = +AM_CXXFLAGS += -std=c++11 if COMPILER_IS_MINGW32 RESOURCES += res/libsass.rc - AM_CXXFLAGS += -std=gnu++0x -else - AM_CXXFLAGS += -std=c++0x endif TEST_EXTENSIONS = .rb diff --git a/Makefile b/Makefile index f01c42253a..f91d868437 100644 --- a/Makefile +++ b/Makefile @@ -51,21 +51,19 @@ ifdef LIBSASS_VERSION CXXFLAGS += -DLIBSASS_VERSION="\"$(LIBSASS_VERSION)\"" endif -# enable mandatory flag +CXXFLAGS += -std=c++11 +LDFLAGS += -std=c++11 + ifeq (Windows,$(UNAME)) ifneq ($(BUILD),shared) STATIC_ALL ?= 1 endif STATIC_LIBGCC ?= 1 STATIC_LIBSTDCPP ?= 1 - CXXFLAGS += -std=gnu++0x - LDFLAGS += -std=gnu++0x else STATIC_ALL ?= 0 STATIC_LIBGCC ?= 0 STATIC_LIBSTDCPP ?= 0 - CXXFLAGS += -std=c++0x - LDFLAGS += -std=c++0x endif ifndef SASS_LIBSASS_PATH diff --git a/src/GNUmakefile.am b/src/GNUmakefile.am index fee9312f95..9b0e6a99b3 100644 --- a/src/GNUmakefile.am +++ b/src/GNUmakefile.am @@ -13,11 +13,7 @@ AM_CFLAGS = $(AM_COPT) AM_CXXFLAGS = $(AM_COPT) AM_LDFLAGS = $(AM_COPT) $(AM_COVLDFLAGS) -if COMPILER_IS_MINGW32 - AM_CXXFLAGS += -std=gnu++0x -else - AM_CXXFLAGS += -std=c++0x -endif +AM_CXXFLAGS += -std=c++11 EXTRA_DIST = \ COPYING \