All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/uclibc: add backtrace support option
@ 2021-01-09 16:19 Andrea Ricchi
  2021-01-09 18:03 ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Ricchi @ 2021-01-09 16:19 UTC (permalink / raw)
  To: buildroot

Add toolchain configuration to support execinfo.h and backtrace
features.

Signed-off-by: Andrea Ricchi <andrea.ricchi@amarulasolutions.com>
---
 package/uclibc/Config.in |  7 +++++++
 package/uclibc/uclibc.mk | 11 +++++++++++
 2 files changed, 18 insertions(+)

diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index e59fef3c69..fa3abc2f50 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -39,6 +39,13 @@ config BR2_TOOLCHAIN_BUILDROOT_LOCALE
 	  Enable this option if you want your toolchain to support
 	  localization and internationalization.
 
+config BR2_TOOLCHAIN_BUILDROOT_BACKTRACE
+	bool "Enable backtrace support"
+	select BR2_USE_BACKTRACE
+	help
+	  Enable this option if you want your toolchain to support
+	  execinfo.h and backtrace features.
+
 choice
 	prompt "Thread library implementation"
 	help
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 53983e852d..b6f6c0f824 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -359,6 +359,16 @@ else
 UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_ENABLE_OPT,HAVE_SHARED)
 endif
 
+#
+# backtrace support
+#
+
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_BACKTRACE),y)
+UCLIBC_BACKTRACE_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_BACKTRACE)
+else
+UCLIBC_BACKTRACE_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_BACKTRACE)
+endif
+
 #
 # Commands
 #
@@ -401,6 +411,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
 	$(UCLIBC_LOCALE_CONFIG)
 	$(UCLIBC_WCHAR_CONFIG)
 	$(UCLIBC_SHARED_LIBS_CONFIG)
+	$(UCLIBC_BACKTRACE_CONFIG)
 endef
 
 define UCLIBC_BUILD_CMDS
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/uclibc: add backtrace support option
  2021-01-09 16:19 [Buildroot] [PATCH 1/1] package/uclibc: add backtrace support option Andrea Ricchi
@ 2021-01-09 18:03 ` Yann E. MORIN
  2021-01-09 18:11   ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2021-01-09 18:03 UTC (permalink / raw)
  To: buildroot

Andrea, All,

On 2021-01-09 17:19 +0100, Andrea Ricchi spake thusly:
> Add toolchain configuration to support execinfo.h and backtrace
> features.

Thanks for your contribution; see comments below...

> Signed-off-by: Andrea Ricchi <andrea.ricchi@amarulasolutions.com>
> ---
>  package/uclibc/Config.in |  7 +++++++
>  package/uclibc/uclibc.mk | 11 +++++++++++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
> index e59fef3c69..fa3abc2f50 100644
> --- a/package/uclibc/Config.in
> +++ b/package/uclibc/Config.in
> @@ -39,6 +39,13 @@ config BR2_TOOLCHAIN_BUILDROOT_LOCALE
>  	  Enable this option if you want your toolchain to support
>  	  localization and internationalization.
>  
> +config BR2_TOOLCHAIN_BUILDROOT_BACKTRACE
> +	bool "Enable backtrace support"
> +	select BR2_USE_BACKTRACE

There is no such symbol in Buildroot.

Also, backtrace in uClibc-ng depends on support for shared libraries:

    https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/extra/Configs/Config.in#n2286

Can you have a further look and resend a fixed-up patch, please?

Also, we do have a standalone package that provides libbacktrace, and
which was not added so long ago. Does that package not provide what you
need?

Regards,
Yann E. MORIN.

> +	help
> +	  Enable this option if you want your toolchain to support
> +	  execinfo.h and backtrace features.
> +
>  choice
>  	prompt "Thread library implementation"
>  	help
> diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
> index 53983e852d..b6f6c0f824 100644
> --- a/package/uclibc/uclibc.mk
> +++ b/package/uclibc/uclibc.mk
> @@ -359,6 +359,16 @@ else
>  UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_ENABLE_OPT,HAVE_SHARED)
>  endif
>  
> +#
> +# backtrace support
> +#
> +
> +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_BACKTRACE),y)
> +UCLIBC_BACKTRACE_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_BACKTRACE)
> +else
> +UCLIBC_BACKTRACE_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_BACKTRACE)
> +endif
> +
>  #
>  # Commands
>  #
> @@ -401,6 +411,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
>  	$(UCLIBC_LOCALE_CONFIG)
>  	$(UCLIBC_WCHAR_CONFIG)
>  	$(UCLIBC_SHARED_LIBS_CONFIG)
> +	$(UCLIBC_BACKTRACE_CONFIG)
>  endef
>  
>  define UCLIBC_BUILD_CMDS
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/uclibc: add backtrace support option
  2021-01-09 18:03 ` Yann E. MORIN
@ 2021-01-09 18:11   ` Yann E. MORIN
  2021-01-11 10:46     ` Andrea Ricchi
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2021-01-09 18:11 UTC (permalink / raw)
  To: buildroot

Andrea, All,

On 2021-01-09 19:03 +0100, Yann E. MORIN spake thusly:
> On 2021-01-09 17:19 +0100, Andrea Ricchi spake thusly:
> > Add toolchain configuration to support execinfo.h and backtrace
> > features.

I also forgot to state that uClibc-ng builds libubacktrace, not
libbactrace, so applications would need to have special handling to
explicitly load libubacktrace anyway...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/uclibc: add backtrace support option
  2021-01-09 18:11   ` Yann E. MORIN
@ 2021-01-11 10:46     ` Andrea Ricchi
  0 siblings, 0 replies; 4+ messages in thread
From: Andrea Ricchi @ 2021-01-11 10:46 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Regarding the libbacktrace, in my application, I need to link the *execinfo.h
*file that is included in the uClibc-ng toolchain when the build
configuration includes UCLIBC_HAS_BACKTRACE. Because of this, I need to
build the entire libubacktrace in the uClibc-ng.

Thanks

---

Andrea Ricchi

Amarula Solutions s.r.o.

Software Developer

Peka?sk? 628/14, 155 00 Praha 5-Jinonice, Czechia

T. +420 212 245 723

M. +39 333 7754973
[`as] https://www.amarulasolutions.com <http://www.amarulasolutions.com>


On Sat, Jan 9, 2021 at 7:11 PM Yann E. MORIN <yann.morin.1998@free.fr>
wrote:

> Andrea, All,
>
> On 2021-01-09 19:03 +0100, Yann E. MORIN spake thusly:
> > On 2021-01-09 17:19 +0100, Andrea Ricchi spake thusly:
> > > Add toolchain configuration to support execinfo.h and backtrace
> > > features.
>
> I also forgot to state that uClibc-ng builds libubacktrace, not
> libbactrace, so applications would need to have special handling to
> explicitly load libubacktrace anyway...
>
> Regards,
> Yann E. MORIN.
>
> --
>
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
> conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___
>      |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is
> no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v
>  conspiracy.  |
>
> '------------------------------^-------^------------------^--------------------'
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210111/61e609e4/attachment-0001.html>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-11 10:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-09 16:19 [Buildroot] [PATCH 1/1] package/uclibc: add backtrace support option Andrea Ricchi
2021-01-09 18:03 ` Yann E. MORIN
2021-01-09 18:11   ` Yann E. MORIN
2021-01-11 10:46     ` Andrea Ricchi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.