From 167ca801ef72cb8a8ae7a11e21160e1ff1b494c7 Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Fri, 13 Jan 2023 02:07:58 +0100 Subject: [PATCH] build: clean up security and symbol checks from makefile Fixes calls to make check-security and make check-symbols to have better integration with the CI and Gitian The condition in the check-symbols target requiring the configure flag --enable-glibc-back-compat is removed because that is exclusive to Linux. By removing it, we enable the check for all binaries, including those built for Windows and macOs. Finally, removes configure.ac lines for readelf and cppfilt. Those are no longer needed because lief is used in their stead. squash into: build: clean up security and symbol checks from makefile --- configure.ac | 2 -- src/Makefile.am | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 60679ced0..c4cc779e1 100644 --- a/configure.ac +++ b/configure.ac @@ -86,8 +86,6 @@ AC_PATH_PROG([GIT], [git]) AC_PATH_PROG(CCACHE,ccache) AC_PATH_PROG(XGETTEXT,xgettext) AC_PATH_PROG(HEXDUMP,hexdump) -AC_PATH_TOOL(READELF, readelf) -AC_PATH_TOOL(CPPFILT, c++filt) AC_PATH_TOOL(OBJCOPY, objcopy) AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files) diff --git a/src/Makefile.am b/src/Makefile.am index 61d60ce5f..69049e3a7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -507,15 +507,13 @@ clean-local: $(AM_V_GEN) $(WINDRES) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -DWINDRES_PREPROC -i $< -o $@ check-symbols: $(bin_PROGRAMS) -if GLIBC_BACK_COMPAT @echo "Checking glibc back compat..." - $(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py < $(bin_PROGRAMS) -endif + $(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS) check-security: $(bin_PROGRAMS) if HARDEN @echo "Checking binary security..." - $(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py < $(bin_PROGRAMS) + $(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/security-check.py $(bin_PROGRAMS) endif %.pb.cc %.pb.h: %.proto