public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/25] Patches for building with mingw/gcc msvc/clang-cl
@ 2022-10-20 18:25 Yonggang Luo
  2022-10-20 18:25 ` [PATCH 01/25] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec' Yonggang Luo
                   ` (23 more replies)
  0 siblings, 24 replies; 61+ messages in thread
From: Yonggang Luo @ 2022-10-20 18:25 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Yonggang Luo

I split it into small patches for easier to review

Yonggang Luo (25):
  Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'
  ignore build directory
  libebl: There is no need #include <dlfcn.h> in eblclosebackend.c and
    eblopenbackend.c
  libelf/libdwfl: Remove "#define LIB_SYSTEM_H 1" in libelf_crc32.c and
    libdwfl_crc32.c
  use #include <system.h> instead platform depended header <endian.h> in
    libdw/memory-access.h
  move platform depended include into system.h of libebl
  move platform depended include into system.h of libasm, libcpu, libdw,
    libdwfl and libdwelf
  Use configure to detect HAVE_DECL_MMAP and use it for system doesn't
    provide sys/mman.h
  include libgen.h in system.h
  libcpu: Remove the need of NMNES by using enum
  libcpu: Use __asm instead asm that can be recognized by both clang-cl
    and gcc
  libcpu: Use "#define FCT_mod$64r_m FCT_mod$r_m" is enough and can be
    recognized by clang-cl on windows in i386_data.h
  libdw: typeof -> __typeof that can be recognized by both clang-cl and
    gcc
  libdw: check __OPTIMIZE__ in dwarf_whatattr.c and dwarf_whatform.c to
    match the header
  lib: Implement error properly even when not HAVE_ERR_H
  libeu: Move the implementation of  pwrite_retry, write_retry and
    pread_retry from header to source
  libelf: uid_t, gid_t and mode_t are not comes with msvcrt, so using
    long/unsigned long instead on win32
  lib: Use NOT_HAVE_LIBINTL to guard #include <libintl.h>
  libelf: F_GETFD may not predefined with msvc/mingw, guard the usage of
    it
  Add function sys_get_page_size to replace platform dependent sysconf
    (_SC_PAGESIZE)
  libasm: stdio_ext.h are not present on win32
  libebl/libdwelf: define ssize_t and pid_t for MSVC within installed
    header libdwelf.h and libebl.h
  libasm/debuginfod: fchmod doesn't present on win32
  lib: isatty is not available on windows
  Fixes building with msvc/clang mingw/gcc

 .gitignore                                    |    1 +
 .vscode/settings.json                         |  124 ++
 CMakeLists.txt                                |  106 +
 README                                        |    2 +-
 backends/CMakeLists.txt                       |  136 ++
 config-cmake/config.h                         |   40 +
 config-cmake/win32-gnu/search.h               |    3 +
 config-cmake/win32-msvc/dirent.c              |  872 ++++++++
 config-cmake/win32-msvc/dirent.h              |  339 +++
 config-cmake/win32-msvc/search.h              |   21 +
 config-cmake/win32-msvc/sys/time.h            |    1 +
 .../win32/ar.h                                |   32 +-
 config-cmake/win32/argp-ba.c                  |   23 +
 config-cmake/win32/argp-eexist.c              |   30 +
 config-cmake/win32/argp-fmtstream.c           |  456 ++++
 config-cmake/win32/argp-fmtstream.h           |  112 +
 config-cmake/win32/argp-help.c                | 1861 +++++++++++++++++
 config-cmake/win32/argp-parse.c               | 1373 ++++++++++++
 config-cmake/win32/argp-pv.c                  |   22 +
 config-cmake/win32/argp-pvh.c                 |   25 +
 config-cmake/win32/argp-shims.c               |   27 +
 config-cmake/win32/argp-shims.h               |   20 +
 config-cmake/win32/argp.h                     |  520 +++++
 config-cmake/win32/internal.h                 |  163 ++
 config-cmake/win32/obstack.h                  |  535 +++++
 configure.ac                                  |    1 +
 debuginfod/debuginfod-client.c                |    4 +-
 lib/CMakeLists.txt                            |   36 +
 lib/Makefile.am                               |    2 +-
 lib/color.c                                   |    6 +-
 lib/crc32_file.c                              |    6 +-
 lib/error.c                                   |    9 +-
 lib/eu-config.h                               |   11 +
 lib/system.c                                  |  516 +++++
 lib/system.h                                  |  157 +-
 libasm/CMakeLists.txt                         |   59 +
 libasm/asm_abort.c                            |    1 -
 libasm/asm_addint8.c                          |    2 -
 libasm/asm_begin.c                            |    9 +-
 libasm/asm_end.c                              |    4 +-
 libasm/libasmP.h                              |    3 +
 libcpu/CMakeLists.txt                         |   34 +
 libcpu/Makefile.am                            |    2 +-
 libcpu/i386_data.h                            |    2 +-
 libcpu/i386_disasm.c                          |    3 +-
 libcpu/i386_parse.y                           |   13 +-
 libcpu/memory-access.h                        |    3 +-
 libdw/CMakeLists.txt                          |  152 ++
 libdw/dwarf_begin_elf.c                       |    4 +-
 libdw/dwarf_end.c                             |    1 -
 libdw/dwarf_getsrc_file.c                     |    2 +-
 libdw/dwarf_setalt.c                          |    2 -
 libdw/dwarf_whatattr.c                        |    3 +-
 libdw/dwarf_whatform.c                        |    3 +-
 libdw/libdw_find_split_unit.c                 |    1 -
 libdw/memory-access.h                         |   13 +-
 libdwelf/CMakeLists.txt                       |   36 +
 libdwelf/dwelf_elf_begin.c                    |    2 -
 libdwelf/dwelf_strtab.c                       |    3 +-
 libdwelf/libdwelf.h                           |    5 +
 libdwfl/CMakeLists.txt                        |   92 +
 libdwfl/argp-std.c                            |    1 -
 libdwfl/core-file.c                           |    6 -
 libdwfl/dwfl_build_id_find_debuginfo.c        |    2 -
 libdwfl/dwfl_build_id_find_elf.c              |    1 -
 libdwfl/dwfl_end.c                            |    1 -
 libdwfl/dwfl_frame.c                          |    1 -
 libdwfl/dwfl_module.c                         |    1 -
 libdwfl/dwfl_module_getdwarf.c                |    1 -
 libdwfl/dwfl_module_getsrc_file.c             |    2 +-
 libdwfl/dwfl_report_elf.c                     |    2 -
 libdwfl/dwfl_segment_report_module.c          |    4 +-
 libdwfl/find-debuginfo.c                      |    7 +-
 libdwfl/gzip.c                                |    2 -
 libdwfl/image-header.c                        |    4 -
 libdwfl/libdwfl_crc32.c                       |    1 -
 libdwfl/link_map.c                            |    4 +-
 libdwfl/linux-kernel-modules.c                |    2 +-
 libdwfl/linux-pid-attach.c                    |    1 -
 libdwfl/linux-proc-maps.c                     |    2 +-
 libdwfl/offline.c                             |    1 -
 libdwfl/open.c                                |    2 -
 libebl/CMakeLists.txt                         |   80 +
 libebl/eblauxvinfo.c                          |    3 +-
 libebl/eblclosebackend.c                      |    1 -
 libebl/eblcorenote.c                          |    3 +-
 libebl/ebldynamictagname.c                    |    2 +-
 libebl/eblobjnote.c                           |   10 +-
 libebl/eblobjnotetypename.c                   |    3 +-
 libebl/eblopenbackend.c                       |    5 +-
 libebl/eblresolvesym.c                        |    3 +-
 libebl/libebl.h                               |    5 +
 libebl/libeblP.h                              |    4 +-
 libelf/CMakeLists.txt                         |  168 ++
 libelf/elf32_updatefile.c                     |    5 +-
 libelf/elf_begin.c                            |    7 +-
 libelf/elf_end.c                              |    2 +
 libelf/elf_update.c                           |    5 +-
 libelf/libelf.h                               |    6 +
 libelf/libelf_crc32.c                         |    1 -
 src/addr2line.c                               |    4 +-
 src/ar.c                                      |    2 +-
 src/nm.c                                      |    4 +-
 src/ranlib.c                                  |    2 +-
 src/stack.c                                   |    2 +-
 src/strings.c                                 |    2 +-
 src/strip.c                                   |    2 +-
 tests/Makefile.am                             |    2 +-
 .../{hello2.spec. => hello2.spec}             |    0
 .../{hello3.spec. => hello3.spec}             |    0
 110 files changed, 8241 insertions(+), 186 deletions(-)
 create mode 100644 .vscode/settings.json
 create mode 100644 CMakeLists.txt
 create mode 100644 backends/CMakeLists.txt
 create mode 100644 config-cmake/config.h
 create mode 100644 config-cmake/win32-gnu/search.h
 create mode 100644 config-cmake/win32-msvc/dirent.c
 create mode 100644 config-cmake/win32-msvc/dirent.h
 create mode 100644 config-cmake/win32-msvc/search.h
 create mode 100644 config-cmake/win32-msvc/sys/time.h
 copy libdw/dwarf_whatattr.c => config-cmake/win32/ar.h (73%)
 create mode 100644 config-cmake/win32/argp-ba.c
 create mode 100644 config-cmake/win32/argp-eexist.c
 create mode 100644 config-cmake/win32/argp-fmtstream.c
 create mode 100644 config-cmake/win32/argp-fmtstream.h
 create mode 100644 config-cmake/win32/argp-help.c
 create mode 100644 config-cmake/win32/argp-parse.c
 create mode 100644 config-cmake/win32/argp-pv.c
 create mode 100644 config-cmake/win32/argp-pvh.c
 create mode 100644 config-cmake/win32/argp-shims.c
 create mode 100644 config-cmake/win32/argp-shims.h
 create mode 100644 config-cmake/win32/argp.h
 create mode 100644 config-cmake/win32/internal.h
 create mode 100644 config-cmake/win32/obstack.h
 create mode 100644 lib/CMakeLists.txt
 create mode 100644 lib/system.c
 create mode 100644 libasm/CMakeLists.txt
 create mode 100644 libcpu/CMakeLists.txt
 create mode 100644 libdw/CMakeLists.txt
 create mode 100644 libdwelf/CMakeLists.txt
 create mode 100644 libdwfl/CMakeLists.txt
 create mode 100644 libebl/CMakeLists.txt
 create mode 100644 libelf/CMakeLists.txt
 rename tests/debuginfod-rpms/{hello2.spec. => hello2.spec} (100%)
 rename tests/debuginfod-rpms/{hello3.spec. => hello3.spec} (100%)

