Commit graph

23 commits

Author SHA1 Message Date
Fabrice Fontaine d5bcb30cf9 package/libunwind: add cxx exceptions support
If C++ is enabled, enable cxx exceptions, so libunwind will implement
_Unwind_GetIP which is used by mono (which already depends on C++)

Fixes:
 - http://autobuild.buildroot.net/results/dbd64c89815d393a4e28b312d74fd80ee6de92da

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-27 19:27:36 +01:00
Peter Seiderer 708987de41 package/libunwind: replace utf-8 space by ascii character
Replace utf-8 NO-BREAK-SPACE (c2 a0) in comment line by simple
ascii space character.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-07 22:58:48 +02:00
Fabrice Fontaine bcc8ef26b0 package/libunwind: bump to version 1.3.1
- Remove first, third and fourth patches (already in version)
- Add hash for license file

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-04-10 19:26:21 +02:00
Thomas Petazzoni f4083db2ee libunwind: needs dynamic library support
libunwind configure script explicitly links libunwind against
libgcc_s. libgcc_s is only guaranteed to be available for toolchains
that supports dynamic linking: pure static linking toolchains only
have libgcc.a, not libgcc_s.so.

Therefore, let's make libunwind unavailable on toolchains that lack
dynamic linking support. We could potentially support linking with
libgcc, but switching to libgcc_s was done upstream because libgcc was
lacking some symbols on ARM
(https://lists.nongnu.org/archive/html/libunwind-devel/2014-06/msg00024.html). Even
though recent gcc versions seem to provide such symbols in libgcc.a,
having libunwind available on static linking configurations is not a
useful enough use-case to do the necessary research to find when this
issue was fixed in gcc.

Since libunwind is not used as a mandatory dependency in any package,
adding this !BR2_STATIC_LIBS dependency is trivial and nicely avoids
the problematic situation.

This fixes two different autobuilder failures:

 - Gstreamer 1.x programs failing to link, because libunwind links
   against libgcc_s that isn't available (static linking
   configuration):

   http://autobuild.buildroot.net/results/9d4fbf7167e9afce0eef5c9e0cfd42c966ecba36/

 - Gmrender-resurrect, which fails to link, because GStreamer 1.x uses
   some libunwind functionality, but does not take into account the
   libunwind dependency in its .pc files (static linking
   configuration):

   http://autobuild.buildroot.net/results/0a3a2485c187a000482c178f1e9c64dd716a858f/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-08-21 23:30:04 +02:00
Romain Naour 0fe7151117 package/libunwind: fix build failure due to asm()
The gcc documentation [1] suggest to use __asm__ instead of asm.

Fixes:
http://autobuild.buildroot.net/results/3ef/3efe156b6494e4392b6c31de447ee2c72acc1a53

[1] https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate-Keywords

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Tested-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-04 00:59:26 +02:00
Bernd Kuhls dee0cf4181 package/libunwind: bump version to 1.2.1
Backported patch from master branch which implements --disable-tests
configure option, removed original patch 0001, added _CONF_OPTS.

Removed patch 0003, applied upstream:
f1684379df

Added upstream patch to fix musl build.

Tested using this defconfig

BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_LTRACE=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_WESTON=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y
BR2_PACKAGE_LIBJPEG=y
BR2_PACKAGE_LIBUNWIND=y

