From a17cae54dd2a12a6e0dc32f474a20eb17e195af4 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Mon, 4 Jan 2021 18:23:54 +0000
Subject: [PATCH] MNT: Set default C++ standard to C++11. Do not set glibc ABI
 compatibility - allow this to be set in the environment

---
 config/common/buildSettings.mk | 13 ++++++++-----
 config/common/vars.mk          |  5 +++++
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/config/common/buildSettings.mk b/config/common/buildSettings.mk
index def143a..313a236 100644
--- a/config/common/buildSettings.mk
+++ b/config/common/buildSettings.mk
@@ -34,10 +34,10 @@ TCLSH   ?= ${FSLDIR}/bin/fsltclsh
 # constructed in common/vars.mk
 
 # Compiler flags for C projects
-ARCHCFLAGS =
+ARCHCFLAGS = -std=c99
 
 # Compiler flags for C++ projects.
-ARCHCXXFLAGS = -D_GLIBCXX_USE_CXX11_ABI=0
+ARCHCXXFLAGS = -std=c++11
 
 # Linker flags for all projects
 ARCHLDFLAGS =
@@ -61,10 +61,11 @@ ifeq ($(SYSTYPE), Darwin)
   # Commands
   CC  ?= cc
   CXX ?= c++
+  LD  ?= ld
 
   # Compiler flags
   ARCHCXXFLAGS += -arch x86_64 -Wall -pedantic -fPIC
-  ARCHCFLAGS   += $(ARCHCXXFLAGS) -std=c99
+  ARCHCFLAGS   += -arch x86_64 -Wall -pedantic -fPIC
   ARCHLDFLAGS  += -Wl,-search_paths_first
   ARCHLIBS     += -llapack -lblas -lz -lm
 endif
@@ -76,14 +77,16 @@ endif
 #####################################################################
 ifeq ($(SYSTYPE), Linux)
 
- # Commands
+  # Commands
   CC  ?= gcc
   CXX ?= c++
+  LD  ?= ld
 
   # Compiler flags
   ARCHCFLAGS   += -fexpensive-optimizations \
                   -Wall -pedantic -Wno-long-long -fPIC
-  ARCHCXXFLAGS += $(ARCHCFLAGS)
+  ARCHCXXFLAGS += -fexpensive-optimizations \
+                  -Wall -pedantic -Wno-long-long -fPIC
   ARCHLDFLAGS  += -Wl,-rpath,'$$ORIGIN/../lib'
   ARCHLIBS     += -lopenblas -lz -lm
 endif # if Linux
diff --git a/config/common/vars.mk b/config/common/vars.mk
index 174d274..a984e97 100644
--- a/config/common/vars.mk
+++ b/config/common/vars.mk
@@ -1,5 +1,10 @@
 #########################################################
 # Variables used for FSL project compilation/installation
+#
+# Default compiler/platform specific variables are
+# initialised in buildSettings.mk, which is included
+# before this file. Project specific variables are
+# initialised in the project Makefile.
 #########################################################
 
 # All projects must specify a name
-- 
GitLab