blob: 3bf4371e85f45107dd7391bb17f654c8ff629d21 [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 Geissler8f840682023-07-21 09:09:43 -05009LIC_FILES_CHKSUM = "file://LICENSE;md5=07aeb530115539d62cacf9942fa60cac"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010SECTION = "libs"
11
12inherit autotools
13
Andrew Geissler8f840682023-07-21 09:09:43 -050014DEPENDS += "zlib"
Patrick Williams213cb262021-08-07 19:21:33 -050015DEPENDS:append:libc-musl = " libucontext"
Andrew Geissler32b11992021-03-31 13:37:05 -050016
Brad Bishop6e60e8b2018-02-01 10:27:11 -050017BBCLASSEXTEND = "native"
18
Brad Bishop19323692019-04-05 15:28:33 -040019PE = "2"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050020
Patrick Williams73bd93f2024-02-20 08:07:48 -060021SRCREV_FORMAT = "breakpad_gtest_protobuf_lss"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022
Patrick Williams73bd93f2024-02-20 08:07:48 -060023SRCREV_breakpad = "8988364bcddd9b194b0bf931c10bc125987330ed"
24#v1.11.0
Andrew Geissler8f840682023-07-21 09:09:43 -050025SRCREV_gtest = "e2239ee6043f73722e7aa812a459f54a28552929"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050026SRCREV_protobuf = "cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac"
Andrew Geissler8f840682023-07-21 09:09:43 -050027SRCREV_lss = "9719c1e1e676814c456b55f5f070eabad6709d31"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028
Andrew Geissler595f6302022-01-24 19:11:47 +000029SRC_URI = "git://github.com/google/breakpad;name=breakpad;branch=main;protocol=https \
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000030 git://github.com/google/googletest.git;destsuffix=git/src/testing/gtest;name=gtest;branch=main;protocol=https \
Andrew Geissler595f6302022-01-24 19:11:47 +000031 git://github.com/protocolbuffers/protobuf.git;destsuffix=git/src/third_party/protobuf/protobuf;name=protobuf;branch=master;protocol=https \
Andrew Geissler32b11992021-03-31 13:37:05 -050032 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 -050033 file://0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050034 file://0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch \
35 file://0001-Turn-off-sign-compare-for-musl-libc.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036 file://0003-Dont-include-stab.h.patch \
37 file://0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038 file://mcontext.patch \
Andrew Geissler32b11992021-03-31 13:37:05 -050039 file://0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch \
Patrick Williams73bd93f2024-02-20 08:07:48 -060040 file://0001-Fixed-missing-include-for-std-find_if.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050041 file://0001-lss-Match-syscalls-to-match-musl.patch;patchdir=src/third_party/lss \
42 file://mips_asm_sgidefs.patch;patchdir=src/third_party/lss \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050043"
44S = "${WORKDIR}/git"
45
Brad Bishopd7bf8c12018-02-25 22:55:05 -050046CXXFLAGS += "-D_GNU_SOURCE"
Patrick Williams213cb262021-08-07 19:21:33 -050047LDFLAGS:append:libc-musl = " -lucontext"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050048
Patrick Williams213cb262021-08-07 19:21:33 -050049COMPATIBLE_HOST:powerpc = "null"
50COMPATIBLE_HOST:powerpc64 = "null"
51COMPATIBLE_HOST:powerpc64le = "null"
52COMPATIBLE_HOST:riscv64 = "null"
53COMPATIBLE_HOST:riscv32 = "null"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050054
Patrick Williams213cb262021-08-07 19:21:33 -050055do_install:append() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050056 install -d ${D}${includedir}
57 install -d ${D}${includedir}/breakpad
58
59 install -d ${D}${includedir}/breakpad/client/linux/crash_generation
60 install -m 0644 ${S}/src/client/linux/crash_generation/crash_generation_client.h ${D}${includedir}/breakpad/client/linux/crash_generation/crash_generation_client.h
61
62 install -d ${D}${includedir}/breakpad/client/linux/handler/
63 install -m 0644 ${S}/src/client/linux/handler/exception_handler.h ${D}${includedir}/breakpad/client/linux/handler/exception_handler.h
64 install -m 0644 ${S}/src/client/linux/handler/minidump_descriptor.h ${D}${includedir}/breakpad/client/linux/handler/minidump_descriptor.h
65
66 install -d ${D}${includedir}/breakpad/client/linux/dump_writer_common
67 install -m 0644 ${S}/src/client/linux/dump_writer_common/mapping_info.h ${D}${includedir}/breakpad/client/linux/dump_writer_common/mapping_info.h
68 install -m 0644 ${S}/src/client/linux/dump_writer_common/thread_info.h ${D}${includedir}/breakpad/client/linux/dump_writer_common/thread_info.h
69 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
70
71 install -d ${D}${includedir}/breakpad/client/linux/minidump_writer
72 install -m 0644 ${S}/src/client/linux/minidump_writer/linux_dumper.h ${D}${includedir}/breakpad/client/linux/minidump_writer/linux_dumper.h
73 install -m 0644 ${S}/src/client/linux/minidump_writer/minidump_writer.h ${D}${includedir}/breakpad/client/linux/minidump_writer/minidump_writer.h
74
75 install -d ${D}${includedir}/breakpad/common
Brad Bishop19323692019-04-05 15:28:33 -040076 install -m 0644 ${S}/src/common/memory_allocator.h ${D}${includedir}/breakpad/common/memory_allocator.h
Brad Bishop6e60e8b2018-02-01 10:27:11 -050077 install -m 0644 ${S}/src/common/scoped_ptr.h ${D}${includedir}/breakpad/common/scoped_ptr.h
78 install -m 0644 ${S}/src/common/using_std_string.h ${D}${includedir}/breakpad/common/using_std_string.h
79
80 install -d ${D}${includedir}/breakpad/google_breakpad/common
81 install -m 0644 ${S}/src/google_breakpad/common/breakpad_types.h ${D}${includedir}/breakpad/google_breakpad/common/breakpad_types.h
82 install -m 0644 ${S}/src/google_breakpad/common/minidump_format.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_format.h
83 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_amd64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_amd64.h
84 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 -050085 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 -050086 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_mips.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_mips.h
87 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_ppc64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_ppc64.h
88 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_ppc.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_ppc.h
89 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_sparc.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_sparc.h
90 install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_x86.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_x86.h
91 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_linux.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_linux.h
92 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_mac.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_mac.h
93 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_ps3.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_ps3.h
94 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_solaris.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_solaris.h
95 install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_win32.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_win32.h
96
97 install -d ${D}${includedir}/breakpad/third_party/lss
98 install -m 0644 ${S}/src/third_party/lss/linux_syscall_support.h ${D}${includedir}/breakpad/third_party/lss/linux_syscall_support.h
99}
100
101PACKAGES =+ "${PN}-minidump-upload ${PN}-sym-upload"
102
Patrick Williams213cb262021-08-07 19:21:33 -0500103FILES:${PN}-minidump-upload = "${bindir}/minidump_upload"
104FILES:${PN}-sym-upload = "${bindir}/sym_upload"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500105
106
107SYSROOT_PREPROCESS_FUNCS += "breakpad_populate_sysroot"
108breakpad_populate_sysroot() {
109 sysroot_stage_dir ${D}/usr/include ${SYSROOT_DESTDIR}/usr/include
110 sysroot_stage_dir ${D}/usr/lib ${SYSROOT_DESTDIR}/usr/lib
111 sysroot_stage_dir ${D}/usr/lib ${SYSROOT_DESTDIR}/usr/lib
112}
113
114# Fails to build with thumb-1 (qemuarm)
115#| {standard input}: Assembler messages:
116#| {standard input}:2178: Error: selected processor does not support Thumb mode `it ne'
117#| {standard input}:2179: Error: Thumb does not support conditional execution
118#| {standard input}:2180: Error: selected processor does not support Thumb mode `it eq'
119#| {standard input}:2181: Error: Thumb does not support conditional execution
120#| {standard input}:2183: Error: lo register required -- `str ip,[r1,#-4]!'
121#| {standard input}:2184: Error: Thumb does not support this addressing mode -- `str r6,[r1,#-4]!'
122#| {standard input}:2191: Error: lo register required -- `ldr pc,[sp]'
123#| make: *** [src/client/linux/handler/exception_handler.o] Error 1
Patrick Williams213cb262021-08-07 19:21:33 -0500124ARM_INSTRUCTION_SET:armv5 = "arm"
125ARM_INSTRUCTION_SET:armv4 = "arm"
Brad Bishope42b3e32020-01-15 22:08:42 -0500126
127TOOLCHAIN = "gcc"