Pull in upstream's make check-security, based on upstream PR #6854 and #7424.

This commit is contained in:
Taylor Hornby
2016-07-21 13:41:06 -06:00
parent 1327d1915a
commit 56734f4b27
8 changed files with 272 additions and 10 deletions

View File

@@ -79,7 +79,7 @@ LIBZCASH_H = \
zcash/prf.h \
zcash/util.h
.PHONY: FORCE
.PHONY: FORCE check-security
# bitcoin core #
BITCOIN_CORE_H = \
addrman.h \
@@ -469,6 +469,12 @@ clean-local:
$(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS) -c -o $@ $<
check-security: $(bin_PROGRAMS)
if HARDEN
@echo "Checking binary security of [$(bin_PROGRAMS)]..."
$(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py < $(bin_PROGRAMS)
endif
%.pb.cc %.pb.h: %.proto
@test -f $(PROTOC)
$(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)