mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 14:37:42 -03:00
1ef9f7ca4a
When `ENABLE_HARDENING` is `ON` (which is the default), then enable light or full hardening in libc++ or libstdc++, depending on the library used and depending on the build type. Remove hardening flags from `depends/hosts/linux.mk` in favor of the more generic way to enable them via CMake. The same would be achieved after this change by `cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_HARDENING=ON`. Inspired by https://github.com/bitcoin/bitcoin/issues/31272#issuecomment-2518700939
39 lines
972 B
Makefile
39 lines
972 B
Makefile
linux_CFLAGS=-pipe -std=$(C_STANDARD)
|
|
linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
|
|
|
ifneq ($(LTO),)
|
|
linux_AR = $(host_toolchain)gcc-ar
|
|
linux_NM = $(host_toolchain)gcc-nm
|
|
linux_RANLIB = $(host_toolchain)gcc-ranlib
|
|
endif
|
|
|
|
linux_release_CFLAGS=-O2
|
|
linux_release_CXXFLAGS=$(linux_release_CFLAGS)
|
|
|
|
linux_debug_CFLAGS=-O1 -g
|
|
linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
|
|
|
|
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
|
|
|
|
linux_cmake_system_name=Linux
|
|
# Refer to doc/dependencies.md for the minimum required kernel.
|
|
linux_cmake_system_version=3.17.0
|