All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/efl: add libunwind optional dependency
@ 2017-04-16 19:49 Romain Naour
  2017-04-16 19:49 ` [Buildroot] [PATCH 2/2] package/libunwind: disable for x86 with uClibc toolchain Romain Naour
  2017-04-17 13:09 ` [Buildroot] [PATCH 1/2] package/efl: add libunwind optional dependency Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Romain Naour @ 2017-04-16 19:49 UTC (permalink / raw)
  To: buildroot

There is no configure option to enable/disable libunwind support.
See efl/m4/efl_libunwind.m4

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/efl/efl.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/efl/efl.mk b/package/efl/efl.mk
index 4008d30..04e15f5 100644
--- a/package/efl/efl.mk
+++ b/package/efl/efl.mk
@@ -293,6 +293,10 @@ endef
 EFL_POST_INSTALL_TARGET_HOOKS = EFL_HOOK_REMOVE_UPOWER
 endif
 
+ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
+EFL_DEPENDENCIES += libunwind
+endif
+
 $(eval $(autotools-package))
 
 ################################################################################
-- 
2.9.3

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

* [Buildroot] [PATCH 2/2] package/libunwind: disable for x86 with uClibc toolchain
  2017-04-16 19:49 [Buildroot] [PATCH 1/2] package/efl: add libunwind optional dependency Romain Naour
@ 2017-04-16 19:49 ` Romain Naour
  2017-04-17  9:25   ` Yann E. MORIN
  2017-04-17 13:09 ` [Buildroot] [PATCH 1/2] package/efl: add libunwind optional dependency Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Romain Naour @ 2017-04-16 19:49 UTC (permalink / raw)
  To: buildroot

libunwind use sigreturn() while building for x86 [1] but this function
is not available with uClibc-ng.

This throw a warning during libunwind build:
In file included from x86/Los-linux.c:4:0:
x86/Gos-linux.c: In function ?_ULx86_local_resume?:
x86/Gos-linux.c:298:7: warning: implicit declaration of function ?sigreturn? [-Wimplicit-function-declaration]
       sigreturn (sc);
       ^

But any program trying to link against libunwind-generic.so fail to build:
[...]usr/lib/libunwind-generic.so: undefined reference to `sigreturn'
collect2: error: ld returned 1 exit status

Disable libunwind for x86 target when uClibc-ng is used.

Fixes:
http://autobuild.buildroot.net/results/54a/54afac8148cff5f3c17e83f80917fd9006948fe0//build-end.log

[1] http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob;f=src/x86/Gos-linux.c;h=17aebc2974af50eb0bf8292689b2ed22a4c97866;hb=HEAD#l299

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/libunwind/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libunwind/Config.in b/package/libunwind/Config.in
index 5527a2b..9007ce5 100644
--- a/package/libunwind/Config.in
+++ b/package/libunwind/Config.in
@@ -15,7 +15,7 @@ config BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
 		 BR2_mips64el || BR2_powerpc || BR2_sh || BR2_i386 || BR2_x86_64)
 	default y if BR2_TOOLCHAIN_USES_UCLIBC && \
 		(((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM) || \
-		 BR2_i386 || BR2_mips || BR2_mipsel || \
+		 BR2_mips || BR2_mipsel || \
 		 BR2_mips64 || BR2_mips64el || BR2_x86_64)
 	default y if BR2_TOOLCHAIN_USES_MUSL && \
 		(((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM) || \
-- 
2.9.3

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

* [Buildroot] [PATCH 2/2] package/libunwind: disable for x86 with uClibc toolchain
  2017-04-16 19:49 ` [Buildroot] [PATCH 2/2] package/libunwind: disable for x86 with uClibc toolchain Romain Naour
@ 2017-04-17  9:25   ` Yann E. MORIN
  0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2017-04-17  9:25 UTC (permalink / raw)
  To: buildroot

On 2017-04-16 21:49 +0200, Romain Naour spake thusly:
> libunwind use sigreturn() while building for x86 [1] but this function
> is not available with uClibc-ng.
> 
> This throw a warning during libunwind build:
> In file included from x86/Los-linux.c:4:0:
> x86/Gos-linux.c: In function ?_ULx86_local_resume?:
> x86/Gos-linux.c:298:7: warning: implicit declaration of function ?sigreturn? [-Wimplicit-function-declaration]
>        sigreturn (sc);
>        ^
> 
> But any program trying to link against libunwind-generic.so fail to build:

It's not only about libunwind-generic.so, see below...

> [...]usr/lib/libunwind-generic.so: undefined reference to `sigreturn'
> collect2: error: ld returned 1 exit status
> 
> Disable libunwind for x86 target when uClibc-ng is used.
> 
> Fixes:
> http://autobuild.buildroot.net/results/54a/54afac8148cff5f3c17e83f80917fd9006948fe0//build-end.log

... as it lso fixes:
http://autobuild.buildroot.org/results/0d1/0d1da7fa32b2f659816c51a05de96f26fef163e4/build-end.log

[...]/output/host/usr/i686-buildroot-linux-uclibc/sysroot/usr/lib/libunwind.so:
undefined reference to `sigreturn'

Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> 
> [1] http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob;f=src/x86/Gos-linux.c;h=17aebc2974af50eb0bf8292689b2ed22a4c97866;hb=HEAD#l299
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
>  package/libunwind/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/libunwind/Config.in b/package/libunwind/Config.in
> index 5527a2b..9007ce5 100644
> --- a/package/libunwind/Config.in
> +++ b/package/libunwind/Config.in
> @@ -15,7 +15,7 @@ config BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
>  		 BR2_mips64el || BR2_powerpc || BR2_sh || BR2_i386 || BR2_x86_64)
>  	default y if BR2_TOOLCHAIN_USES_UCLIBC && \
>  		(((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM) || \
> -		 BR2_i386 || BR2_mips || BR2_mipsel || \
> +		 BR2_mips || BR2_mipsel || \
>  		 BR2_mips64 || BR2_mips64el || BR2_x86_64)
>  	default y if BR2_TOOLCHAIN_USES_MUSL && \
>  		(((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM) || \
> -- 
> 2.9.3
> 
> _______________________________________________
> 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 223 225 172 `------------.-------:  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/2] package/efl: add libunwind optional dependency
  2017-04-16 19:49 [Buildroot] [PATCH 1/2] package/efl: add libunwind optional dependency Romain Naour
  2017-04-16 19:49 ` [Buildroot] [PATCH 2/2] package/libunwind: disable for x86 with uClibc toolchain Romain Naour
@ 2017-04-17 13:09 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-04-17 13:09 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 16 Apr 2017 21:49:05 +0200, Romain Naour wrote:
> There is no configure option to enable/disable libunwind support.
> See efl/m4/efl_libunwind.m4
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
>  package/efl/efl.mk | 4 ++++
>  1 file changed, 4 insertions(+)

Both applied. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-04-17 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-16 19:49 [Buildroot] [PATCH 1/2] package/efl: add libunwind optional dependency Romain Naour
2017-04-16 19:49 ` [Buildroot] [PATCH 2/2] package/libunwind: disable for x86 with uClibc toolchain Romain Naour
2017-04-17  9:25   ` Yann E. MORIN
2017-04-17 13:09 ` [Buildroot] [PATCH 1/2] package/efl: add libunwind optional dependency Thomas Petazzoni

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.