-
Notifications
You must be signed in to change notification settings - Fork 5
Build ELF linux/dump_syms everywhere (also for macOS and for Windows with MinGW) #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
1f1ce2b
ea41ecc
6f5fdb5
cb101c6
deae767
1b6a34a
b90b71c
dcfda26
9a1cb9f
5e05321
afe3f3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,8 +52,8 @@ AM_CXXFLAGS += -fPIC | |
| endif | ||
|
|
||
| if WINDOWS_HOST | ||
| # don't have stab.h, don't build stabs support | ||
| AM_CPPFLAGS += -DNO_STABS_SUPPORT | ||
| # Windows doesn't have stab.h | ||
| AM_CPPFLAGS += -I$(top_srcdir)/src/third_party/stab/include | ||
| endif | ||
|
|
||
| if MINGW_HOST | ||
|
|
@@ -62,6 +62,10 @@ AM_CPPFLAGS += -D_POSIX_C_SOURCE | |
| AM_CPPFLAGS += -D__USE_MINGW_ANSI_STDIO | ||
| endif | ||
|
|
||
| if MACOS_HOST | ||
| AM_CPPFLAGS += -Wno-deprecated-declarations | ||
| endif | ||
|
|
||
| # Specify include paths for ac macros | ||
| ACLOCAL_AMFLAGS = -I m4 | ||
|
|
||
|
|
@@ -391,11 +395,16 @@ bin_PROGRAMS += \ | |
| src/tools/windows/dump_syms_dwarf/dump_syms_dwarf | ||
| endif | ||
|
|
||
| if !DISABLE_TOOLS | ||
| bin_PROGRAMS += \ | ||
| src/tools/linux/dump_syms/dump_syms | ||
| endif | ||
|
|
||
| if MINGW_HOST | ||
| # For MinGW, use gyp to generate a Makefile to build Windows client library | ||
| Configuration ?= Debug | ||
| all-local: | ||
| cd $(top_srcdir)/src ; ./tools/gyp/gyp --no-circular-check --no-parallel --depth=. -f make client/windows/breakpad_client.gyp | ||
| cd $(top_srcdir)/src ; GYP_DEFINES='OS=win' ./tools/gyp/gyp --no-circular-check --no-parallel --depth=. -f make client/windows/breakpad_client.gyp | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where does GYP_DEFINES come from?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, damn, those are fetched with
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @slipher we may have a big problem, we may be you and me the only people on Earth being able to build the dwarf mingw
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah no it's for the non-dwarf Windows
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This NUKES GYP: |
||
| cd $(top_srcdir)/src ; $(MAKE) CXX="$(CXX)" CXXFLAGS="-DUNICODE -D_UNICODE $(AM_CPPFLAGS) $(CXXFLAGS)" AR="$(AR)" RC="$(WINDRES)" BUILDTYPE="$(Configuration)" | ||
| endif | ||
|
|
||
|
|
@@ -627,36 +636,6 @@ src_tools_linux_pid2md_pid2md_SOURCES = \ | |
| src_tools_linux_pid2md_pid2md_LDADD = \ | ||
| src/client/linux/libbreakpad_client.a | ||
|
|
||
| src_tools_linux_dump_syms_dump_syms_SOURCES = \ | ||
| src/common/dwarf_cfi_to_module.cc \ | ||
| src/common/dwarf_cu_to_module.cc \ | ||
| src/common/dwarf_line_to_module.cc \ | ||
| src/common/dwarf_range_list_handler.cc \ | ||
| src/common/language.cc \ | ||
| src/common/module.cc \ | ||
| src/common/path_helper.cc \ | ||
| src/common/stabs_reader.cc \ | ||
| src/common/stabs_to_module.cc \ | ||
| src/common/dwarf/bytereader.cc \ | ||
| src/common/dwarf/dwarf2diehandler.cc \ | ||
| src/common/dwarf/dwarf2reader.cc \ | ||
| src/common/dwarf/elf_reader.cc \ | ||
| src/common/linux/crc32.cc \ | ||
| src/common/linux/dump_symbols.cc \ | ||
| src/common/linux/dump_symbols.h \ | ||
| src/common/linux/elf_symbols_to_module.cc \ | ||
| src/common/linux/elf_symbols_to_module.h \ | ||
| src/common/linux/elfutils.cc \ | ||
| src/common/linux/file_id.cc \ | ||
| src/common/linux/linux_libc_support.cc \ | ||
| src/common/linux/memory_mapped_file.cc \ | ||
| src/common/linux/safe_readlink.cc \ | ||
| src/tools/linux/dump_syms/dump_syms.cc | ||
| src_tools_linux_dump_syms_dump_syms_CXXFLAGS = \ | ||
| $(RUST_DEMANGLE_CFLAGS) | ||
| src_tools_linux_dump_syms_dump_syms_LDADD = \ | ||
| $(RUST_DEMANGLE_LIBS) | ||
|
|
||
| src_tools_linux_md2core_minidump_2_core_SOURCES = \ | ||
| src/common/linux/memory_mapped_file.cc \ | ||
| src/common/path_helper.cc \ | ||
|
|
@@ -855,6 +834,37 @@ src_tools_windows_dump_syms_dwarf_dump_syms_dwarf_SOURCES = \ | |
| src/tools/windows/dump_syms_dwarf/dump_syms.cc | ||
| src_tools_windows_dump_syms_dwarf_dump_syms_dwarf_LDADD = \ | ||
| $(SOCKET_LIBS) | ||
|
|
||
| src_tools_linux_dump_syms_dump_syms_SOURCES = \ | ||
| src/common/dwarf_cfi_to_module.cc \ | ||
| src/common/dwarf_cu_to_module.cc \ | ||
| src/common/dwarf_line_to_module.cc \ | ||
| src/common/dwarf_range_list_handler.cc \ | ||
| src/common/language.cc \ | ||
| src/common/module.cc \ | ||
| src/common/path_helper.cc \ | ||
| src/common/stabs_reader.cc \ | ||
| src/common/stabs_to_module.cc \ | ||
| src/common/dwarf/bytereader.cc \ | ||
| src/common/dwarf/dwarf2diehandler.cc \ | ||
| src/common/dwarf/dwarf2reader.cc \ | ||
| src/common/dwarf/elf_reader.cc \ | ||
| src/common/linux/crc32.cc \ | ||
| src/common/linux/dump_symbols.cc \ | ||
| src/common/linux/dump_symbols.h \ | ||
| src/common/linux/elf_symbols_to_module.cc \ | ||
| src/common/linux/elf_symbols_to_module.h \ | ||
| src/common/linux/elfutils.cc \ | ||
| src/common/linux/file_id.cc \ | ||
| src/common/linux/linux_libc_support.cc \ | ||
| src/common/linux/memory_mapped_file.cc \ | ||
| src/common/linux/safe_readlink.cc \ | ||
| src/tools/linux/dump_syms/dump_syms.cc | ||
| src_tools_linux_dump_syms_dump_syms_CXXFLAGS = \ | ||
| $(RUST_DEMANGLE_CFLAGS) | ||
| src_tools_linux_dump_syms_dump_syms_LDADD = \ | ||
| $(RUST_DEMANGLE_LIBS) \ | ||
| $(SOCKET_LIBS) | ||
| endif | ||
|
|
||
| if !DISABLE_PROCESSOR | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #ifndef SRC_COMPAT_ELF_H_ | ||
| #define SRC_COMPAT_ELF_H_ | ||
|
|
||
| #if !defined(_WIN32) && !defined(__APPLE__) | ||
| #include <elf.h> | ||
| #else | ||
| #include "third_party/musl/include/elf.h" | ||
| #endif | ||
|
|
||
| #endif // SRC_COMPAT_ELF_H_ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #ifndef SRC_COMPAT_GUIDDEF_H_ | ||
| #define SRC_COMPAT_GUIDDEF_H_ | ||
|
|
||
| #if defined(_WIN32) | ||
| #include <guiddef.h> | ||
| #else | ||
| typedef MDGUID GUID; | ||
| #endif | ||
|
|
||
| #if defined(_WIN32) | ||
| #define COMPAT_GUID_DATA1 Data1 | ||
| #define COMPAT_GUID_DATA2 Data2 | ||
| #define COMPAT_GUID_DATA3 Data3 | ||
| #define COMPAT_GUID_DATA4 Data4 | ||
| #else | ||
| #define COMPAT_GUID_DATA1 data1 | ||
| #define COMPAT_GUID_DATA2 data2 | ||
| #define COMPAT_GUID_DATA3 data3 | ||
| #define COMPAT_GUID_DATA4 data4 | ||
| #endif | ||
|
|
||
| #endif // SRC_COMPAT_GUIDDEF_H_ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #ifndef SRC_COMPAT_INET_H_ | ||
| #define SRC_COMPAT_INET_H_ | ||
|
|
||
| #if defined(_WIN32) | ||
| #include <winsock2.h> | ||
| #else | ||
| #include <arpa/inet.h> | ||
| #endif | ||
|
|
||
| #endif // SRC_COMPAT_INET_H_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warnings should just be non-fatal rather than disabled completely. See #22 (this warning is already there on master).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can replace that with
-Wno-error=deprecated-declarationsinstead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-Werrorshould be off by default but for people who choose to turn it on, the deprecated declarations warning should be an error.