-- 
2.36.1.windows.1


^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2022-12-22  3:50 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 18:25 [PATCH 00/25] Patches for building with mingw/gcc msvc/clang-cl Yonggang Luo
2022-10-20 18:25 ` [PATCH 01/25] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec' Yonggang Luo
2022-10-27 13:02   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 02/25] ignore build directory Yonggang Luo
2022-10-27 13:03   ` Mark Wielaard
2022-12-16 21:14     ` 罗勇刚(Yonggang Luo)
2022-12-20 12:35       ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 03/25] libebl: There is no need #include <dlfcn.h> in eblclosebackend.c and eblopenbackend.c Yonggang Luo
2022-10-27 13:09   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 04/25] libelf/libdwfl: Remove "#define LIB_SYSTEM_H 1" in libelf_crc32.c and libdwfl_crc32.c Yonggang Luo
2022-10-27 13:20   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 05/25] use #include <system.h> instead platform depended header <endian.h> in libdw/memory-access.h Yonggang Luo
2022-10-27 13:26   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 06/25] move platform depended include into system.h of libebl Yonggang Luo
2022-10-28 11:35   ` Mark Wielaard
2022-12-16 21:19     ` 罗勇刚(Yonggang Luo)
2022-12-20 13:59       ` Mark Wielaard
2022-12-20 17:44         ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 07/25] move platform depended include into system.h of libasm, libcpu, libdw, libdwfl and libdwelf Yonggang Luo
2022-10-28 12:07   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 08/25] Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h Yonggang Luo
2022-10-28 11:41   ` Mark Wielaard
2022-12-16 21:21     ` 罗勇刚(Yonggang Luo)
2022-12-20 14:04       ` Mark Wielaard
2022-12-20 16:30         ` 罗勇刚(Yonggang Luo)
2022-12-21 16:54           ` Mark Wielaard
2022-12-22  3:50             ` 罗勇刚(Yonggang Luo)
2022-10-20 18:25 ` [PATCH 09/25] include libgen.h in system.h Yonggang Luo
2022-10-28 11:45   ` Mark Wielaard
2022-12-16 21:22     ` 罗勇刚(Yonggang Luo)
2022-12-16 21:34       ` 罗勇刚(Yonggang Luo)
2022-12-20 15:05       ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 10/25] libcpu: Remove the need of NMNES by using enum Yonggang Luo
2022-12-12 12:37   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 11/25] libcpu: Use __asm instead asm that can be recognized by both clang-cl and gcc Yonggang Luo
2022-12-12 12:42   ` Mark Wielaard
2022-12-16 21:36     ` 罗勇刚(Yonggang Luo)
2022-10-20 18:25 ` [PATCH 12/25] libcpu: Use "#define FCT_mod$64r_m FCT_mod$r_m" is enough and can be recognized by clang-cl on windows in i386_data.h Yonggang Luo
2022-12-12 12:58   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 13/25] libdw: typeof -> __typeof that can be recognized by both clang-cl and gcc Yonggang Luo
2022-12-12 13:12   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 14/25] libdw: check __OPTIMIZE__ in dwarf_whatattr.c and dwarf_whatform.c to match the header Yonggang Luo
2022-12-12 13:31   ` Mark Wielaard
2022-12-16 21:47     ` 罗勇刚(Yonggang Luo)
2022-12-20 15:08       ` Mark Wielaard
2022-12-20 16:31         ` 罗勇刚(Yonggang Luo)
2022-10-20 18:25 ` [PATCH 15/25] lib: Implement error properly even when not HAVE_ERR_H Yonggang Luo
2022-12-12 15:37   ` Mark Wielaard
2022-12-16 21:50     ` 罗勇刚(Yonggang Luo)
2022-12-20 15:10       ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 16/25] libeu: Move the implementation of pwrite_retry, write_retry and pread_retry from header to source Yonggang Luo
2022-12-12 15:45   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 17/25] libelf: uid_t, gid_t and mode_t are not comes with msvcrt, so using long/unsigned long instead on win32 Yonggang Luo
2022-10-20 18:25 ` [PATCH 18/25] lib: Use NOT_HAVE_LIBINTL to guard #include <libintl.h> Yonggang Luo
2022-10-20 18:25 ` [PATCH 19/25] libelf: F_GETFD may not predefined with msvc/mingw, guard the usage of it Yonggang Luo
2022-12-12 15:54   ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 20/25] Add function sys_get_page_size to replace platform dependent sysconf (_SC_PAGESIZE) Yonggang Luo
2022-10-20 18:26 ` [PATCH 21/25] libasm: stdio_ext.h are not present on win32 Yonggang Luo
2022-10-20 18:26 ` [PATCH 22/25] libebl/libdwelf: define ssize_t and pid_t for MSVC within installed header libdwelf.h and libebl.h Yonggang Luo
2022-10-20 18:26 ` [PATCH 23/25] libasm/debuginfod: fchmod doesn't present on win32 Yonggang Luo
2022-10-20 18:26 ` [PATCH 24/25] lib: isatty is not available on windows Yonggang Luo

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).