Message ID | CAEXMXLSha38Ybck+-p9Tnx4cQqPJbXfFQ17qFMDTrpvjh_tEeA@mail.gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [PATC] package/google-breakpad: add option to build target tools | expand |
Hi Nuno, Applied to master with some changes, see below. On 05/05/2022 00:21, Nuno Gonçalves wrote: > This tools are required for debug scenarios where the debug > happens in-target. > > Signed-off-by: Nuno Gonçalves <nunojpg@gmail.com> > --- > package/google-breakpad/Config.in | 12 ++++++++++++ > package/google-breakpad/google-breakpad.mk | 5 ++++- > 2 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/package/google-breakpad/Config.in > b/package/google-breakpad/Config.in > index 07c49996dd..0cb881a4c9 100644 > --- a/package/google-breakpad/Config.in > +++ b/package/google-breakpad/Config.in > @@ -34,6 +34,18 @@ config BR2_PACKAGE_GOOGLE_BREAKPAD > > https://chromium.googlesource.com/breakpad/breakpad > > +if BR2_PACKAGE_GOOGLE_BREAKPAD > +config BR2_PACKAGE_GOOGLE_BREAKPAD_TOOLS > + bool "Build target tools" > + help > + Build processor and tools for target as dump_syms, minidump_stackwalk > + and microdump_stackwalk. The line is too long, use utils/check-package to verify your patch before sending. > + > + This tools are installed to the staging folder only, so not part of > + the target image by default. What's not good. In fact, we probably want to always build the tools, and only install them to target in case the option is selected. so that's what I've done. > + > +endif # BR2_PACKAGE_GOOGLE_BREAKPAD > + > comment "google-breakpad requires a glibc or uClibc toolchain w/ > wchar, thread, C++, gcc >= 4.8" > depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS > depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS > diff --git a/package/google-breakpad/google-breakpad.mk > b/package/google-breakpad/google-breakpad.mk > index cafe1359f3..dc417f4637 100644 > --- a/package/google-breakpad/google-breakpad.mk > +++ b/package/google-breakpad/google-breakpad.mk > @@ -7,7 +7,6 @@ > GOOGLE_BREAKPAD_VERSION = c85eb4a59b618f3beaad5445ceb1f865ffa8efdf > GOOGLE_BREAKPAD_SITE = https://chromium.googlesource.com/breakpad/breakpad > GOOGLE_BREAKPAD_SITE_METHOD = git > -GOOGLE_BREAKPAD_CONF_OPTS = --disable-processor --disable-tools So this can just be removed unconditionally. > # Only a static library is installed > GOOGLE_BREAKPAD_INSTALL_TARGET = NO Instead, this should be done conditionally. Regards, Arnout > GOOGLE_BREAKPAD_INSTALL_STAGING = YES > @@ -38,5 +37,9 @@ define GOOGLE_BREAKPAD_EXTRACT_SYMBOLS > endef > GOOGLE_BREAKPAD_TARGET_FINALIZE_HOOKS += GOOGLE_BREAKPAD_EXTRACT_SYMBOLS > > +ifeq ($(BR2_PACKAGE_GOOGLE_BREAKPAD_TOOLS),) > +GOOGLE_BREAKPAD_CONF_OPTS = --disable-processor --disable-tools > +endif > + > $(eval $(autotools-package)) > $(eval $(host-autotools-package))
diff --git a/package/google-breakpad/Config.in b/package/google-breakpad/Config.in index 07c49996dd..0cb881a4c9 100644 --- a/package/google-breakpad/Config.in +++ b/package/google-breakpad/Config.in @@ -34,6 +34,18 @@ config BR2_PACKAGE_GOOGLE_BREAKPAD https://chromium.googlesource.com/breakpad/breakpad +if BR2_PACKAGE_GOOGLE_BREAKPAD +config BR2_PACKAGE_GOOGLE_BREAKPAD_TOOLS + bool "Build target tools" + help + Build processor and tools for target as dump_syms, minidump_stackwalk + and microdump_stackwalk. + + This tools are installed to the staging folder only, so not part of + the target image by default. + +endif # BR2_PACKAGE_GOOGLE_BREAKPAD + comment "google-breakpad requires a glibc or uClibc toolchain w/ wchar, thread, C++, gcc >= 4.8" depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS diff --git a/package/google-breakpad/google-breakpad.mk b/package/google-breakpad/google-breakpad.mk index cafe1359f3..dc417f4637 100644 --- a/package/google-breakpad/google-breakpad.mk +++ b/package/google-breakpad/google-breakpad.mk @@ -7,7 +7,6 @@ GOOGLE_BREAKPAD_VERSION = c85eb4a59b618f3beaad5445ceb1f865ffa8efdf GOOGLE_BREAKPAD_SITE = https://chromium.googlesource.com/breakpad/breakpad GOOGLE_BREAKPAD_SITE_METHOD = git -GOOGLE_BREAKPAD_CONF_OPTS = --disable-processor --disable-tools # Only a static library is installed GOOGLE_BREAKPAD_INSTALL_TARGET = NO GOOGLE_BREAKPAD_INSTALL_STAGING = YES @@ -38,5 +37,9 @@ define GOOGLE_BREAKPAD_EXTRACT_SYMBOLS endef GOOGLE_BREAKPAD_TARGET_FINALIZE_HOOKS += GOOGLE_BREAKPAD_EXTRACT_SYMBOLS +ifeq ($(BR2_PACKAGE_GOOGLE_BREAKPAD_TOOLS),) +GOOGLE_BREAKPAD_CONF_OPTS = --disable-processor --disable-tools +endif + $(eval $(autotools-package)) $(eval $(host-autotools-package))
This tools are required for debug scenarios where the debug happens in-target. Signed-off-by: Nuno Gonçalves <nunojpg@gmail.com> --- package/google-breakpad/Config.in | 12 ++++++++++++ package/google-breakpad/google-breakpad.mk | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-)