Fix check of executable name used for shutdown.
[oweals/dinit.git] / mconfig
diff --git a/mconfig b/mconfig
index 8cf17f21429afcd74fd53f2604798384f4482e3d..aa391077adb0fbcbdf10b4c30f2937147afbc5b2 100644 (file)
--- a/mconfig
+++ b/mconfig
@@ -1,14 +1,40 @@
-# LLVM/clang++ with libc++ on Linux
-#CXX=clang++
-#CXXOPTS=-stdlib=libc++ -std=gnu++11 -Os -Wall -fno-rtti
-#EXTRA_LIBS=-lc++abi
+# Installation path options.
+
+SBINDIR=/sbin
+MANDIR=/usr/share/man
+SYSCONTROLSOCKET=/dev/dinitctl
+
+
+# General build options. Uncomment the options appropriate for your system.
 
-# GCC. Note with GCC 5,5.1,5.2 the new C++11 ABI is buggy.
+# Linux (GCC). Note with GCC 5.x/6.x you must use the old ABI, with GCC 7.x you must use
+# the new ABI. See BUILD file for more information.
 CXX=g++
-CXXOPTS=-D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++11 -Os -Wall -fno-rtti
-EXTRA_LIBS=
+CXXOPTS=-D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11 -Os -Wall -fno-rtti -fno-plt -flto
+LDFLAGS=-flto
+BUILD_SHUTDOWN=yes
+SANITIZEOPTS=-fsanitize=address,undefined
+
+# OpenBSD, tested with GCC 4.9.3 / Clang++ 4/5 and gmake:
+#CXX=clang++
+#CXXOPTS=-std=c++11 -Os -Wall -fno-rtti
+#LDFLAGS=
+#BUILD_SHUTDOWN=no
+#SANITIZEOPTS=
+# (shutdown command not available for OpenBSD yet).
+
+# FreeBSD: use clang++ by default, supports sanitizers, requires linking with -lrt
+# Cannot use -fno-rtti: apparently prevents exception handling from working properly.
+#CXX=clang++
+#CXXOPTS=-std=c++11 -Os -Wall
+#LDFLAGS=-lrt
+#BUILD_SHUTDOWN=no
+#SANITIZEOPTS=-fsanitize=address,undefined
 
-# OpenBSD, tested with GCC 4.9.3 and gmake:
-#CXX=eg++
-#CXXOPTS=-D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++11 -Os -Wall -fno-rtti
-#EXTRA_LIBS=
+# MacOS: use g++ (which may alias clang++):
+# Cannot use -fno-rtti: apparently prevents exception handling from working properly.
+#CXX=g++
+#CXXOPTS=-std=c++11 -Os -Wall -flto
+#LDFLAGS=-flto
+#BUILD_SHUTDOWN=no
+#SANITIZEOPTS=-fsanitize=address,undefined