Move compiler flags out of the Makefile and into mconfig
authorDavin McCall <davmac@davmac.org>
Thu, 19 Nov 2015 22:45:29 +0000 (22:45 +0000)
committerDavin McCall <davmac@davmac.org>
Thu, 19 Nov 2015 22:45:29 +0000 (22:45 +0000)
Makefile
mconfig

index 10d789bd327d90aefeb9087a09126690ad9a9099..a0cd8d3b5cf195eb28fa72f265f18e7eb6cc3b76 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ dinit-start: dinit-start.o
        $(CXX) -o dinit-start dinit-start.o $(EXTRA_LIBS)
 
 $(objects): %.o: %.cc service.h dinit-log.h control.h control-cmds.h
-       $(CXX) -D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++11 -c -Os -Wall $< -o $@
+       $(CXX) $(CXXOPTS) -c $< -o $@
 
 #install: all
 
diff --git a/mconfig b/mconfig
index 5ecb9aa46bc342aef640416522dd254a07e2559f..780aacef0f5d9c6a1a0452633d8e1fa14d6bd976 100644 (file)
--- a/mconfig
+++ b/mconfig
@@ -1,14 +1,14 @@
 # LLVM/clang++ with libc++ on Linux
 #CXX=clang++
-#CXXOPTS=-stdlib=libc++
+#CXXOPTS=-stdlib=libc++ -std=gnu++11 -Os -Wall
 #EXTRA_LIBS=-lc++abi
 
 # GCC. Note with GCC 5,5.1,5.2 the new C++11 ABI is buggy.
 CXX=g++
-CXXOPTS=-D_GLIBCXX_USE_CXX11_ABI=0
+CXXOPTS=-D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++11 -Os -Wall
 EXTRA_LIBS=
 
 # OpenBSD, tested with GCC 4.9.3 and gmake:
 #CXX=eg++
-#CXXOPTS=
+#CXXOPTS=-D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++11 -Os -Wall
 #EXTRA_LIBS=