with test-pkg

                armv5-ctng-linux-gnueabi [ 1/49]: OK
              armv7-ctng-linux-gnueabihf [ 2/49]: OK
                        br-aarch64-glibc [ 3/49]: SKIPPED
                           br-arcle-hs38 [ 4/49]: SKIPPED
                            br-arm-basic [ 5/49]: SKIPPED
                  br-arm-cortex-a9-glibc [ 6/49]: OK
                   br-arm-cortex-a9-musl [ 7/49]: SKIPPED
                   br-arm-cortex-m4-full [ 8/49]: SKIPPED
                             br-arm-full [ 9/49]: OK
                    br-arm-full-nothread [10/49]: SKIPPED
                      br-arm-full-static [11/49]: SKIPPED
                            br-bfin-full [12/49]: SKIPPED
                   br-i386-pentium4-full [13/49]: SKIPPED
                br-i386-pentium-mmx-musl [14/49]: SKIPPED
                       br-m68k-5208-full [15/49]: SKIPPED
                      br-m68k-68040-full [16/49]: SKIPPED
                    br-microblazeel-full [17/49]: SKIPPED
                 br-mips32r6-el-hf-glibc [18/49]: OK
                      br-mips64-n64-full [19/49]: SKIPPED
                 br-mips64r6-el-hf-glibc [20/49]: SKIPPED
                      br-mipsel-o32-full [21/49]: OK
                          br-nios2-glibc [22/49]: SKIPPED
                      br-openrisc-uclibc [23/49]: SKIPPED
               br-powerpc-603e-basic-cpp [24/49]: SKIPPED
             br-powerpc64le-power8-glibc [25/49]: SKIPPED
               br-powerpc64-power7-glibc [26/49]: SKIPPED
                  br-powerpc-e500mc-full [27/49]: SKIPPED
                             br-sh4-full [28/49]: SKIPPED
                        br-sparc64-glibc [29/49]: SKIPPED
                         br-sparc-uclibc [30/49]: SKIPPED
                    br-x86-64-core2-full [31/49]: OK
                          br-x86-64-musl [32/49]: SKIPPED
                          br-xtensa-full [33/49]: SKIPPED
                     i686-ctng-linux-gnu [34/49]: OK
                          linaro-aarch64 [35/49]: SKIPPED
                              linaro-arm [36/49]: OK
             mips64el-ctng_n32-linux-gnu [37/49]: SKIPPED
             mips64el-ctng_n64-linux-gnu [38/49]: SKIPPED
        powerpc-ctng_e500v2-linux-gnuspe [39/49]: OK
                     sourcery-arm-armv4t [40/49]: OK
                            sourcery-arm [41/49]: OK
                     sourcery-arm-thumb2 [42/49]: OK
                         sourcery-mips64 [43/49]: SKIPPED
                           sourcery-mips [44/49]: OK
                          sourcery-nios2 [45/49]: SKIPPED
                             sourcery-sh [46/49]: SKIPPED
                         sourcery-x86-64 [47/49]: OK
                            sourcery-x86 [48/49]: OK
           x86_64-ctng_locales-linux-gnu [49/49]: OK

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-06-18 16:39:58 +02:00
Romain Naour 60aee0cc5a package/libunwind: disable for x86 with musl
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-05-04 23:23:17 +02:00
Yann E. MORIN a84acbb4a7 package/libunwind: simplify architecture dependencies
BR2_ARM_CPU_HAS_ARM already embeddeds the fact that this is an ARM chip,
so (BR2_arm || BR2_armeb) is forcibly true when BR2_ARM_CPU_HAS_ARM is.

In other words, BR2_ARM_CPU_HAS_ARM can't be true unless either BR2_arm
or BR2_armeb itslef is true.

Simplify the logic accordingly.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
Acked-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-05-04 23:21:04 +02:00
Romain Naour c5b56b0a20 package/libunwind: disable for x86 with uClibc toolchain
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>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-17 15:08:22 +02:00
Gustavo Zacarias 4338a319b7 arch: remove support for sh64
It's been deprecated for quite some time now.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-08 22:15:15 +02:00
Thomas Petazzoni 68d399fbdd libunwind: fix architecture dependencies
Due to a misplaced parenthesis, the libunwind dependency were
incorrect. Indeed, they were of the form:

 default y if LIBC_TYPE && (arm dependency) || (list of other architectures)

Which meant that that the LIBC_TYPE dependency was not taken into
account for the "other architectures". This commit changes that to:

 default y if LIBC_TYPE && ((arm dependency) || list of other architectures)

Without this fix, libunwind can be selected for example on
PowerPC/uClibc configurations, while only PowerPC/glibc should be
allowed. This fixes:

  http://autobuild.buildroot.net/results/96c53ff240dcd68fcc9e3d32c4026c9886edcbe7/

Similarly, it also fixes cases where SuperH/uClibc was allowed, while
only SuperH/glibc should be allowed. This fixes:

  http://autobuild.buildroot.net/results/95a6cca21aea9914ba8bb3f571760fc054c53ecd/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-07 22:58:32 +02:00
Gustavo Zacarias 3a10967c7f libunwind: needs ARM instruction support
Fixes:
http://autobuild.buildroot.net/results/4cf/4cf517cd81d3aa5da26848edaba5df0bfbab2c77/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-23 22:58:44 +02:00
Thomas Petazzoni 1da65232ec libunwind: fix C library dependency
The libunwind package currently dependency on glibc *or* uclibc
snapshot. However, we are going to remove the support for uclibc
snapshot, and uClibc-ng has equivalent functionality as uclibc
snapshot. Moreover, musl is also capable of building libunwind for
certain architectures.

Therefore, this commit reworks the architecture dependencies of
libunwind, to make it available on all architectures for which it is
supported, depending on the capabilities of the different C libraries,
and the implementation of libunwind on each architecture.

