public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Yonggang Luo <luoyonggang@gmail.com>
To: elfutils-devel@sourceware.org
Cc: Yonggang Luo <luoyonggang@gmail.com>
Subject: [PATCH v2 0/7] Enable building libelf of elfutils on win32
Date: Sun, 16 Oct 2022 00:36:19 +0800	[thread overview]
Message-ID: <20221015163622.129-1-luoyonggang@gmail.com> (raw)

After these changes, now libelf can be build with mingw/gcc and msvc/clang

v1 -> v2

Do no modify libebl in commit move platform depended include into system.h of libelf
Add commit Move the #include <libintl.h> into eu-config.h to

Yonggang Luo (7):
  Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'
  move platform depended include into system.h of libelf
  Move the #include <libintl.h> into eu-config.h
  lib: Use NOT_HAVE_LIBINTL to guard #include <libintl.h>
  Strip __ prefix from __BYTE_ORDER __LITTLE_ENDIAN and __BIG_ENDIAN
  Fixes building with msvc/clang mingw/gcc
  Add CMake build files

 .gitignore                                    |   1 +
 CMakeLists.txt                                |  47 +++++
 configure.ac                                  |   1 +
 debuginfod/debuginfod.cxx                     |   1 -
 lib/color.c                                   |   1 -
 lib/eu-config.h                               |   8 +
 lib/printversion.c                            |   1 -
 lib/system.h                                  |  74 ++++++-
 lib/system_win32.c                            | 162 +++++++++++++++
 lib/xasprintf.c                               |   1 -
 lib/xmalloc.c                                 |   1 -
 libasm/asm_end.c                              |   1 -
 libasm/asm_error.c                            |   1 -
 libasm/asm_newscn.c                           |   1 -
 libcpu/i386_disasm.c                          |   2 +-
 libcpu/i386_lex.l                             |   1 -
 libcpu/i386_parse.y                           |   1 -
 libcpu/memory-access.h                        |  26 +--
 libcpu/riscv_disasm.c                         |   2 +-
 libdw/libdwP.h                                |   1 -
 libdw/memory-access.h                         |   8 +-
 libdwfl/argp-std.c                            |   1 -
 libdwfl/dwfl_error.c                          |   1 -
 libdwfl/dwfl_segment_report_module.c          |   2 +-
 libebl/libeblP.h                              |   1 -
 libelf/CMakeLists.txt                         | 192 ++++++++++++++++++
 libelf/common.h                               |   5 +-
 libelf/config-cmake/config.h                  |  27 +++
 libelf/elf32_checksum.c                       |   5 +-
 libelf/elf32_getphdr.c                        |   2 -
 libelf/elf32_getshdr.c                        |   2 -
 libelf/elf32_updatefile.c                     |   6 +-
 libelf/elf32_updatenull.c                     |   2 -
 libelf/elf32_xlatetof.c                       |   5 +-
 libelf/elf32_xlatetom.c                       |   1 -
 libelf/elf_begin.c                            |  10 +-
 libelf/elf_cntl.c                             |   2 -
 libelf/elf_compress.c                         |   2 -
 libelf/elf_end.c                              |   3 +-
 libelf/elf_error.c                            |   1 -
 libelf/elf_getarsym.c                         |  10 +-
 libelf/elf_getdata.c                          |   2 -
 libelf/elf_getdata_rawchunk.c                 |   2 -
 libelf/elf_getshdrstrndx.c                    |   2 -
 libelf/elf_readall.c                          |   2 -
 libelf/elf_update.c                           |   7 +-
 libelf/gelf_xlate.c                           |   1 -
 libelf/libelf.h                               |   6 +
 libelf/libelfP.h                              |   5 +
 libelf/nlist.c                                |   1 -
 lib/xasprintf.c => libelf/win32/ar.h          | 104 +++++-----
 src/addr2line.c                               |   1 -
 src/ar.c                                      |   1 -
 src/arlib-argp.c                              |   1 -
 src/arlib.c                                   |   1 -
 src/arlib.h                                   |   2 +-
 src/arlib2.c                                  |   1 -
 src/elfcmp.c                                  |   1 -
 src/elflint.c                                 |   1 -
 src/findtextrel.c                             |   1 -
 src/nm.c                                      |   1 -
 src/objdump.c                                 |   1 -
 src/ranlib.c                                  |   1 -
 src/readelf.c                                 |   1 -
 src/size.c                                    |   1 -
 src/strings.c                                 |   1 -
 src/strip.c                                   |   1 -
 src/unstrip.c                                 |   1 -
 tests/Makefile.am                             |   2 +-
 .../{hello2.spec. => hello2.spec}             |   0
 .../{hello3.spec. => hello3.spec}             |   0
 71 files changed, 612 insertions(+), 162 deletions(-)
 create mode 100644 CMakeLists.txt
 create mode 100644 lib/system_win32.c
 create mode 100644 libelf/CMakeLists.txt
 create mode 100644 libelf/config-cmake/config.h
 copy lib/xasprintf.c => libelf/win32/ar.h (66%)
 rename tests/debuginfod-rpms/{hello2.spec. => hello2.spec} (100%)
 rename tests/debuginfod-rpms/{hello3.spec. => hello3.spec} (100%)

-- 
2.36.1.windows.1


             reply	other threads:[~2022-10-15 16:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-15 16:36 Yonggang Luo [this message]
2022-10-15 16:36 ` [PATCH v2 2/7] move platform depended include into system.h of libelf Yonggang Luo
2022-10-16 20:47   ` Mark Wielaard
2022-10-15 16:36 ` [PATCH v2 3/7] Move the #include <libintl.h> into eu-config.h Yonggang Luo
2022-10-16 20:49   ` Mark Wielaard
2022-10-15 16:36 ` [PATCH v2 4/7] lib: Use NOT_HAVE_LIBINTL to guard #include <libintl.h> Yonggang Luo
2022-10-16 20:55   ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221015163622.129-1-luoyonggang@gmail.com \
    --to=luoyonggang@gmail.com \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).