Commit Graph

181 Commits

Author SHA1 Message Date
Armin Kuster 7e2a26a041 binutls: Security fix for CVE-2017-9955
Affects: <= 2.28

[v2]
Fixed signed-off-by for CVE-2017-9955_9

(From OE-Core rev: ccb2651cc736a6efd7e69a5afecd6aa975ee914c)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Armin Kuster f52aa25197 binutils: Security fix for CVE-2017-9954
Affects: <= 2.28
(From OE-Core rev: 85ad166e6487abcd6395569e71fa81e273d47a9d)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Armin Kuster 4aff74cf1e binutls: Secuirty fix for CVE-2017-9756
Affects: <= 2.28

(From OE-Core rev: 59956de9ffd18d65c41697772e2b95da982cc803)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Armin Kuster 3f098a0f6e binutls: Security fix for CVE-2017-9755
Affects: <= 2.28

(From OE-Core rev: 2a1da95cf865de024d278178b28e58a299526121)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Armin Kuster e6b8c7e098 binutls: Security fix for CVE-2017-9753
Affects: <= 2.28

(From OE-Core rev: 02e45129712d7629bfbe3675ed8e735f66ae6301)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Armin Kuster 9d446c1938 binutls: Security fix for CVE-2017-9752
Affects: <= 2.28

(From OE-Core rev: b7bab86b9598ad0fedfcbdafb3d1fc2d522b2b70)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Armin Kuster 64ccf9b291 binutls: Security fix for CVE-2017-9751
Affects: <= 2.28

(From OE-Core rev: 6e6544eb51d8041fd939581dc2a5178db948ec4a)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Armin Kuster 60bd16df85 Binutils: Security fix for CVE-2017-9750
Affects: <= 2.28

(From OE-Core rev: 96e07bc43b817dbc35b8a317e801dee1974939b9)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Armin Kuster bbf6d99f12 binutils: Security fix for CVE-2017-9749
Affects: <= 2.28

(From OE-Core rev: 8b177c76ce892c1ee064498b8fa21e99a993d69e)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:59 +00:00
Armin Kuster fc95cd2ee7 binutls: Security fix for CVE-2017-9748
affects: <= 2.28

(From OE-Core rev: 1a60007cb6705ba25a2a6d07ccf2c2639d131874)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 6b3fee6bd7 binutls: Security fix for CVE-2017-9747
Affects: <= 2.28

(From OE-Core rev: 2a40f61560be1db90aec08493f6c760de5b4d264)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster b519ef3fc3 binutls: Security for fix CVE-2017-9746
Affects: <= 2.28

(From OE-Core rev: 75731517f8df241ae40378bca1b5b8ec5b45dab0)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 10b391060b binutils: Security fix for CVE-2017-9745
Affects: <= 2.28

(From OE-Core rev: da1960fb6d9de9620ac507256554659e1bbe7083)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 266586ff4c binutls: Security fix for CVE-2017-9744
Affects: <= 2.28

(From OE-Core rev: 462cdbd112555a363eddfe3e47cd9b14fccf9395)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 9fba95a0e8 binutils: Security fix for CVE-2017-9742
Affects: <= 2.28

(From OE-Core rev: f8d6efda47b993e5e27631b9b7cd0a8638178e15)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 436e0fc8dc binutils: Security fix for CVE-2017-9040 and CVE-2017-9042
Affects: <= 2.28
(From OE-Core rev: 9e96e8d16590601e716ddb36194fd9642a5d1643)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster e963ce2d79 binutils: Security fix for CVE-2017-9039
Affects: <= 2.28

(From OE-Core rev: 1d467814bfc36755a7a795aa3d1c4d2d2e083171)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 7ac79cbbe1 binutils: Security fix for CVE-2017-9038 and CVE-2017-9044
(From OE-Core rev: 32e5dedd7bf5b249a8f89f88bbe17d5ba71039b7)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster ffdcca938b binutils: Security fix CVE-2017-8421
Affects: <= 2.28

