2014-12-31 17:49:12 +01:00
|
|
|
linux_CFLAGS=-pipe
|
2022-06-14 20:06:03 +02:00
|
|
|
|
|
|
|
ifneq ($(LTO),)
|
|
|
|
linux_CFLAGS += -flto
|
|
|
|
linux_LDFLAGS += -flto
|
|
|
|
endif
|
|
|
|
|
2024-03-26 20:53:21 +01:00
|
|
|
linux_CXXFLAGS=$(linux_CFLAGS)
|
2014-12-31 17:49:12 +01:00
|
|
|
|
|
|
|
linux_release_CFLAGS=-O2
|
|
|
|
linux_release_CXXFLAGS=$(linux_release_CFLAGS)
|
|
|
|
|
2024-04-03 11:43:14 +02:00
|
|
|
linux_debug_CFLAGS=-O1 -g
|
2014-12-31 17:49:12 +01:00
|
|
|
linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
|
|
|
|
|
2024-04-09 09:30:31 +02:00
|
|
|
# https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html
|
|
|
|
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
|
|
|
|
|
|
|
|
# https://libcxx.llvm.org/Hardening.html
|
|
|
|
linux_debug_CPPFLAGS+=-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG
|
2014-12-31 17:49:12 +01:00
|
|
|
|
|
|
|
ifeq (86,$(findstring 86,$(build_arch)))
|
|
|
|
i686_linux_CC=gcc -m32
|
|
|
|
i686_linux_CXX=g++ -m32
|
|
|
|
i686_linux_AR=ar
|
|
|
|
i686_linux_RANLIB=ranlib
|
|
|
|
i686_linux_NM=nm
|
|
|
|
i686_linux_STRIP=strip
|
|
|
|
|
|
|
|
x86_64_linux_CC=gcc -m64
|
|
|
|
x86_64_linux_CXX=g++ -m64
|
|
|
|
x86_64_linux_AR=ar
|
|
|
|
x86_64_linux_RANLIB=ranlib
|
|
|
|
x86_64_linux_NM=nm
|
|
|
|
x86_64_linux_STRIP=strip
|
|
|
|
else
|
|
|
|
i686_linux_CC=$(default_host_CC) -m32
|
|
|
|
i686_linux_CXX=$(default_host_CXX) -m32
|
|
|
|
x86_64_linux_CC=$(default_host_CC) -m64
|
|
|
|
x86_64_linux_CXX=$(default_host_CXX) -m64
|
|
|
|
endif
|
2020-05-21 09:10:52 +02:00
|
|
|
linux_cmake_system=Linux
|