File tree Expand file tree Collapse file tree 5 files changed +18
-4
lines changed Expand file tree Collapse file tree 5 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ NO_USDT ?=
45
45
NO_NATPMP ?=
46
46
MULTIPROCESS ?=
47
47
LTO ?=
48
+ NO_HARDEN ?=
48
49
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
49
50
50
51
C_STANDARD ?= c11
@@ -146,8 +147,8 @@ include packages/packages.mk
146
147
# 2. Before including packages/*.mk (excluding packages/packages.mk), since
147
148
# they rely on the build_id variables
148
149
#
149
- build_id: =$(shell env CC='$(build_CC ) ' C_STANDARD='$(C_STANDARD ) ' CXX='$(build_CXX ) ' CXX_STANDARD='$(CXX_STANDARD ) ' AR='$(build_AR ) ' RANLIB='$(build_RANLIB ) ' STRIP='$(build_STRIP ) ' SHA256SUM='$(build_SHA256SUM ) ' DEBUG='$(DEBUG ) ' LTO='$(LTO ) ' ./gen_id '$(BUILD_ID_SALT ) ' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT ) ) ')
150
- $(host_arch)_$(host_os)_id: =$(shell env CC='$(host_CC ) ' C_STANDARD='$(C_STANDARD ) ' CXX='$(host_CXX ) ' CXX_STANDARD='$(CXX_STANDARD ) ' AR='$(host_AR ) ' RANLIB='$(host_RANLIB ) ' STRIP='$(host_STRIP ) ' SHA256SUM='$(build_SHA256SUM ) ' DEBUG='$(DEBUG ) ' LTO='$(LTO ) ' ./gen_id '$(HOST_ID_SALT ) ' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT ) ) ')
150
+ build_id: =$(shell env CC='$(build_CC ) ' C_STANDARD='$(C_STANDARD ) ' CXX='$(build_CXX ) ' CXX_STANDARD='$(CXX_STANDARD ) ' AR='$(build_AR ) ' RANLIB='$(build_RANLIB ) ' STRIP='$(build_STRIP ) ' SHA256SUM='$(build_SHA256SUM ) ' DEBUG='$(DEBUG ) ' LTO='$(LTO ) ' NO_HARDEN=' $( NO_HARDEN ) ' ./gen_id '$(BUILD_ID_SALT ) ' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT ) ) ')
151
+ $(host_arch)_$(host_os)_id: =$(shell env CC='$(host_CC ) ' C_STANDARD='$(C_STANDARD ) ' CXX='$(host_CXX ) ' CXX_STANDARD='$(CXX_STANDARD ) ' AR='$(host_AR ) ' RANLIB='$(host_RANLIB ) ' STRIP='$(host_STRIP ) ' SHA256SUM='$(build_SHA256SUM ) ' DEBUG='$(DEBUG ) ' LTO='$(LTO ) ' NO_HARDEN=' $( NO_HARDEN ) ' ./gen_id '$(HOST_ID_SALT ) ' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT ) ) ')
151
152
152
153
boost_packages_$(NO_BOOST) = $(boost_packages )
153
154
@@ -253,6 +254,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
253
254
-e 's|@no_natpmp@|$(NO_NATPMP)|' \
254
255
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
255
256
-e 's|@lto@|$(LTO)|' \
257
+ -e 's|@no_harden@|$(NO_HARDEN)|' \
256
258
-e 's|@debug@|$(DEBUG)|' \
257
259
$< > $@
258
260
touch $@
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ The following can be set when running make: `make FOO=bar`
123
123
resides in the ` depends ` directory, and the log file is printed out automatically in case
124
124
of build error. After successful build log files are moved along with package archives
125
125
- ` LTO ` : Use LTO when building packages.
126
+ - ` NO_HARDEN=1 ` : Don't use hardening options when building packages
126
127
127
128
If some packages are not built, for example ` make NO_WALLET=1 ` , the appropriate
128
129
options will be passed to bitcoin's configure. In this case, ` --disable-wallet ` .
Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ if test -z "$enable_lto" && test -n "@lto@"; then
82
82
enable_lto=yes
83
83
fi
84
84
85
+ if test -z "$enable_hardening" && test -n "@no_harden@"; then
86
+ enable_hardening=no
87
+ fi
88
+
85
89
PKG_CONFIG="$(which pkg-config) --static"
86
90
87
91
PKG_CONFIG_PATH="${depends_prefix}/share/pkgconfig:${depends_prefix}/lib/pkgconfig"
Original file line number Diff line number Diff line change 2
2
3
3
# Usage: env [ CC=... ] [ C_STANDARD=...] [ CXX=... ] [CXX_STANDARD=...] \
4
4
# [ AR=... ] [ RANLIB=... ] [ STRIP=... ] [ DEBUG=... ] \
5
- # [ LTO=... ] ./build-id [ID_SALT]...
5
+ # [ LTO=... ] [ NO_HARDEN=... ] ./build-id [ID_SALT]...
6
6
#
7
7
# Prints to stdout a SHA256 hash representing the current toolset, used by
8
8
# depends/Makefile as a build id for caching purposes (detecting when the
70
70
echo " LTO=${LTO} "
71
71
echo " END LTO"
72
72
73
+ echo " BEGIN NO_HARDEN"
74
+ echo " NO_HARDEN=${NO_HARDEN} "
75
+ echo " END NO_HARDEN"
76
+
73
77
echo " END ALL"
74
78
) | if [ -n " $DEBUG " ] && command -v tee > /dev/null 2>&1 ; then
75
79
# When debugging and `tee` is available, output the preimage to stderr
Original file line number Diff line number Diff line change @@ -16,8 +16,11 @@ define $(package)_set_vars
16
16
$(package ) _config_opts_netbsd=--with-pic
17
17
$(package ) _config_opts_openbsd=--with-pic
18
18
$(package ) _config_opts_android=--with-pic
19
- $(package ) _cppflags+=-D_FORTIFY_SOURCE=3
20
19
$(package ) _cppflags_mingw32=-D_WIN32_WINNT=0x0601
20
+
21
+ ifeq ($(NO_HARDEN ) ,)
22
+ $(package ) _cppflags+=-D_FORTIFY_SOURCE=3
23
+ endif
21
24
endef
22
25
23
26
define $(package)_preprocess_cmds
You can’t perform that action at this time.
0 commit comments