(From OE-Core rev: 7442e97d451047e5f8ed2e23f5898837a7d572a7)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 5d2f47f2a2 binutils: Security fix for CVE-2017-8398
Affects: <= 2.28

(From OE-Core rev: 8bbed39afd0d4197e39db587f41cd301726c2958)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 640706066c binutils: Secuirty fix CVE-2017-8396 and CVE-2017-8397
Affects: <= 2.28

(From OE-Core rev: 006d106c81420ab53a9755f96edb58c227850587)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster a24b585342 binutls: Security fix CVE-2017-8395
Affects: <= 2.28

(From OE-Core rev: b6c2ce1cd3907f5c6f5dcff0afb971d000e7c9bc)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster e109245168 binutls: Secuirty fix CVE-2017-8394
Affects: <= 2.28

(From OE-Core rev: 4684afc0f29beafc0b97a0c7f0479a88c5a69d8e)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 6da272440d binutils: Security fix CVE-2017-8393
Affects: <= 2.28

(From OE-Core rev: e96c9ab000c8693788b7a233bd7061d43cbe24d7)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 34a2b675f4 binutils: Security Fix CVE-2017-7614
Affects: <= 2.28

(From OE-Core rev: 6dd4758d9f7060ccf1a30d7a4adb09beb43bc574)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Armin Kuster 722c61d4f4 binutils: Security fix CVE-2017-7223
Affects <= 2.28

(From OE-Core rev: 04ca81f0539a7549d4c527377c8a05b396247220)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Samuli Piippo faf109ca94 binutils: apply mingw fix only for binutils-cross-canadian
Whenever SDKMACHINE is set to mingw32, sdkmingw32 override is defined
everywhere. This meant that value of LDGOLD was different also for
binutils and binutils-cross depending whether SDKMACHINE was set or not.

(From OE-Core rev: 0398f84482dbe5ee99b20e2ca6b3e9984f7ccec5)

(From OE-Core rev: ef5f97aea26fa22accfd1841a2f1319935d6d95f)

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Yuanjie Huang fa7a1f2115 binutils: fix CVE-2017-7210
CVE: CVE-2017-7210

[BZ 21157] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21157

PR binutils/21157: Fix handling of corrupt STABS enum type strings.

(From OE-Core rev: d12a99cba6c9dc9e1f6bc3a7ca8057f07e9cb950)

(From OE-Core rev: 4ca4e781f1c62696f896d7027081f759798794aa)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 23:30:22 +01:00
Yuanjie Huang e28778ee72 binutils: fix CVE-2017-7209 in readelf
CVE: CVE-2017-7209

[BZ 21135] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21135

PR binutils/21135: Fix invalid read of section contents whilst processing
a corrupt binary.

(From OE-Core rev: 2df642ca0a1e4a4e6616729018cf32d2108cabb2)

(From OE-Core rev: b262000162cb4e18421dd85bf5216c9fa3bdbf15)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 23:30:22 +01:00
Yuanjie Huang 829e2027b6 binutils: fix CVE-2017-6969 in readelf
CVE: CVE-2017-6969
[BZ 21156] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21156

PR binutils/21156: Fix illegal memory accesses in readelf when
ing a corrupt binary.
PR binutils/21156: Fix another memory access error in readelf when
parsing a corrupt binary.

(From OE-Core rev: de04c9811f7ce5179ba261bd8eae921d7873d6cd)

(From OE-Core rev: ae0e01474623969dc193687d59fb5a65ab4d42bc)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 23:30:21 +01:00
Fan Xin 13f7fc4655 binutils: Fix CVE-2017-8392
Backport upsream commit to fix CVE-2017-8392

CVE: CVE-2017-8392

[BZ 21409] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21409

        PR 21409, segfault in _bfd_dwarf2_find_nearest_line

        PR 21409
        * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
        no symbols.

(From OE-Core rev: dff01b827c87ae135a1d5511b1efbdad01c0eaee)

