From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by sourceware.org (Postfix) with ESMTPS id A54733858D1E for ; Sat, 15 Oct 2022 16:36:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A54733858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x102e.google.com with SMTP id x1-20020a17090ab00100b001fda21bbc90so10589076pjq.3 for ; Sat, 15 Oct 2022 09:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=WpoQUzjMYDml2vxngaor5wlb4LRpiI/moi6+rwSYndg=; b=YOKUs+5gHzOBZC+8D+CASdEpZXg0YiCdgClg+6p+hdc7cO2qV+jZW9Fr/FuvkZW9Kw iVNMP4BEO9JmO6vEQiHoO3yP0avcKSyvEGH90PRnrdw21ChaE0aQcz2Z37PR1MvrQs1w EOIAPVy5NcvSgZEQLX3oaoe5tjopJwPWOuYAZJ7CE5arOEfkaBg1iZodKOLHmyU7D5Jm Z7/5eyHk61oMSA0fEBeXkHciD7GHm4gM1Xv8i+6fOulSf+jVmKK2HpdKiXzulWirryg7 Ubb6+IWY0NVxs2CDFtcWT9f9WASPCV7jrUy3iR/IuRdRcsI24qx4tdS0BsiivjLoFadQ sEzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WpoQUzjMYDml2vxngaor5wlb4LRpiI/moi6+rwSYndg=; b=rW9P/UpzXdzQZ+jTIVy1RQ8ZfAmX+rQPdNv818jRT8ZOoNUWWFJiQTFjXzSKkgwGYj L6KJTBL/OtpdAGvOALZhUR6nY9B4fsw66Mr968oY97FzM8+OXmIfVPQDGCv+srjb1M0/ zWGTGo7xZ4Rp/sh3qY+fkvAfqP0E/0tfYCv7v5VnugwoKQAgW3JQYKyGJuNopfZWQTQ0 LBoI7QkcJFgTzrrJX6JPf752ee/8cKTlgwwERDxVd42G1booi9ngW6ITA7OxZDE1PsUr v2SMuwLpF9MKwWkFeM7bVo40+VGdwJPX9EI6P1Z/redbgV8zdqhHjjoti23YkZo5U4Vv 41Cg== X-Gm-Message-State: ACrzQf2VYEFsGo1moPbQ2OqjEtkAb1TVkLKEaQtBsRi2Qd19j2hDnMYP KtpFztDRZdJ99ol8LVJhY8I90T89PWWPJA== X-Google-Smtp-Source: AMsMyM6iTKFnYC9VTsXvZZxorTFOBpTWTJoPdCDMzjKuy170UYYH6U5eftTJvtFy+1szUYT/PfA9eg== X-Received: by 2002:a17:90b:4a43:b0:20d:8948:1733 with SMTP id lb3-20020a17090b4a4300b0020d89481733mr22948709pjb.79.1665851798344; Sat, 15 Oct 2022 09:36:38 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id b5-20020a62a105000000b0056299fd2ba2sm3760622pff.162.2022.10.15.09.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 09:36:37 -0700 (PDT) From: Yonggang Luo To: elfutils-devel@sourceware.org Cc: Yonggang Luo Subject: [PATCH v2 0/7] Enable building libelf of elfutils on win32 Date: Sun, 16 Oct 2022 00:36:19 +0800 Message-Id: <20221015163622.129-1-luoyonggang@gmail.com> X-Mailer: git-send-email 2.36.1.windows.1 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 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 into eu-config.h lib: Use NOT_HAVE_LIBINTL to guard #include 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