Merge #17881: [0.18] scripts: fix check-symbols & check-security argument passing

9a0ebb7f02 scripts: fix check-symbols & check-security argument passing (fanquake)

Pull request description:

  Backport of https://github.com/bitcoin/bitcoin/pull/17857.

  The first argument in bin_PROGRAMS (bitcoind) was being silently
  dropped and never passed into the check-security.py or check-symbols.py scripts.

  This has been the case since the scripts were added to the makefile in
  f3d3eaf78e.

  Example of the behavior:

  ```python
  # touch a, touch b, touch c
  # python3 args.py < a b c

  import sys
  if __name__ == '__main__':
      print(sys.argv)
      # ['args.py', 'b', 'c']

      # if you add some lines to "a",
      # you'll see them here..
      for line in sys.stdin:
          print(line)
  ```

  Github-Pull: #17857
  Rebased-From: 71af793512

Top commit has no ACKs.

Tree-SHA512: 0dc5dc4efc11a98e85e30bae7acd6e8139673dec28ea7c3151c03f9e30145faf91af2cf707659b46e120dda42e254355c669451c6bf4d93467d061568e1b2c11
This commit is contained in:
fanquake 2020-01-12 20:16:17 +08:00
commit a05d14d4a0
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -638,13 +638,13 @@ clean-local:
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)
$(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS)
endif
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) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py $(bin_PROGRAMS)
endif
if ENABLE_BIP70