blob: 4756ef772dc81025eefac82d187c3b7c8df521dd [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001# Released under the MIT license (see COPYING.MIT for the terms)
2
3# Applications using this library needs to add link against libbreakpad_client.a.
4
5SUMMARY = "An open-source multi-platform crash reporting system"
6DESCRIPTION = "Breakpad is a library and tool suite that allows you to distribute an application to users with compiler-provided debugging information removed, record crashes in compact \"minidump\" files, send them back to your server, and produce C and C++ stack traces from these minidumps. "
7HOMEPAGE = "https://code.google.com/p/google-breakpad/"
8LICENSE = "BSD-3-Clause"
Andrew Geissler32b11992021-03-31 13:37:05 -05009LIC_FILES_CHKSUM = "file://LICENSE;md5=8bb274ebd1901085fd71a8d8afe8831b"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010SECTION = "libs"
11
12inherit autotools
13
Andrew Geissler32b11992021-03-31 13:37:05 -050014DEPENDS_append_libc-musl = " libucontext"
15
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016BBCLASSEXTEND = "native"
17
Brad Bishop19323692019-04-05 15:28:33 -040018PE = "2"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019
Brad Bishop19323692019-04-05 15:28:33 -040020PV = "1.0"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022SRCREV_FORMAT = "breakpad_gtest_protobuf_lss_gyp"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023
Andrew Geissler32b11992021-03-31 13:37:05 -050024SRCREV_breakpad = "8b22babdf894e5aa98b2dbbe103f7e3856a71944"
Brad Bishope42b3e32020-01-15 22:08:42 -050025#v1.10.0
Andrew Geissler32b11992021-03-31 13:37:05 -050026SRCREV_gtest = "4fe018038f87675c083d0cfb6a6b57c274fb1753"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027SRCREV_protobuf = "cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac"
Andrew Geissler32b11992021-03-31 13:37:05 -050028SRCREV_lss = "fd00dbbd0c06a309c657d89e9430143b179ff6db"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029SRCREV_gyp = "324dd166b7c0b39d513026fa52d6280ac6d56770"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030
Andrew Geissler32b11992021-03-31 13:37:05 -050031SRC_URI = "git://github.com/google/breakpad;name=breakpad;branch=main \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050032 git://github.com/google/googletest.git;destsuffix=git/src/testing/gtest;name=gtest \
Andrew Geissler32b11992021-03-31 13:37:05 -050033 git://github.com/protocolbuffers/protobuf.git;destsuffix=git/src/third_party/protobuf/protobuf;name=protobuf \
34 git://chromium.googlesource.com/linux-syscall-support;protocol=https;branch=main;destsuffix=git/src/third_party/lss;name=lss \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035 git://chromium.googlesource.com/external/gyp;protocol=https;destsuffix=git/src/tools/gyp;name=gyp \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036 file://0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050037 file://0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch \
38 file://0001-Turn-off-sign-compare-for-musl-libc.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050039 file://0003-Dont-include-stab.h.patch \
40 file://0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050041 file://mcontext.patch \
Andrew Geissler32b11992021-03-31 13:37:05 -050042 file://0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch \
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070043 file://0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050044 file://0001-lss-Match-syscalls-to-match-musl.patch;patchdir=src/third_party/lss \
45 file://mips_asm_sgidefs.patch;patchdir=src/third_party/lss \
Brad Bishope42b3e32020-01-15 22:08:42 -050046 file://0001-Do-not-add-stack-pointer-to-clobber-list.patch;patchdir=src/third_party/lss \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050047"
48S = "${WORKDIR}/git"
49
Brad Bishopd7bf8c12018-02-25 22:55:05 -050050CXXFLAGS += "-D_GNU_SOURCE"
Andrew Geissler32b11992021-03-31 13:37:05 -050051LDFLAGS_append_libc-musl = " -lucontext"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050052
Brad Bishop19323692019-04-05 15:28:33 -040053COMPATIBLE_HOST_powerpc = "null"
Andrew Geissler32b11992021-03-31 13:37:05 -050054COMPATIBLE_HOST_powerpc64 = "null"
55COMPATIBLE_HOST_powerpc64le = "null"
Andrew Geissler82c905d2020-04-13 13:39:40 -050056COMPATIBLE_HOST_riscv64 = "null"
57COMPATIBLE_HOST_riscv32 = "null"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050058
59do_install_append() {
60 install -d ${D}${includedir}
61 install -d ${D}${includedir}/breakpad
62
63 install -d ${D}${includedir}/breakpad/client/linux/crash_generation
64 install -m 0644 ${S}/src/client/linux/crash_generation/crash_generation_client.h ${D}${includedir}/breakpad/client/linux/crash_generation/crash_generation_client.h
65
66 install -d ${D}${includedir}/breakpad/client/linux/handler/
67 install -m 0644 ${S}/src/client/linux/handler/exception_handler.h ${D}${includedir}/breakpad/client/linux/handler/exception_handler.h
68 install -m 0644 ${S}/src/client/linux/handler/minidump_descriptor.h ${D}${includedir}/breakpad/client/linux/handler/minidump_descriptor.h
69
70 install -d ${D}${includedir}/breakpad/client/linux/dump_writer_common
71 install -m 0644 ${S}/src/client/linux/dump_writer_common/mapping_info.h ${D}${includedir}/breakpad/client/linux/dump_writer_common/mapping_info.h
72 install -m 0644 ${S}/src/client/linux/dump_writer_common/thread_info.h ${D}${includedir}/breakpad/client/linux/dump_writer_common/thread_info.h
73 install -m 0644 ${S}/src/client/linux/dump_writer_common/raw_context_cpu.h ${D}${includedir}/breakpad/client/linux/dump_writer_common/raw_context_cpu.h
74
75 install -d ${D}${includedir}/breakpad/client/linux/minidump_writer
76 install -m 0644 ${S}/src/client/linux/minidump_writer/linux_dumper.h ${D}${includedir}/breakpad/client/linux/minidump_writer/linux_dumper.h
77 install -m 0644 ${S}/src/client/linux/minidump_writer/minidump_writer.h ${D}${includedir}/breakpad/client/linux/minidump_writer/minidump_writer.h
78
79 install -d ${D}${includedir}/breakpad/common
Brad Bishop19323692019-04-05 15:28:33 -040080 install -m 0644 ${S}/src/common/memory_allocator.h ${D}${includedir}/breakpad/common/memory_allocator.h
Brad Bishop6e60e8b2018-02-01 10:27:11 -050081 install -m 0644 ${S}/src/common/scoped_ptr.h ${D}${includedir}/breakpad/common/scoped_ptr.h
82 install -m 0644 ${S}/src/common/using_std_string.h ${D}${includedir}/breakpad/common/using_std_string.h
83
84 install -d ${D}${includedir}/breakpad/google_breakpad/common
85 install -m 0644 ${S}/src/google_breakpad/common/breakpad_types.h ${D}${includedir}/breakpad/google_breakpad/common/breakpad_types.h
86 install -m 0644 ${S}/src/google_breakpad/common/minidump_format.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_format.h
87 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_amd64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_amd64.h
88 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_arm.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_arm.h
Brad Bishopd7bf8c12018-02-25 22:55:05 -050089 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_arm64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_arm64.h
Brad Bishop6e60e8b2018-02-01 10:27:11 -050090 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_mips.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_mips.h
91 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_ppc64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_ppc64.h
92 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_ppc.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_ppc.h
93 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_sparc.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_sparc.h
94 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_x86.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_x86.h
95 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_linux.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_linux.h
96 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_mac.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_mac.h
97 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_ps3.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_ps3.h
98 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_solaris.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_solaris.h
99 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_win32.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_win32.h
100
101 install -d ${D}${includedir}/breakpad/third_party/lss
102 install -m 0644 ${S}/src/third_party/lss/linux_syscall_support.h ${D}${includedir}/breakpad/third_party/lss/linux_syscall_support.h
103}
104
105PACKAGES =+ "${PN}-minidump-upload ${PN}-sym-upload"
106
107FILES_${PN}-minidump-upload = "${bindir}/minidump_upload"
108FILES_${PN}-sym-upload = "${bindir}/sym_upload"
109
110
111SYSROOT_PREPROCESS_FUNCS += "breakpad_populate_sysroot"
112breakpad_populate_sysroot() {
113 sysroot_stage_dir ${D}/usr/include ${SYSROOT_DESTDIR}/usr/include
114 sysroot_stage_dir ${D}/usr/lib ${SYSROOT_DESTDIR}/usr/lib
115 sysroot_stage_dir ${D}/usr/lib ${SYSROOT_DESTDIR}/usr/lib
116}
117
118# Fails to build with thumb-1 (qemuarm)
119#| {standard input}: Assembler messages:
120#| {standard input}:2178: Error: selected processor does not support Thumb mode `it ne'
121#| {standard input}:2179: Error: Thumb does not support conditional execution
122#| {standard input}:2180: Error: selected processor does not support Thumb mode `it eq'
123#| {standard input}:2181: Error: Thumb does not support conditional execution
124#| {standard input}:2183: Error: lo register required -- `str ip,[r1,#-4]!'
125#| {standard input}:2184: Error: Thumb does not support this addressing mode -- `str r6,[r1,#-4]!'
126#| {standard input}:2191: Error: lo register required -- `ldr pc,[sp]'
127#| make: *** [src/client/linux/handler/exception_handler.o] Error 1
Brad Bishop19323692019-04-05 15:28:33 -0400128ARM_INSTRUCTION_SET_armv5 = "arm"
129ARM_INSTRUCTION_SET_armv4 = "arm"
Brad Bishope42b3e32020-01-15 22:08:42 -0500130
131TOOLCHAIN = "gcc"