[0/6] Various portability fixes and organization

Message ID 20241010102559.9162-1-mcpratt@pm.me
Headers
Series Various portability fixes and organization |

Message

Michael Pratt Oct. 10, 2024, 10:26 a.m. UTC
  Hi,

I saw that elfutils is having a release soon, so I thought now
would be a good time to send some patches that are used
by the Openwrt project to help elfutils build on more systems,
for example, by integrating with gnulib/libtool, and coinciding with
custom patches applied to other build tools.

The first 4 patches are very simple so I'm hoping they can be merged ASAP.

The last 2 patches are less critical, especially the last one
which is just an organizational step. If the last 2 patches
are not acceptable, they can be dropped or revisited after the release.

Thanks,
MCP

Michael Pratt (6):
  lib: Add missing config.h include to next_prime.c
  libcpu: Include config.h before standard headers in lexer source
  libdw: Let clean targets be unconditional
  src: Prevent invalid include of binary into compilation
  Remove usage of "unlocked" variant of stdio print functions
  Use file stream or format variants of stdio print functions

 lib/next_prime.c              |   4 +
 libasm/asm_align.c            |   4 +-
 libcpu/i386_disasm.c          |   2 +-
 libcpu/i386_lex.l             |  10 +-
 libcpu/i386_parse.y           |   4 +-
 libdw/Makefile.am             |   2 +-
 libebl/eblobjnote.c           |   4 +-
 src/Makefile.am               |   1 +
 src/addr2line.c               |   8 +-
 src/ar.c                      |   2 +-
 src/elfclassify.c             |   2 +-
 src/elflint.c                 |   2 +-
 src/nm.c                      |  22 ++--
 src/objdump.c                 |  28 ++---
 src/readelf.c                 | 198 +++++++++++++++++-----------------
 src/size.c                    |   8 +-
 src/strings.c                 |  20 ++--
 src/unstrip.c                 |   2 +-
 tests/addrcfi.c               |   2 +-
 tests/addrscopes.c            |   2 +-
 tests/all-dwarf-ranges.c      |   4 +-
 tests/arextract.c             |   4 +-
 tests/asm-tst1.c              |   6 +-
 tests/asm-tst2.c              |   6 +-
 tests/asm-tst3.c              |   8 +-
 tests/asm-tst4.c              |   2 +-
 tests/asm-tst5.c              |   2 +-
 tests/asm-tst6.c              |   2 +-
 tests/asm-tst7.c              |   6 +-
 tests/asm-tst8.c              |   6 +-
 tests/asm-tst9.c              |   6 +-
 tests/buildid.c               |   4 +-
 tests/debugaltlink.c          |   4 +-
 tests/dwarf-getmacros.c       |   6 +-
 tests/dwarf-getstring.c       |   2 +-
 tests/dwarf-ranges.c          |   2 +-
 tests/dwarfcfi.c              |   2 +-
 tests/dwflmodtest.c           |   6 +-
 tests/funcretval.c            |   6 +-
 tests/funcscopes.c            |   2 +-
 tests/get-aranges.c           |   6 +-
 tests/get-files-define-file.c |   2 +-
 tests/get-files.c             |   2 +-
 tests/get-pubnames.c          |   4 +-
 tests/line2addr.c             |   4 +-
 tests/next-files.c            |   2 +-
 tests/saridx.c                |   2 +-
 tests/scnnames.c              |   2 +-
 tests/sectiondump.c           |   4 +-
 tests/show-die-info.c         |  62 +++++------
 tests/showptable.c            |  10 +-
 tests/test-nlist.c            |   2 +-
 52 files changed, 262 insertions(+), 253 deletions(-)
  

Comments

Michael Pratt Oct. 14, 2024, 7:12 a.m. UTC | #1
Hi Aaron,

The first 3 patches of the series are pretty simple and helpful.
I would like to see them in the next release, do they look ok?

Without the first 2, we actually experience build errors
due to config.h not being included or being included too late.

The 3rd one prevents an error with our patched automake,
it's unknown whether upstream automake would accept it
due to the increased strictness in how the variable is defined,
but it's a very easy adjustment anyway.

--
Thanks for your consideration,
MCP