(From OE-Core rev: c5a5017ce710108c61dba0e0af72bb72a9419701)

Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 23:30:21 +01:00
Patrick Ohly 3e903cb42f recipes/*-cross recipes: ignore TARGET_ARCH sstate hash
"yocto-compat-layer.py --machines" showed that shared packages like
gcc-cross-powerpc64 have a sstate signature that depends on
TUNEFLAGS. As a result, there are unnecessary rebuilds and potential
conflicts in a multiconfig.

That's due to the way how TARGET_ARCH is set. Richard Purdie suggested
setting TARGET_ARCH[vardepvalue] as fix, which works. It would be
shorter to do that in cross.bbclass instead of repeating the relevant
line in different recipes, but Richard was concerned about potential
side-effects in other usages of cross.bbclass.

TARGET_GOARM as used in go.inc is still causing signature differences
for go-cross-powerpc64 and machines b4420qds-64b and p5020ds-64b. This
needs further investigation.

(From OE-Core rev: 39bfa0dd3237cbca47e7fca1075d521f9d073f25)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:58 +01:00
Yuanjie Huang ca22ef73d0 binutils: Fix CVE-2017-6965 and CVE-2017-6966
Backport upstream commit to address vulnerabilities:

CVE: CVE-2017-6965
[BZ 21137] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21137

Fix readelf writing to illegal addresses whilst processing corrupt input
files containing symbol-difference relocations.

	PR binutils/21137
	* readelf.c (target_specific_reloc_handling): Add end parameter.
	Check for buffer overflow before writing relocated values.
	(apply_relocations): Pass end to target_specific_reloc_handling.

CVE: CVE-2017-6966
[BZ 21139] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21139

Fix read-after-free error in readelf when processing multiple, relocated
sections in an MSP430 binary.

	PR binutils/21139
	* readelf.c (target_specific_reloc_handling): Add num_syms
	parameter.  Check for symbol table overflow before accessing
	symbol value.  If reloc pointer is NULL, discard all saved state.
	(apply_relocations): Pass num_syms to target_specific_reloc_handling.
	Call target_specific_reloc_handling with a NULL reloc pointer
	after processing all of the relocs.

(From OE-Core rev: 8c52a530ba2beb438aa47956bcec3777a1eafe5f)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
Khem Raj 5a85d39c9d binutils: Detect 64bit mips target for gold
(From OE-Core rev: b007eb12a80d81c2aa498941961df3f2899ece7e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 23:28:19 +01:00
Ross Burton 69d3d55ea7 binutils: disable gold on mingw
oe-core 759eed (binutils: Enable threading when gold is enabled and is not
default linker) causes linking in mingw SDKs to fail:

.../work/i686-nativesdk-mingw32-pokysdk-mingw32/binutils-cross-canadian-x86-64/2.28-r0
/recipe-sysroot-native/usr/bin/i686-pokysdk-mingw32/../../libexec/i686-pokysdk-mingw32/gcc/i686-pokysdk-mingw32/6.3.0/ld:
cannot find -lpthread

Work around this by disabling gold entirely in mingw SDKs.

(From OE-Core rev: b5a595a4be09756b88e91f3353e3b221b165ab44)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-21 22:39:17 +00:00
Khem Raj 56b2f19ca1 binutils: Enable threading when gold is enabled and is not default linker
Currently we enable threaded linking feature of gold linker only
when its used as default ld. There is no need to restrict it when
its not default linker either. As long as gold is enabled, which
is the case here, we should be able to do threaded linking.

(From OE-Core rev: 759eed2b02e0a7b5c8b19d4b087d9151c009eed4)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:05 +00:00
Khem Raj 4485ea5807 binutils: Upgrade to 2.28 release
(From OE-Core rev: e9f839d5fe70a222cc7b8942f401ac86a10e6604)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-07 20:05:31 +00:00
Richard Purdie 9852db9d22 binutils-cross: Remove exec_prefix from the linker search path
We don't put target libs into a native/cross ${exec_prefix} but having
this in the default search path means all linker scripts have to be relocated.
This is a considerable chunk of files to create multiple copies of for no good
reason.

Instead, patch out the paths we don't need.

(From OE-Core rev: 20816eb5398512652c971a37589a2ca28ffd3d68)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 23:47:33 +00:00
Manjukumar Matha 764a780136 binutils-2.27.inc: Fix alignment frags for aarch64
There was bug with alignment frags for aarch64 in binutils. This is fixed in
master of binutils. This patch backports the fix to binutils 2.27 version.

(From OE-Core rev: f6f87019073d4f3caa7766aca89faa6781690fba)

Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-20 15:22:17 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Fabio Berton 8a81facc23 binutils: Fix build for c293pcie PPC machine
The following patch fix build for c293pcie PPC machine :
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=8941017b

This patch is a backport from master branch.

Fix error:
/
|ERROR: binutils-2.27-r0 do_package: runstrip: ''powerpc-fslc-linux-gnuspe-strip'
|--remove-section=.comment --remove-section=.note --strip-unneeded
|'../tmp/work/ppce500v2-fslc-linux-gnuspe/binutils/2.27-r0/package/usr/lib/
|libbfd-2.27.0.20160806.so'' strip command failed with 1
|(b'powerpc-fslc-linux-gnuspe-strip: ../tmp/work/ppce500v2-fslc-linux-gnuspe/
|binutils/2.27-r0/package/usr/lib/stJMAEnm: Not enough room for program headers,
|try linking with -N\npowerpc-fslc-linux-gnuspe-strip:../tmp/work/
|ppce500v2-fslc-linux-gnuspe/binutils/2.27-r0/package/usr/lib/stJMAEnm
|[.note.gnu.build-id]: Bad value\n')
\

(From OE-Core rev: 3526c23ae98d2e08af20b77175c12907355ec42a)

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30 15:48:05 +00:00
Khem Raj 86973c0843 binutils-2.27: Fix linker segfaults when linking binary files
Fixes segfaults when doing partial linking and generaring binary objects

/tmp/binu/ld/ld-new -r -b binary -o etc_certs_ui_ca_pem.o etc_certs_ui_ca_pem

0  elf32_arm_count_additional_relocs (sec=0x79bf40) at /mnt/a/work/oe/binutils-gdb/bfd/elf32-arm.c:18210
1  0x000000000047635a in bfd_elf_final_link (abfd=abfd@entry=0x783250, info=info@entry=0x748400 <link_info>) at /mnt/a/work/oe/binutils-gdb/bfd/elflink.c:11224
2  0x000000000044df7b in elf32_arm_final_link (abfd=0x783250, info=0x748400 <link_info>) at /mnt/a/work/oe/binutils-gdb/bfd/elf32-arm.c:12131
3  0x0000000000418917 in ldwrite () at /mnt/a/work/oe/binutils-gdb/ld/ldwrite.c:577
4  0x000000000040365f in main (argc=<optimized out>, argv=<optimized out>) at /mnt/a/work/oe/binutils-gdb/ld/ldmain.c:433

gold works ok. The patch is already applied in master binutils

(From OE-Core rev: 00d1913520f1572fa7def865e57852c7f25b0ec4)

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-11-06 23:35:32 +00:00
Yuanjie Huang f248db1972 binutils: enable warn system direcotories in cross-canadian ld
Warn system directories requires a configuration option to be enabled.
This patch enables the warning for cross-canadian ld, to align with the
cross version.

(From OE-Core rev: 581a746f081a265e08b41712e7bc953f46c6e92a)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-28 16:15:20 +01:00
Khem Raj 24abb88196 binutils: Fix gas error with cfi_section inconsistencies
This error is visible when using clang but not when using gcc
this has been reported and fixed upstream.

llvm bug https://llvm.org/bugs/show_bug.cgi?id=29017
binutils bug https://sourceware.org/bugzilla/show_bug.cgi?id=20648

(From OE-Core rev: e5a81575f11dc2a0ec9ee4184514750d2dbd09aa)

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-10-15 10:01:44 +01:00
Andre McCurdy 76f42d622b binutils: fix for MIPS "Can't find matching LO16 reloc" errors
Patch taken from Binutils Bugzilla:

  https://sourceware.org/bugzilla/show_bug.cgi?id=20649

(From OE-Core rev: a31eff6894099ee1d0ce7ccf2972f7276ca12743)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-15 10:01:43 +01:00
Ross Burton 0c9ba38d92 binutils: apply RPATH fixes from our libtool patches
We don't autoreconf/libtoolize binutils as it has very strict requirements, so
extend our patching of the stock libtool to include two fixes to RPATH
behaviour, as part of the solution to ensure that native binaries don't have
RPATHs pointing at the host system's /usr/lib.

This generally doesn't cause a problem but it can cause some binaries (such as
ar) to abort on startup:

./x86_64-pokysdk-linux-ar: relocation error: /usr/lib/libc.so.6: symbol
_dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with
link time reference

The situation here is that ar is built and as it links to the host libc/loader
has an RPATH for /usr/lib.  If tmp is wiped and then binutils is installed from
sstate relocation occurs and the loader changed to the sysroot, but there
remains a RPATH for /usr/lib.  This means that the sysroot loader is used with
the host libc, which can be incompatible.  By telling libtool that the host
library paths are in the default search path, and ensuring that all default
search paths are not added as RPATHs by libtool, the result is a binary that
links to what it should be linking to and nothing else.

[ YOCTO #9287 ]

(From OE-Core rev: 6b201081b622cc083cc2b1a8ad99d6f7d2bea480)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-04 16:29:04 +01:00
Ross Burton 55e8c3a9f9 binutils: fix typo in libtool patch
There was a clear typo in a function name, correct it.

(From OE-Core rev: dcf44e184a807d76463a3bf1b2315e80b9469de3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-04 16:29:04 +01:00
Juro Bystricky cf882b6e3a SDK: Allow changing SDKMACHINE without wiping TMP folder
When changing SDKMACHINE, we may encounter an error forcing us to wipe the TMP folder.
Since only SDK_ARCH is captured in the PN of the crosssdk recipes, changes to SDK_OS
result in conflicts. Eventually we hit the error:

ERROR: ...: The recipe <...>  is trying to install files into a shared area when those files already exist.
The build has stopped as continuing in this scenario WILL break things

This patchset addresses the problem by SDK_SYS as the recipe name suffix instead
of SDK_ARCH.

[YOCTO #9281]

(From OE-Core rev: d2eccccb70e809d482c493922f23aef4409cfd82)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28 10:16:03 +01:00
Khem Raj 30ab044dac binutils: Bump to 2.27
(From OE-Core rev: 3f1eb2556026572dca9476c561d89b86723395c7)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10 10:46:28 +01:00
Khem Raj 556059a5cb binutils: Cache gettext api version 1 and 2 support
Problem described here

https://lists.gnu.org/archive/html/bug-gettext/2015-11/msg00012.html

gettext does not detect the gettext support in libc
correctly if the libc is not glibc. Musl does support
the gettext version 1 and 2 of APIs

http://www.openwall.com/lists/musl/2015/04/16/3

tests in gettext.m4 however fail since it pokes at glibc
internal symbols to determine the gettext APIs
musl's implementaitons are done differenty so the
tests fail and hence it does not enable  the libc
implementation. Since we install the header from
libc it confuses the compilation and results in errors
like

libbfd.so: undefined reference to `libintl_dgettext'

see
http://savannah.gnu.org/bugs/?46436

binutils need these variables in make env since
binutils build system runs configure in the sub directories
during make step, so we need to pass these flags
in compile step in addition to configure step

(From OE-Core rev: 21bba0548463f277684cc52d23194ad6d7c17956)

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-01 11:47:11 +01:00