Commit Graph

28 Commits

Author SHA1 Message Date
Christopher Larson 106a782693 libunwind: apply a patch to fix x32
Apply patch to fix the X32 build from https://github.com/sjnewbury/x32

(From OE-Core rev: cdd6130255d8fc78b0a43fad410cde024cb1b9a5)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-09 13:39:13 +00:00
Andreas Müller 0f09354396 libunwind: fix build by linking with bfd instead of gold
works around:
<native-sysroot>/ld: error: Gperf-simple.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1038: recipe for target 'Gperf-simple' failed
make[1]: *** [Gperf-simple] Error 1
make[1]: *** Waiting for unfinished jobs....
<...>
<native-sysroot>/ld: error: Lperf-simple.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1094: recipe for target 'Lperf-simple' failed
make[1]: *** [Lperf-simple] Error 1
<...>
ERROR: oe_runmake failed
<native-sysroot>/ld: error: Gperf-trace.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1042: recipe for target 'Gperf-trace' failed
make[1]: *** [Gperf-trace] Error 1
<native-sysroot>/ld: error: Lperf-trace.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1098: recipe for target 'Lperf-trace' failed
make[1]: *** [Lperf-trace] Error 1
<...>
<native-sysroot>/ld: error: test-coredump-unwind.o: cannot make copy relocation for protected symbol '_UCD_accessors', defined in ../src/.libs/libunwind-coredump.so
collect2: error: ld returned 1 exit status
Makefile:1186: recipe for target 'test-coredump-unwind' failed

(From OE-Core rev: 482733bae05bdc7b149e515fb209c3266f459a53)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Richard Purdie b360310798 libunwind: Fix build race conflict with gcc and musl
Building libunwind, then gcc-runtime causes build failures. This is hard
to fix since gcc-runtime wants the internal gcc unwind.h header but libunwind
wants to provide this. There are differences in include behaviour between gcc
and glibc which are by design.

This patch hacks around the issue by looking for a define used during gcc-runtime's
build and skipping to the internal header in that case. The patch is only enabled
on musl and is the best workaround I could come up with to unblock failing builds
on our autobuilder.

