summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils
AgeCommit message (Collapse)Author
2021-05-12binutils: backport gold changes to use mallinfo2 instead of deprecated mallinfojansa/binutilsMartin Jansa
* mallinfo got deprecacted in glibc-2.33 with: https://sourceware.org/git/?p=glibc.git;a=commit;h=e3960d1c57e57f33e0e846d615788f4ede73b945 https://sourceware.org/git/?p=glibc.git;a=commit;h=30e5069c7d4b51288d3e6f75f53a6ad2f5e71b0f * resolves this warning: oe-core$ grep mallinfo tmp-glibc/work/x86_64-linux/binutils-cross-x86_64/2.36.1-r0/temp/log.do_compile checking whether sbrk is declared... checking for mallinfo... yes ../../gold/main.cc:294:36: warning: ‘mallinfo mallinfo()’ is deprecated [-Wdeprecated-declarations] * after: oe-core$ grep mallinfo tmp-glibc/work/x86_64-linux/binutils-cross-x86_64/2.36.1-r0/temp/log.do_compile checking for struct stat.st_mtim.tv_nsec in sys/stat.h... checking for mallinfo... yes checking whether snprintf is declared... checking for mallinfo2... configure: updating cache ./config.cache the configure output is badly mixed together, but mallinfo2 support was detected OK: oe-core$ grep _mallinfo tmp-glibc/work/x86_64-linux/binutils-cross-x86_64/2.36.1-r0/git/build.x86_64-linux.x86_64-oe-linux/gold/config.log ac_cv_func_mallinfo2=yes ac_cv_func_mallinfo=yes Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-05-12binutils: backport DWARF-5 support for goldMartin Jansa
* DWARF-5 is now used by default with gcc-11, causing 11.1.0/ld: internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278 collect2: error: ld returned 1 exit status in various projects (runc-opencontainers, libhybris, collada-dom) * https://gcc.gnu.org/gcc-11/changes.html For targets that produce DWARF debugging information GCC now defaults to DWARF version 5 (with the exception of VxWorks and Darwin/Mac OS X which default to version 2 and AIX which defaults to version 4). This can produce up to 25% more compact debug information compared to earlier versions. To take full advantage of DWARF version 5 GCC needs to be build against binutils version 2.35.2 or higher. When GCC is build against earlier versions of binutils GCC will still emit DWARF version 5 for most debuginfo data, but will generate version 4 debug line tables (even when explicitly given -gdwarf-5). The following debug information consumers can process DWARF version 5: GDB 8.0, or higher valgrind 3.17.0 elfutils 0.172, or higher (for use with systemtap, dwarves/pahole, perf and libabigail) dwz 0.14 Programs embedding libbacktrace are urged to upgrade to the version shipping with GCC 11. To make GCC 11 generate an older DWARF version use -g together with -gdwarf-2, -gdwarf-3 or -gdwarf-4. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-05-06binutils: Fix CVE-2021-20197Vinay Kumar
Source: git://sourceware.org/git/binutils-gdb.git Tracking -- https://sourceware.org/bugzilla/show_bug.cgi?id=26945 Backported upstream commit d3edaa91d4cf7202ec14342410194841e2f67f12 to binutils-2.36 source along with commit id dependencies (8e03235147a9e774d3ba084e93c2da1aa94d1cec and 8b69e61d4be276bb862698aaafddc3e779d23c8f). Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-23binutils: Fix linking failures when using dwarf-5Khem Raj
Since GCC 11 will switch to dwarf-5 as default, this patch will be required soon Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-23default-distrovars.inc: add debuginfod to default DISTRO_FEATURESAlexander Kanavin
Obtaining debug information by having it served automatically via http is far more pleasant than messing about with debugfs and gdbserver or transferring and installing -dbg packages by hand. I believe we should follow the desktop distros and have it enabled out of the box. Please see the following commit for the description of how it works. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18binutils: rename BRANCH varArmin Kuster
If BRANCH is defined in local.conf then that name is used to d/l sources for binutils. You will get this error: Fetcher failure for URL: 'git://sourceware.org/git/binutils-gdb.git;branch=hardknott;protocol=git'. Unable to fetch URL from any source. Rename to SRCBRANCH like glibc has to avoid the more common variable name BRANCH. Signed-off-by: Armin Kuster <akuster808@gmail.com> -- V2] Remove commented out BINUPV and function Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-05binutils: Fix a missing break in case statementKhem Raj
This was missed during patch forward porting its only effective when printing options Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-02binutils: add PACKAGECONFIG for debuginfodDorinda
Added PACKAGECONFIG for debuginfod Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26binutils: Upgrade to 2.36.1 releaseKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-03binutils: Disable parallel install for target/nativesdk binutilsKhem Raj
2.36 has a build race between libctf and libbfd Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-03binutils: Package libdep linker pluginsKhem Raj
this is new plugin added in binutils 2.36 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-03binutils: Upgrade to 2.36 releaseKhem Raj
Drop backported patches which are already present in 2.36 release Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16binutils: Fix CVE-2020-35448Yi Fan Yu
Fix related to a buffer overflow in bfd library CVE Details https://nvd.nist.gov/vuln/detail/CVE-2020-35448 Upstream Tracking https://sourceware.org/bugzilla/show_bug.cgi?id=26574 Patch from Upstream https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git; h=8642dafaef21aa6747cec01df1977e9c52eb4679 Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-13binutils: upgrade 2.35 -> 2.35.1Wang Mingyu
Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-18binutils: add libopcodes package for perfAlan Perry
Add a package for libopcodes, since, like libbfd, it is needed by perf. Without separate packages for these libraries, all of the binutil tools get added as well. Signed-off-by: Alan Perry <alanp@snowmoose.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24binutils: Fix linker errors on chromium/ffmpeg on aarch64Khem Raj
ffmpeg in qtwebengine/chromium fails to build on aarch64 ffmpeg/ffmpeg_internal/videodsp.o: in function `ff_prefetch_aarch64': (.text+0x10): relocation truncated to fit: R_AARCH64_CONDBR19 against symbol `ff_prefetch_aarch64' defined in .text section in obj/third_party/ffmpeg/ffmpeg_internal/videodsp.o Backport an upstream fix to handle this error which is a regrression in binutils 2.35 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11binutils: reproducibility: reuse debug-prefix-map for stabsDenys Zagorui
powerpc 32bit Linux Kernel widely uses .stabs pseudo-op to produce debugging information in stabs format. Faced an issue that during Linux Kernel build with Yocto build system for 32bit powerpc platform resulting vmlinux contains absolute path in .stabstr section that cannot be remapped with -fdebug-prefix-map option. Yocto uses scripts/mkmakefile Linux Kernel build approach that allows to store all generated files outside of kernel source tree. With this approach each compilier invocation is performed with an absolute path to a file that will be compiled and this absolute path is recorded in init stab. There is no way to remap this path. Reuse remap_debug_filename api to make -fdebug-prefix-map flag aplicable for init stab. Signed-off-by: Denys Zagorui <dzagorui@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-21binutils: Let crosssdk gold linker generate 4096 btyes long .interp sectionKhem Raj
When gold is used as default linker in crosssdk e.g. when building SDK binaries with LTO, the binaries do not have large enough .interp section size and SDK relocation fails for those nativesdk binaries and libraries which used gold for linking. This patch extends the .interp relaxation fix to gold Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-12binutils: Remove RISC-V PIE patchAlistair Francis
Remove the out of tree patch that is trying to address a PIE issue. This patch causes RISC-V applications to seg fault when running _dl_relocate_object. This fixes: https://github.com/riscv/meta-riscv/issues/236 Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-06binutils: Upgrade to 2.35 releaseKhem Raj
assembler supports dwarf-5 format line numbers linker has -M -MP gcc-like option for detailed release notes see [1] [1] https://lists.gnu.org/archive/html/info-gnu/2020-07/msg00008.html Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-24recipes: Fix Upstream-Status Accepted -> BackportRichard Purdie
It helps our stats tracking to use Backport consitently, it mreans the same thing as Accepted in pretty much all cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-12binutils: add patch to fix issues with gcc 10Richard Leitner
gcc 10 introduced "-fno-common" as default. Therefore backport the according binutils patch to fix this issue. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26binutils: Install PIC version of libiberty.aKhem Raj
some architectures e.g. mips complain in linking apps which have shared libs that are linking with libiberty.a fixes errors like below libiberty/../../libiberty/hashtab.c:285:(.text+0xf8): relocation R_MIPS_26 against `htab_create_typed_alloc' cannot be used when making a shared object; recompile with -fPIC Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26binutils: Detect proper static-libstdc++ support when using clangKhem Raj
Fixes configure time tests to ensure static-libstdc++ is enabled when using clang Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-05binutils: Use configure options to disable gdb and dependenciesKhem Raj
Deleting sources is a rough way of dealing with disabling components, using configure option is elegant way and we also keep the sources unchanged, this should not cause any funcitonal changes otherwise Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-03nativesdk-binutils: correct path to ld.so.confJeremy Puhlman
The alternative ld.so patch is set up so the linker will search the nativesdk sysroot before searching the host filesystem. However the patch concatenates <sysroot>/etc and /etc/ld.so.conf leading to a path that does not exist: 3061991 openat(AT_FDCWD, "/buildtools/sysroots/x86_64-pokysdk-linux/etc/etc/ld.so.conf", O_RDONLY) = -1 ENOENT (No such file or directory) In native-nspr, the build uses -lpthread, which triggers a search for librt, but because of the above it drags in the system librt leading to errors as follows: /buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/gcc/x86_64-pokysdk-linux/ 9.3.0/../../../../x86_64-pokysdk-linux/bin/ld: /lib64/librt.so.1: undefined reference to `__clock_getcpuclockid@GLIBC_PRIVATE' update concatenation to correctly construct the path to the nativesdk ld.so.conf [YOCTO #13853] Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-01binutils: Do not build gold linker on mips/glibcKhem Raj
Using gnu_hash style is unsupported on gold for now therefore disable building gold on mips/glibc Certain applications poke for presence of gold linker and silently use it (webkit), therefore its best to disable building it Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-30binutils: Pregenerate autoconf filesKhem Raj
libtool patch will result in configure file regeneration, instead of doing that at build time, do it in patch itself, this avoids running autoconf before configure step. Since binutils needs specific version of autoconf ( which is 2.69 ) this will break on systems using newer or older verisons of autoconf in current state. Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-13binutils: fix CVE-2020-0551Anuj Mittal
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-29binutils: fix multilib header differenceJeremy Puhlman
bfd_stdint.h encodes the name of the compiler in the header which is different between mutlilibs. Remvoe target prefix to make the headers match. Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-22binutils: Fix x86_64 override usageRichard Purdie
This override was applying to binutils-native meaning it would behave differently depending upon the host it was building on. This is not a good idea and we have tests to detect it which failed: oe-selftest -r sstatetests.SStateTests.test_sstate_32_64_same_hash binutils-native already enables all targets so we can avoid issues by not setting this option in the native case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-22binutils: Upgrade to 2.34 releaseKhem Raj
Details of changelog [1] Removing bfd/ld patch to enable PE targets, instead use specific emulations via --enable-targets for x86_64 Re-arrange/forward-port patches and upgrade libctf configure to libtool 2.4 patch rpaths are no longer emitted into elfedit/readelf therefore no need of chrpath anymore Instead of pre-generating configure scripts and house them in libtool patch, generate them during configure. This also ensures that we do not patch configure directly but rather the sources which generate it Package newly added libctf library [1] https://lists.gnu.org/archive/html/info-gnu/2020-02/msg00000.html Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Christopher Clark <christopher.clark6@baesystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-14binutils: additional patch should be added with space.Jeremy Puhlman
If an append adds a patch or file with SRC_URI += , the spaceless append causes the file listings to concatinate and cause failures in the nativesdk-binutils parse/build. Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-14binutils: Bail out if gold is used on 32/64 bit RISC-VKhem Raj
gold is not supporting risc-v yet and, this will cause subltle errors during build e.g. autoconf not finding certain features like visibility and it could take a while to unwind the problem. Its better to error out early Remove dwp and ld.gold for rv32 as well Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-22binutils: Install non-alternatives links for nativesdkRichard Purdie
In the SDK we need the plain symlinks and don't use alternative providers. When these are missing the toolchain can work incorrectly so fix this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-22binutils: Fix relocation of ld.so.conf in nativesdk buildsRichard Purdie
We need binutils to look at our ld.so.conf file within the SDK to ensure we search the SDK's libdirs as well as those from the host system. There add a patch which passes in the directory to the code using a define, then add it to a section we relocate in a similar way to the way we relocate the gcc internal paths. This ensures that ld works correctly in our buildtools tarball. Standard sysroot relocation doesn't work since we're not in a sysroot, we want to use both the host system and SDK libs. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-09binutils: Upgrade to 2.33.1Khem Raj
Drop CVE patches which are already available on binutils-2_33-branch Forward port rest of the patches Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-31binutils: fix CVE-2019-17451Trevor Gamblin
Backport upstream fix. No upstream release version of binutils it yet, so backport the fix independently. Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-10-31binutils: fix CVE-2019-17450Trevor Gamblin
Backport upstream fix. No upstream release version of binutils it yet, so backport the fix independently. Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-10-02binutils: drop UPSTREAM_VERSION_UNKNOWNAlexander Kanavin
As there is now a new version of binutils, upstream version check works again. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06binutils/glibc-testsuite: inherit nopackages to fix world buildsRichard Purdie
These recipes don't need to generate packages but did contain the packaging tasks which would be triggered by a world build. They showed warnings or errors. Simplest fix is to remove the unneeded tasks with the nopackages class. Also don't attempt stash_locales task Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06binutils-cross-testsuite: Create recipe for test suite executionNathan Rossi
Create the do_check task in a new recipe 'binutils-cross-testsuite'. This recipe is built within a target recipe (not -cross) to ensure correct testing against target specific libraries/etc. The do_check task is used to execute the binutils test suite for the cross target binutils. By default this executes tests for binutils, gas and ld. This can however be changed by setting CHECK_TARGETS to the desired test suite target (e.g. 'gas'). The binutils test suites do not require any target execution, as such the check task can be run without QEMU or a target device. However since the binutils tests do rely on a C compiler there is dependence on both gcc and libc in order to run the tests. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28binutils: Fix mips patch which changes default emulationNathan Rossi
The patch incorrectly removes 'mips_elf32_ntrad_le_vec' from the 'targ_selvecs' replacing it with duplicate entries for 'mips_elf32_ntrad_be_vec'. Correct this so that the default binutils can still handle 'mips_elf32_ntrad_le_vec' binaries. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21binutils: fix CVE-2019-14250 CVE-2019-14444Anuj Mittal
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-07-18binutils: CVE-2019-9070 is same as CVE-2019-9071Anuj Mittal
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89395 Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-11binutils: fix CVE-2019-12972 CVE-2019-9071Anuj Mittal
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-27binutils: Workaround mips assembler crash on targetKhem Raj
assembler ends up crashing on target sometimes due to segfaults in libbfd, therefore avoid using -O2 for now Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29binutils: fix CVE-2019-9074 CVE-2019-9075 CVE-2019-9076 CVE-2019-9077Anuj Mittal
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-29binutils: set CVE_VERSIONRoss Burton
PV is 2.32.0 even though the actual release upstream is 2.32. To a human this is insignificant, but to automated tooling it matters. Specifically, cve-check-tool can't identify CVEs that are in 2.32. Set CVE_VERSION for now, which should be removed when PV and the upstream version match again. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-27binutils: fix upstream version checkAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>