Skip to content

Commit 92f553e

Browse files
committed
Merge bitcoin#32038: depends: remove NO_HARDEN option
5dfef6b depends: remove NO_HARDEN option (fanquake) Pull request description: This was only needed to work around a (Libtool related iirc) Windows issue, when hardening was disabled. I can no-longer recreate this failure, so it'd be good to remove this Windows carveout. ACKs for top commit: davidgumberg: crACK 5dfef6b laanwj: Code review ACK 5dfef6b Tree-SHA512: 38657f09c537ba02ecaf0676d47087a835283cabfc81ad9b2d5e68858dcd7a610b6a1df6730920d40b48be2bbc55a45d6b8aea4364884b5f1c1bd12126940f5b
2 parents 1b251f6 + 5dfef6b commit 92f553e

File tree

5 files changed

+4
-21
lines changed

5 files changed

+4
-21
lines changed

depends/Makefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ NO_ZMQ ?=
4343
NO_USDT ?=
4444
MULTIPROCESS ?=
4545
LTO ?=
46-
NO_HARDEN ?=
4746
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
4847

4948
C_STANDARD ?= c11
@@ -143,13 +142,13 @@ include packages/packages.mk
143142
#
144143
build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' \
145144
AR='$(build_AR)' NM='$(build_NM)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' \
146-
DEBUG='$(DEBUG)' NO_HARDEN='$(NO_HARDEN)' \
145+
DEBUG='$(DEBUG)' \
147146
./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
148147

149148
$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(host_CXX)' CXX_STANDARD='$(CXX_STANDARD)' \
150149
CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' LDFLAGS='$(LDFLAGS)' \
151150
AR='$(host_AR)' NM='$(host_NM)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' \
152-
DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' \
151+
DEBUG='$(DEBUG)' LTO='$(LTO)' \
153152
./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
154153

155154
boost_packages_$(NO_BOOST) = $(boost_packages)
@@ -236,7 +235,6 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina
236235
-e 's|@bdb_packages@|$(bdb_packages_)|' \
237236
-e 's|@sqlite_packages@|$(sqlite_packages_)|' \
238237
-e 's|@usdt_packages@|$(usdt_packages_)|' \
239-
-e 's|@no_harden@|$(NO_HARDEN)|' \
240238
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
241239
$< > $@
242240
touch $@

depends/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ The following can be set when running make: `make FOO=bar`
127127
resides in the `depends` directory, and the log file is printed out automatically in case
128128
of build error. After successful build log files are moved along with package archives
129129
- `LTO`: Enable options needed for LTO. Does not add `-flto` related options to *FLAGS.
130-
- `NO_HARDEN=1`: Don't use hardening options when building packages
131130

132131
If some packages are not built, for example `make NO_WALLET=1`, the appropriate CMake cache
133132
variables will be set when generating the Bitcoin Core buildsystem. In this case, `-DENABLE_WALLET=OFF`.

depends/gen_id

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Usage: env [ CC=... ] [ C_STANDARD=...] [ CXX=... ] [CXX_STANDARD=...] \
44
# [ CPPFLAGS=... ] [CFLAGS=...] [CXXFLAGS=...] [LDFLAGS=...] \
55
# [ AR=... ] [ NM=... ] [ RANLIB=... ] [ STRIP=... ] [ DEBUG=... ] \
6-
# [ LTO=... ] [ NO_HARDEN=... ] ./gen_id [ID_SALT]...
6+
# [ LTO=... ] ./gen_id [ID_SALT]...
77
#
88
# Prints to stdout a SHA256 hash representing the current toolset, used by
99
# depends/Makefile as a build id for caching purposes (detecting when the
@@ -93,10 +93,6 @@
9393
echo "LTO=${LTO}"
9494
echo "END LTO"
9595

96-
echo "BEGIN NO_HARDEN"
97-
echo "NO_HARDEN=${NO_HARDEN}"
98-
echo "END NO_HARDEN"
99-
10096
echo "END ALL"
10197
) | if [ -n "$DEBUG" ] && command -v tee > /dev/null 2>&1; then
10298
# When debugging and `tee` is available, output the preimage to stderr

depends/packages/libevent.mk

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ define $(package)_set_vars
1515
$(package)_config_opts+=-DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON
1616
$(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC
1717
$(package)_cflags += -fdebug-prefix-map=$($(package)_extract_dir)=/usr -fmacro-prefix-map=$($(package)_extract_dir)=/usr
18-
$(package)_cppflags += -D_GNU_SOURCE
18+
$(package)_cppflags += -D_GNU_SOURCE -D_FORTIFY_SOURCE=3
1919
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0A00
20-
21-
ifeq ($(NO_HARDEN),)
22-
$(package)_cppflags+=-D_FORTIFY_SOURCE=3
23-
endif
2420
endef
2521

2622
define $(package)_preprocess_cmds

depends/toolchain.cmake.in

-6
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,6 @@ else()
146146
set(WITH_USDT ON CACHE BOOL "")
147147
endif()
148148

149-
if("@no_harden@")
150-
set(ENABLE_HARDENING OFF CACHE BOOL "")
151-
else()
152-
set(ENABLE_HARDENING ON CACHE BOOL "")
153-
endif()
154-
155149
if("@multiprocess@" STREQUAL "1")
156150
set(WITH_MULTIPROCESS ON CACHE BOOL "")
157151
set(Libmultiprocess_ROOT "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "")

0 commit comments

Comments
 (0)