On some architectures, libunwind uses the C library *context()
functions, which are not provided by musl at all, and not provided by
uClibc on all architectures. But on some other architectures,
libunwind does not use the C library *context() functions, which
explains why it can be built with musl on such architectures.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-02-01 19:32:42 +01:00
Gustavo Zacarias ae491ec2f6 libunwind: add hash file
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-28 22:32:57 +02:00
Peter Korsgaard 5a99682127 libunwind: fix comment dependencies
Comment should be shown when no threads OR not uclibc-snapshot / glibc, not
AND.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-11-17 00:22:47 +01:00
Yann E. MORIN 261d8bfcd7 package/libunwind: link to libgcc_s, not libgcc
Backport a fix from upstream to link against libgcc_s instead of libgcc.

Fixes ltrace build failures:
    http://autobuild.buildroot.net/results/a0c/a0c132f8cdea2c34ceff27606764a60c2853f644/
    http://autobuild.buildroot.net/results/67f/67fbd04d6ae187861fa1bf84d3df1877c7be6fb2/
    http://autobuild.buildroot.net/results/0ca/0ca564101b870e5953acb66ac832ce9e23198392/
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-11-17 00:11:51 +01:00
Baruch Siach 34aa3f2354 libunwind: depend on libatomic_ops when available
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-16 16:11:20 +02:00
Thomas Petazzoni 5035b7819c libunwind: add patch to fix behavior for ARM < v6
Since libatomic_ops does not implement real atomic operations for
ARMv4 and ARMv5, libunwind must define AO_REQUIRE_CAS do indicate it
requires compare-and-swap operations, even if not available as real
atomic operations for the current architecture. In this case,
libatomic_ops will rely on emulated atomic operations, which also
require linking against libatomic_ops, which was until now not done by
libunwind.

This fixes the mysterious ltrace build issue:

  http://autobuild.buildroot.org/results/e1b/e1b330abfa2d80f3f30bc3359428ea429c690eb8/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-14 09:24:53 +02:00
Peter Korsgaard 2848a3009e libunwind: needs set/getcontext, which only got added to uClibc post-0.9.33
Fixes http://autobuild.buildroot.net/results/3e8/3e8670ab1454118baf1e4a5ca632d45963ba3781/

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-04-07 00:35:46 +02:00
Thomas De Schampheleire be084204eb Config.in files: add missing dependencies to toolchain option comments
When a package A depends on config option B and toolchain option C, then
the comment that is given when C is not fulfilled should also depend on B.
For example:

config BR2_PACKAGE_A
	depends on BR2_B
	depends on BR2_LARGEFILE
	depends on BR2_WCHAR

comment "A needs a toolchain w/ largefile, wchar"
	depends on !BR2_LARGEFILE || !BR2_WCHAR

This comment should actually be:

comment "A needs a toolchain w/ largefile, wchar"
	depends on BR2_B
	depends on !BR2_LARGEFILE || !BR2_WCHAR

or if possible (typically when B is a package config option declared in that
same Config.in file):

if BR2_B

comment "A needs a toolchain w/ largefile, wchar"
	depends on !BR2_LARGEFILE || !BR2_WCHAR

[other config options depending on B]

endif

Otherwise, the comment would be visible even though the other dependencies
are not met.

This patch adds such missing dependencies, and changes existing such
dependencies from
  depends on BR2_BASE_DEP && !BR2_TOOLCHAIN_USES_GLIBC
to
  depends on BR2_BASE_DEP
  depends on !BR2_TOOLCHAIN_USES_GLIBC
so that (positive) base dependencies are separate from the (negative)
toolchain dependencies. This strategy makes it easier to write such comments
(because one can simply copy the base dependency from the actual package
config option), but also avoids complex and long boolean expressions.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
 (untested)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-10 23:59:57 +01:00
Thomas De Schampheleire 66bb10b7b0 Config.in files: unify comments of toolchain option dependencies
This patch lines up the comments in Config.in files that clarify which
toolchain options the package depends on.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-10-14 22:45:57 +02:00
Gustavo Zacarias d9b89e8a43 libunwind: needs threads
Fixes:
http://autobuild.buildroot.net/results/39a/39a32d323252e3d986fd9290108db7a496d429d9/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-10 21:52:36 +02:00
ANDY KENNEDY 56a5e5a148 libunwind: new package
[Thomas: added patch to disable build of tests that fail on uClibc,
added dependencies for architectures that are supported.]

Signed-off-by: Andy Kennedy <andy.kennedy@adtran.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-07-28 18:20:00 +02:00