mconfig.Linux 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Default build configuration for Linux.
  2. # This file can be used as a basis for manual customisation, by copying it
  3. # to the correct place (../mconfig) before editing. If this is not done,
  4. # Linux configuration will normally be generated by the shell script
  5. # in this directory (mconfig.Linux.sh).
  6. # Installation path options.
  7. SBINDIR=/sbin
  8. MANDIR=/usr/share/man
  9. SYSCONTROLSOCKET=/run/dinitctl
  10. # General build options.
  11. # Linux (GCC). Note with GCC 5.x you must use the old (pre-C++11) ABI, with
  12. # newer versions you can use either (the new ABI is preferable). See BUILD file
  13. # for more information.
  14. CXX=g++
  15. CPPFLAGS=-D_GLIBCXX_USE_CXX11_ABI=1
  16. CXXFLAGS=-std=c++11 -Os -Wall -fno-rtti -fno-plt -flto
  17. LDFLAGS_BASE=
  18. LDFLAGS=$(LDFLAGS_BASE) $(CXXFLAGS)
  19. BUILD_SHUTDOWN=yes
  20. TEST_CXXFLAGS=$(CXXFLAGS) -fsanitize=address,undefined
  21. TEST_LDFLAGS_BASE=$(LDFLAGS_BASE)
  22. TEST_LDFLAGS=$(TEST_LDFLAGS_BASE) $(TEST_CXXFLAGS)
  23. # Notes:
  24. # -D_GLIBCXX_USE_CXX11_ABI=1 : force use of new ABI, see above / BUILD
  25. # -fno-rtti (optional) : Dinit does not require C++ Run-time Type Information
  26. # -fno-plt (optional) : Recommended optimisation
  27. # -flto (optional) : Perform link-time optimisation
  28. # -fsanitize=address,undefined : Apply sanitizers (during unit tests)
  29. # LDFLAGS should also contain C++ optimisation flags for LTO (-flto).
  30. # Features.
  31. SUPPORT_CGROUPS=1
  32. # Service defaults.
  33. DEFAULT_AUTO_RESTART=true
  34. DEFAULT_START_TIMEOUT=60
  35. DEFAULT_STOP_TIMEOUT=10