[YOCTO #10129]

(From OE-Core rev: cd8b64b0a236b27e5383e2394de65b9bfd4b6677)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19 10:23:55 +01:00
Khem Raj b6ecbee4b2 libunwind: Do not use gold for linking
This effectively reverts the commit
3dd233ac0c80393824100c54bb525236f8290fd2

gold now emits errors on copy relocs against
protected symbols what ld.bfd did in past, however
it seems its too conservative.

This does not fix the case for folks who
use gold as default linker, however it
does make bintuls 2.27 work with default
configuration of OE

(From OE-Core rev: 0092a076adb11cac411c86389af84bb96169730f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10 10:46:34 +01:00
Khem Raj 54fd9afef7 libunwind: Port to ppc/musl
(From OE-Core rev: da2a5e01156482c4c341c5983425d93ee8f02821)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20 10:28:45 +01:00
Khem Raj 26698cdfc9 libunwind: Add a confgure option for tests
Tests dont compile on musl due to its use
of {get|set}context APIs, adding this option
to disable tests helps it to compile

(From OE-Core rev: 026f14c1353b599546cec24b6b779ff872ff890e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:31 +01:00
Khem Raj cc86da055b libunwind: Upgrade to 1.2rc1+
This helps in compiling with gcc6
drop patches backported to 1.1
remove musl conditional patches, they should work
on glibc too now

(From OE-Core rev: f07c2430903601e9b4462eb09e89a341d5f8f4af)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:31 +01:00
Khem Raj ca8ae667ac libunwind: Upgrade to 1.2rc1+
This helps in compiling with gcc6
drop patches backported to 1.1
remove musl conditional patches, they should work
on glibc too now

(From OE-Core rev: d164b4dbcbba4dd7db4c4257e6cd876026c2e7eb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:30 +01:00
Ruslan Bilovol 9c812e7d3c libunwind: backport aarch64_be support
Backport 2 patches from v1.2-rc1 tag of libunwind git repo.
These patches add aarch64_be support to this package.

(From OE-Core rev: 396353c3127b20244c4c5cc321adad7d4e48f544)

Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:58:43 +01:00
Khem Raj 856be1f45a libunwind: Fix build on mips/mips64 for musl targets
(From OE-Core rev: c1847278dbfc3424790f7256be2b35bcdbaaf018)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:50 +01:00
Khem Raj 4fe64d79a0 libunwind: Fix build with fstack-protector on musl
libunwind makery inserts -nostdlib during linking
which fails the build on musl when security flags are enabled
since it remove ssp from linking, so add them explicitly
to SECURITY_LDFLAGS

disable tests for musl targets, tests use obsolete
posix APIs e.g. getcontext

patchout x86_local_resume() on x86, gets a working
linunwind on x86, it seems that it wont work even
in glibc case but lets leave it as it is for glibc
and apply the patch only for musl

(From OE-Core rev: c8ac9d483f6e1cfca82dad8cf3e0745935e96214)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:16 +00:00
Khem Raj 6db39e1f1e libunwind: Fix build on ppc
gcc driver is fixed to pass correct options to linker to do secure plt
linking when enabled. however this option --secure-plt is not supported
by gold linker which is now passed by default from gcc driver. Hence
the build fails when using gold. Therefore when we use gold then we do
not use secure plt

(From OE-Core rev: 1fcb1b91fae0646baf243d686fc6a52b97a53005)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-16 09:04:22 +00:00
Khem Raj 245885063e libunwind: backtrace APIs are glibc specific
Make backtrace() API's use conditional on glibc
this helps make libunwind compile on musl

(From OE-Core rev: acffe22de65fad2f69c702e4fe94b366883a265b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:28 +00:00
Martin Jansa dee2a8c82b guile, mailx, gcc, opensp, gstreamer1.0-libav, libunwind: disable thumb where it fails for qemuarm
(From OE-Core rev: 981626d8cee345d27b7c9d96e941fd6622f47792)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:06 +00:00
Martin Jansa b06eacdacf libunwind: fix build for qemuarm
(From OE-Core rev: 9c370e54101c2de13cbabefb38eaa6cf584f348c)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-25 08:08:07 +00:00
Paul Eggleton 5f9392acfe libunwind: add SUMMARY
(From OE-Core rev: 55420b6267690bb3f2515d2b4030a360455b561c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-16 11:39:37 +00:00
Li Zhou 7f93052dc5 libunwind: Security Advisory - libunwind - CVE-2015-3239
libunwind: Invalid dwarf opcodes can cause references beyond the end of
the array

Off-by-one error in the dwarf_to_unw_regnum function in include/dwarf_i.h
 in libunwind 1.1 allows local users to have unspecified impact via
invalid dwarf opcodes.

(From OE-Core rev: 9c4e7f5c009b076b0bc638a02fcf3d96c362e7eb)

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-04 16:23:49 +01:00
Christopher Larson a91e6f6c75 libatomic-ops: move to recipes-support, fix recipe name
- This recipe is useful for more than just pulseaudio, so move it to
  recipes-support.
- Rename to the correct upstream name, which corresponds to the library name.
  Keep a PROVIDES of libatomics-ops for compatibility.

(From OE-Core rev: 5014de67fa6da1672626e3ec92fc51430fca3262)

(From OE-Core rev: 5a14d4f981c2c12c274fade518d23706dca5889b)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30 12:35:59 +01:00
Christopher Larson 3ffad2d4cb libunwind: always depend on libatomics-ops
- Depend on libatomics-ops unconditionally for all archs, as it's used by more
  than just arm, and currently the configure script auto-detects and enables
  its use based on the existence of its header, resulting in non-deterministic
  builds.
- Drop the ldflags bits which link against libatomic_ops, because libunwind
  doesn't actually link against it, nor does it need to, as it currently uses
  all inline functions from the header file.

(From OE-Core rev: 83bb89502e2f05b8b78b14532ad96abc400ab264)

(From OE-Core rev: e43a47eb695050d04809ff54af14066acba6ec27)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30 12:35:59 +01:00
Robert Yang 4817e01a7b libunwind: don't use gold for mips
The gold doesn't work for mips or mips64:
configure:3867: checking whether the C compiler works
configure:3889: mips-poky-linux-gcc  -meb -mabi=32 -mhard-float -march=mips32r2 --sysroot=/buildarea/lyang1/test_uni/tmp/sysroots/qemumips  -O2 -pipe -g -feliminate-unused-debug-types   -Wl,-O1  -Wl,--as-needed  -fuse-ld=gold conftest.c  >&5
collect2: fatal error: cannot find 'ld'

(From OE-Core rev: 3c6746748a845b5156f81fe7a01caa58ee29e938)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-28 07:56:55 +01:00
Robert Yang 8fb1cd85d0 libunwind: use gold for all archs
At least the following boards have build errors without using gold:
qemux86, qemux86-64, qemuarm, qemuaarch64, qemuppc.

The error is:
ld: copy reloc against protected `_Uaarch64_local_addr_space' is invalid
ld: failed to set dynamic section sizes: Bad value
ld: copy reloc against protected `_Uaarch64_local_addr_space' is invalid
ld: failed to set dynamic section sizes: Bad value
| collect2: error: ld returned 1 exit status

So use gold for all archs to fix the problem.

(From OE-Core rev: 3dd233ac0c80393824100c54bb525236f8290fd2)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-21 07:20:24 +01:00
Robert Yang f40a2d61c8 libunwind: fix build with aarch64
Referred to RP's fix for x86 and x86-64:
34d517a5626ce2465f776367349bd9e66bf8ed1f
libunwind: Build with gold to avoid build failures

Fixed:
aarch64-poky-linux/4.9.2/ld: copy reloc against protected `_Uaarch64_local_addr_space' is invalid
aarch64-poky-linux/4.9.2/ld: failed to set dynamic section sizes: Bad value
aarch64-poky-linux/4.9.2/ld: copy reloc against protected `_Uaarch64_local_addr_space' is invalid
aarch64-poky-linux/4.9.2/ld: failed to set dynamic section sizes: Bad value
| collect2: error: ld returned 1 exit status

(From OE-Core rev: 31d84f67f74b31b479409cfa446b14ac67bb3707)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-19 13:34:42 +01:00
Richard Purdie 6cd8c8d746 libunwind: Build with gold to avoid build failures
The library fails to build with binutils 2.25 and standard ld. This
issue is fixed in gcc 5 with no plans to backport to gcc 4. Easiest
workaround for now is to use gold as the linker for the library
since gold does not have the issue. The bug is x86 only.

(From OE-Core rev: 34d517a5626ce2465f776367349bd9e66bf8ed1f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-08 10:53:22 +01:00
Andreas Oberritter c70dc37b90 libunwind: use xz, because it fails to detect liblzma provided by lzma
(From OE-Core rev: 53bafb0d22a84186d215eb8f106ccff69f1b0480)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-25 12:39:44 +00:00
Jonathan Liu 05a16911ff libunwind: backport patch to link against libgcc_s intead of libgcc
(From OE-Core rev: 9906f949627b64f9fc36bc129bb37c8dd84dc27c)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16 17:41:57 +00:00
Ting Liu f51e79b000 libunwind: Fix test case link failure on PowerPC with Altivec
(From OE-Core rev: 5f6e2a9a474e96332879329deb358219f1328464)

Signed-off-by: Ting Liu <ting.liu@freescale.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 15:36:51 +00:00
Fathi Boudra b6663eb107 libunwind: add aarch64 support
* pass --enable-debug-frame on aarch64 architecture
* include patches:
  - aarch64 port (backported from upstream)
  - Support-building-with-older-compilers (fix undefined reference to
    `unreachable' on older compilers)

(From OE-Core rev: 07cdb1b6583a6cf379de769bdf392c90b49692db)

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:18 +00:00
Chong Lu 9204cacefe libunwind: add recipes
Add libunwind from meta-oe to oe-core, since perf depends on it.

(From OE-Core rev: aefddc23eeda9b46c1bb3ac776c8bff15f89707c)

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 11:33:22 +01:00