* [Buildroot] [PATCH] package/libunwind: disable for x86 with musl
@ 2017-04-17 17:37 Romain Naour
2017-04-17 19:07 ` Yann E. MORIN
2017-05-04 21:23 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Romain Naour @ 2017-04-17 17:37 UTC (permalink / raw)
To: buildroot
libunwind use sigreturn() and setcontext() while building for x86 [1]
but this function is not available with musl [2].
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 or
libunwind.so fail to build:
[...]/usr/lib/libunwind-generic.so: undefined reference to `sigreturn'
[...]/usr/lib/libunwind-generic.so: undefined reference to `setcontext'
collect2: error: ld returned 1 exit status
Disable libunwind for x86 target when musl is used.
Reported upstream by Waldemar [3]
[1] http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob;f=src/x86/Gos-linux.c;h=17aebc2974af50eb0bf8292689b2ed22a4c97866;hb=HEAD#l299
[2] http://openwall.com/lists/musl/2016/02/04/3
[3] http://lists.nongnu.org/archive/html/libunwind-devel/2017-04/msg00030.html
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Waldemar Brodkorb <wbx@openadk.org>
---
Patch rebased after http://patchwork.ozlabs.org/patch/751402/
---
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 2003e96..1a25317 100644
--- a/package/libunwind/Config.in
+++ b/package/libunwind/Config.in
@@ -16,7 +16,7 @@ config BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
(BR2_ARM_CPU_HAS_ARM || BR2_mips || BR2_mipsel || \
BR2_mips64 || BR2_mips64el || BR2_x86_64)
default y if BR2_TOOLCHAIN_USES_MUSL && \
- (BR2_ARM_CPU_HAS_ARM || BR2_i386 || BR2_x86_64)
+ (BR2_ARM_CPU_HAS_ARM || BR2_x86_64)
config BR2_PACKAGE_LIBUNWIND
bool "libunwind"
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [PATCH] package/libunwind: disable for x86 with musl
2017-04-17 17:37 [Buildroot] [PATCH] package/libunwind: disable for x86 with musl Romain Naour
@ 2017-04-17 19:07 ` Yann E. MORIN
2017-05-04 21:23 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2017-04-17 19:07 UTC (permalink / raw)
To: buildroot
Romain, All,
On 2017-04-17 19:37 +0200, Romain Naour spake thusly:
> libunwind use sigreturn() and setcontext() while building for x86 [1]
> but this function is not available with musl [2].
>
> 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 or
> libunwind.so fail to build:
> [...]/usr/lib/libunwind-generic.so: undefined reference to `sigreturn'
> [...]/usr/lib/libunwind-generic.so: undefined reference to `setcontext'
> collect2: error: ld returned 1 exit status
>
> Disable libunwind for x86 target when musl is used.
>
> Reported upstream by Waldemar [3]
>
> [1] http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob;f=src/x86/Gos-linux.c;h=17aebc2974af50eb0bf8292689b2ed22a4c97866;hb=HEAD#l299
> [2] http://openwall.com/lists/musl/2016/02/04/3
> [3] http://lists.nongnu.org/archive/html/libunwind-devel/2017-04/msg00030.html
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Waldemar Brodkorb <wbx@openadk.org>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> Patch rebased after http://patchwork.ozlabs.org/patch/751402/
> ---
> 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 2003e96..1a25317 100644
> --- a/package/libunwind/Config.in
> +++ b/package/libunwind/Config.in
> @@ -16,7 +16,7 @@ config BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
> (BR2_ARM_CPU_HAS_ARM || BR2_mips || BR2_mipsel || \
> BR2_mips64 || BR2_mips64el || BR2_x86_64)
> default y if BR2_TOOLCHAIN_USES_MUSL && \
> - (BR2_ARM_CPU_HAS_ARM || BR2_i386 || BR2_x86_64)
> + (BR2_ARM_CPU_HAS_ARM || BR2_x86_64)
>
> config BR2_PACKAGE_LIBUNWIND
> bool "libunwind"
> --
> 2.9.3
>
--
.-----------------.--------------------.------------------.--------------------.
| 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] 3+ messages in thread
* [Buildroot] [PATCH] package/libunwind: disable for x86 with musl
2017-04-17 17:37 [Buildroot] [PATCH] package/libunwind: disable for x86 with musl Romain Naour
2017-04-17 19:07 ` Yann E. MORIN
@ 2017-05-04 21:23 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2017-05-04 21:23 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 17 Apr 2017 19:37:22 +0200, Romain Naour wrote:
> libunwind use sigreturn() and setcontext() while building for x86 [1]
> but this function is not available with musl [2].
>
> 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 or
> libunwind.so fail to build:
> [...]/usr/lib/libunwind-generic.so: undefined reference to `sigreturn'
> [...]/usr/lib/libunwind-generic.so: undefined reference to `setcontext'
> collect2: error: ld returned 1 exit status
>
> Disable libunwind for x86 target when musl is used.
>
> Reported upstream by Waldemar [3]
>
> [1] http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob;f=src/x86/Gos-linux.c;h=17aebc2974af50eb0bf8292689b2ed22a4c97866;hb=HEAD#l299
> [2] http://openwall.com/lists/musl/2016/02/04/3
> [3] http://lists.nongnu.org/archive/html/libunwind-devel/2017-04/msg00030.html
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Waldemar Brodkorb <wbx@openadk.org>
> ---
> Patch rebased after http://patchwork.ozlabs.org/patch/751402/
> ---
> package/libunwind/Config.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-04 21:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-17 17:37 [Buildroot] [PATCH] package/libunwind: disable for x86 with musl Romain Naour
2017-04-17 19:07 ` Yann E. MORIN
2017-05-04 21:23 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox