Browse Source

Move compiler flags out of the Makefile and into mconfig

Davin McCall 8 years ago
parent
commit
8e7328da22
2 changed files with 4 additions and 4 deletions
  1. 1 1
      Makefile
  2. 3 3
      mconfig

+ 1 - 1
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
 

+ 3 - 3
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=