summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
AgeCommit message (Collapse)Author
2021-12-28gcc: Fix CVE-2021-42574pgowda
Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=bd5e882cf6e0def3dd1bc106075d59a303fe0d1e] Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=51c500269bf53749b107807d84271385fad35628] Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=1a7f2c0774129750fdf73e9f1b78f0ce983c9ab3] Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=bef32d4a28595e933f24fef378cf052a30b674a7] Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1276fa8b501aee1561b77538219d3cad2c796a21) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-12-28gcc: Fix CVE-2021-35465Pgowda
source : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102035 Upstream-Status: Backport[https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=3929bca9ca95de9d35e82ae8828b188029e3eb70] Upstream-Status: Backport[https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=574e7950bd6b34e9e2cacce18c802b45505d1d0a] Upstream-Status: Backport[https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=30461cf8dba3d3adb15a125e4da48800eb2b9b8f] Upstream-Status: Backport[https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=809330ab8450261e05919b472783bf15e4b000f7] Signed-off-by: Pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c8a1726feaf705683e80d85811ae482c6ebc3172) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-12-10gcc: Add CVE-2021-37322 to the list of CVEs to ignoreRichard Purdie
The CVE applies to binutils 2.26 and not to gcc so ignore there. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fea2726663a3db03170c49fceaffc632c509aeea) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-08-22gcc: also relocate the musl loaderRoss Burton
Alongside GLIBC and UCLIBC, also relocate the musl loader. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-22gcc: Fix nativesdk builds and multilib fixes with gcc 11Richard Purdie
In newer gcc versions the headers changed locations and our multiconfig and nativesdk tweaks to loader paths wasn't working. The broke buildtools-extended-tarball, particularly on arm. Update to fix this. Ultimately we should dump the gcc specs and check for hardcoded paths. This isn't possible quite yet as this patch doesn't fix the musl ones as we don't use that in mutlilib or nativesdk scenarios at present. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-05gcc: Backport patch to make LTO builds more reproducibleTony Battersby
Backport ustream gcc patch that enables -fdebug-prefix-map to cover additional cases with LTO enabled to make LTO builds more reproducible. [YOCTO #14481] Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-04meta: convert nested overrides leftovers to new syntaxDenys Dmytriyenko
Those were missed in previous rounds of automated and manual conversion. Signed-off-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-01gcc: update 11.1 -> 11.2Bernhard Rosenkränzer
Update gcc, drop patches that have been merged upstream Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-22gcc: Apply multilib fix to ARC as wellAlexey Brodkin
W/o that hack target GCC assume existence of per-mcpu folders, which are missing. In particular G++ failed to find "bits/c++config.h": ------------------>8------------------ root@hsdk:~# cat test.cc #include <cstdlib> int myfunc(void) { } root@hsdk:~# g++ -c test.cc -v Using built-in specs. COLLECT_GCC=g++ Target: arc-oe-linux Configured with: ../../../../../../work-shared/gcc-11.1.0-r0/gcc-11.1.0/configure --build=x86_64-linux --host=arc-oe-linux --target=arc-oe-linux --prefix=/usr --exec_prefix=/usr -x Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.1.1 20210523 (GCC) COLLECT_GCC_OPTIONS='-c' '-v' '-shared-libgcc' '-mcpu=hs38_linux' /usr/libexec/gcc/arc-oe-linux/11.1.1/cc1plus -quiet -v -imultilib hs38_linux -D_GNU_SOURCE test.cc -quiet -dumpbase test.cc -dumpbase-ext .cc -mcpu=hs38_linux -version -o /tmp/ccs GNU C++17 (GCC) version 11.1.1 20210523 (arc-oe-linux) compiled by GNU C version 11.1.1 20210523, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129242 ignoring nonexistent directory "/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1/arc-oe-linux/hs38_linux" ignoring nonexistent directory "/usr/lib/arc-oe-linux/11.1.1/include" ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../arc-oe-linux/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1 /usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1/backward /usr/lib/gcc/arc-oe-linux/11.1.1/include /usr/lib/gcc/arc-oe-linux/11.1.1/include-fixed /usr/include End of search list. GNU C++17 (GCC) version 11.1.1 20210523 (arc-oe-linux) compiled by GNU C version 11.1.1 20210523, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129242 Compiler executable checksum: 6df2f07a822bfbbb80a61414b712b75d In file included from test.cc:1: /usr/include/c++/11.1.1/cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory 41 | #include <bits/c++config.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated. ------------------>8------------------ Note "ignoring nonexistent directory "/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1/arc-oe-linux/hs38_linux" message which is being used by GCC due to the fact of implicit "-mcpu=hs38_linux". In fact this header "bits/c++config.h" is located in "/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1/arc-oe-linux" on target. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17gcc: replace gdb helper install revert with the upstream fixRoss Burton
A change in the gcc-11 branch broke installation of the GDB helper on bare-metal targets without a shared libstdc++.so. This now fixed upstream so replacce the revert with a backport of the patch. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17Revert "libgcc-initial: Do not build fp128 to decimal ppc functions"Khem Raj
This is now fixed in gcc properly, and the patches are backported into gcc11 branch which OE updated to recently. https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=645bfc161987a12395869728b63ed01084d23c00 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f1d012911bd103e9701ed378f32928a3cbcf028a This reverts commit 7883b4c1384fe30066072f39e9a930be537bc3b4. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-12gcc: Fixes for ARCAlexey Brodkin
A couple of fixes to be a part of 11.2 whenever it happens 1. https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0061fabeb9393c362601486105202cfe837a5a68 Fixes "harfbuzz" build, see https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/382 for all the gory details. 2. https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=4186b7e93be73f8d68dc0fcc00a4cc8cc83e99a8 Fixes ext4 run-time issue: ------------------------->8--------------------------- Path: /bin/busybox CPU: 0 PID: 1 Comm: init Not tainted 5.13.0-rc2-dirty #23 Invalid Read @ 0x41c9e600 by insn @ __bio_try_merge_page+0x4e/0xfc ECR: 0x00050100 EFA: 0x41c9e600 ERET: 0x80159656 STAT: 0x80080202 [IE K ] BTA: 0x80159648 SP: 0x80821b88 FP: 0x00000008 BLK: bio_add_page+0x22/0x5c LPS: 0x801a6a94 LPE: 0x801a6a98 LPC: 0x00000000 r00: 0x80823300 r01: 0xbfb85e38 r02: 0x00002000 r03: 0x00000000 r04: 0x80821b9b r05: 0x80821bfc r06: 0x00000000 r07: 0x00000700 r08: 0x00000000 r09: 0xffffffff r10: 0x00000000 r11: 0x00000000 r12: 0x8080b300 Stack Trace: __bio_try_merge_page+0x4e/0xfc bio_add_page+0x22/0x5c do_mpage_readpage+0x534/0x65c mpage_readahead+0x30/0xdc read_pages+0x34/0x194 page_cache_ra_unbounded+0x56/0x154 filemap_fault+0x25a/0x5d8 __do_fault+0x94/0xe8 handle_mm_fault+0x4de/0xbd4 do_page_fault+0x108/0x21c ret_from_exception+0x0/0x8 ------------------------->8--------------------------- 3. https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5a9b6a004f89fdd95b0470e1324dc4dee8c41d24 Precautious fix for rare corner cases which we don't wnat to really end-up in. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-08gcc: enable branch protection by standardRoss Burton
Pass --enable-standard-branch-protection. This is an aarch64-specific option (currently) which does nothing on other targets. On aarch64 this generates code uses BTI/PAC instructions to mitigate Return Orientated Programming attacks. This approach is backwards compatible and the code size/performance impact is typically negliable. More details can be found at https://events.static.linuxfound.org/sites/events/files/slides/slides_23.pdf Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-27gcc: revert libstc++-gdb.py installation changesRoss Burton
Commit dbb87d in the GCC 11 branch was intended to make the installation of this Python module more robust, but for unknown reasons the library_name in libstdc++.la in baremetal builds (for example, Zephyr) is unset, so the module is just installed as "-gdb.py". This may be a GCC bug, or a bug in our build. Until that is resolved, revert the commit to fix the packaging. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-25gcc: Update to latest on release/gcc-11 branchKhem Raj
There has been 150+ fixes made available after gcc 11.1.0 was released, details of these fixes is here https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;hp=releases/gcc-11.1.0;h=9ee61d2b51d Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-25gcc-cross-canadian: add symlinks for ld.bfd and ld.goldSamuli Piippo
When -fuse-ld gcc option is used, missing ld.bfd or ld.gold symlinks can lead to linker error: collect2: fatal error: cannot find 'ld' Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-18gcc: Refresh patch to fix patch fuzzKhem Raj
This is due to previous patches editing common files from this patch Fixes ERROR: gcc-source-11.1.0-11.1.0-r0 do_patch: Fuzz detected: Applying patch 0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch patching file gcc/config/linux.h Hunk #1 succeeded at 203 with fuzz 1 (offset 8 lines). patching file gcc/config/rs6000/linux.h patching file gcc/config/rs6000/linux64.h Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-18gcc: Extend .gccrelocprefix section support to musl configsKhem Raj
musl includes were not using the relocatable prefix like glibc counterpart, this will mean that musl SDKs will behave better and find the headers in right install directories Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-18gcc: Add target gcc include search for musl config tooKhem Raj
Musl has different search order and therefore injects it via INCLUDE_DEFAULTS and does not use the defaults from gcc/cppdefaults.h, this ensures that same fix is extended to musl configs too where it can search for compiler headers It will fix builds with musl where omp.h is not found because it is in gcc includes path on target ( not cross ) sysroot Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-11gcc-sanitizers: Package up static hwasan files as wellMartin Jansa
* introduced with gcc-11, other hwasan files were already packaged in: 3df4a25465 gcc-sanitizers: Package up hwasan files but static library was still triggering installed-vs-shipped Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-03gcc: Upgrade to GCC 11Khem Raj
Drop already upstream/backported patches Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-05-03libgcc-initial: Do not build fp128 to decimal ppc functionsKhem Raj
These functions depend on glibc headers e.g. stdlib.h/fenv.h/string.h/stdio.h which do not exist when building lbgcc-initial, and these functions are not needed during glibc build so we are fine to disable them introdcued with [1] [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=781183595acba67a37c66f59a0c1d9b5fee7e248 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-01gcc-runtime: Fix __FILE__ related reproducablity issuesKhem Raj
libstdc++ uses assertion macros which use __FILE__ macros and if (__builtin_expect(!bool(_Condition), false)) \ std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \ #_Condition) This ends up using absolute paths into build tree for the cases where the charconv header is used, therefore replace the file prefix paths with on-target paths to make them build dir independent Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-27gcc-cross-canadian: Install LTO linker plugin to BFD searchable locationKhem Raj
This helps binutils provided tools ar/ranlib/nm to find the LTO linker plugin automatically as well which makes it equivalent to gcc-ar/gcc-nm/gcc-ranlib Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-27gcc-cross: Install linker LTO plugin for binutils toolsKhem Raj
This will ensure that ar/ranlib/nm can load the lto linker plugin like gcc-ar, gcc-nm, gcc-ranlib does, this will let the behaviour match between gcc wrappers for these tools, this should help LTO builds for packages Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-27gcc-target: Create a LTO plugin symlink in bfd-plugins directoryKhem Raj
This directory is scanned by binutils provided ar,ranlib,nm for plugins that it can load automatically, putting liblto_plugin.so in their means we do not need gcc-ar, gcc-nm, gcc-ranlib particularly as normal ar/ranlib/nm tools will work equally well as they can now use this linker plugin by default This also mean we can revert back to using ar/ranlib/nm as default providers for AR/NM/RANLIB on target Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18gcc-runtime: Make DEBUG_PREFIX_MAP relative to SKhem Raj
Current definition of SLIB is actually equal to S but is hardcoded, this means when we have altered location of S, then the regexp for DEBUG_PREFIX_MAP will not be effective, which could result in S being emitted into debug_line sections. Simplify the maps to use S variable instead of SLIB Secondly, rename SLIB_NEW to REL_S to make it more appropritate to what it represents Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18gcc: Upgrade to 10.3.0 bug-fix releaseKhem Raj
Drop aarch64 backports which are already upstream List of bugs fixed is [1] [1] https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&list_id=298084&resolution=FIXED&target_milestone=10.3 Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-03-20gcc-sanitizers: Package up hwasan filesKhem Raj
This is introduced in GCC-11 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-20gcc: Update patch to only patch files onceWang Mingyu
This fixes an error in do_patch when using "PATCHTOOL = "patch"" error message: checking file gcc/configure.ac Hunk #1 FAILED at 6602. Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-14gcc: Package new module mapper toolKhem Raj
This is new tool in GCC 11 [1] [1] https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Module-Mapper.html Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-10gcc-cross: make use of the system include directories fatalRoss Burton
When building the cross GCC, configure it so that including the host system include directories is fatal, not just a warning. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-10gcc: add an option for --enable-poison-system-directories to be fatalRoss Burton
Extend --enable-poison-system-directories so that it can be an error instead of a warning by default. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-02gcc-sanitizers: Move content from gcclibdir into libdirMike Crowe
In e9e5744ba8b0d43c8b874d365f83071ce20bf0a1, Khem Raj wrote: > OE does not use the traditional /usr/lib/gcc prefix to store > gcc-runtime it basically is moved into libdir, however some newer > files were installed by newer versions of gcc especially libgomp ( > omp.h openacc.h ) into gcclibdir, so we have content in both > directories, this confuses other tools which are trying to guess the > gcc installation and its runtime location, since now we have two > directories, the tools either choose one or other and we get > inconsistent behavior, e.g. clang for aarch64 uses /usr/lib but same > clang for riscv64 chose /usr/lib/gcc > This change ensures that OE ends up with single valid location for gcc > runtime files I think that the same thing needs to happen in gcc-sanitizers.inc, otherwise I get errors like: | .../recipe-sysroot/usr/include/gpg-error-64.h:884:11: fatal error: sanitizer/lsan_interface.h: No such file or directory when attempting to compile with sanitizers enabled. FILES_${PN} needs updating to match too. Signed-off-by: Mike Crowe <mac@mcrowe.com> Cc: Khem Raj <raj.khem@gmail.com> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26meta/recipes-devtools: Add HOMEPAGE / DESCRIPTIONDorinda
Added HOMEPAGE and DESCRIPTION for recipes with missing decriptions or homepage [YOCTO #13471] Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20gcc: Backport patch to resolve i*86 tune configuration overridesNathan Rossi
Upstream has merged a change to handle detection of target overrides so that they are only applied as required. Backport this patch from upstream and remove the OE specific patch. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-18gcc: Add patch to resolve i*86 tune configuration overridesNathan Rossi
When compiling gcc-runtime for i686 libatomic, libgomp and libitm are compiled with additional '-march' and '-mtune' overrides. This typically does not cause build errors (e.g. core2-32 tune), and results in less optimally tuned outputs. However with specific TUNE_CCARGS (e.g. has '-mfpmath=sse' but not '-msse*'), the build errors with conflicting '-mfpmath' options. This is caused by gcc-runtime specific configure scripts and Makefile options that override by adding additional '-march'/'-mtune' args. OE builds gcc-runtime differently to other build systems, and provides target specific arch/tune options directly. As such, this change adds a patch for gcc to remove the specific cases where the args are added. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11gcc: Handle duplicate names for variablesKhem Raj
PREFIXVAR is defined in cppdefaults.c as well which shows up as error when LTO is enabled to build gcc, therefore rename the one instance to PREFIXVAR1 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11gcc: Do no parameterize LTO configuration flagsKhem Raj
These flags are redundant as LTO now enabled in GCC by default for sometime, Moreover, dropping LTO variable here avoids a conflict with global LTO variable being added for distrowide LTO support Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26gcc10: Don't default back to -fcommonJacob Kroon
It has been almost 3 months since the upgrade to gcc 10. Switch back to relying on gcc default configuration (-fno-common). This reverts OE-Core commit 951e859b1e8297970278c539e989b8a6d06a9cb3. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-22gcc-cross-canadian: Install gcc/g++ wrappers for muslKhem Raj
gcc needs -mmusl option to be passed in SDK since we ship crossdk compiler configured for glibc by default, this helps in creating correct compiler defaults for musl based SDK compilers [YOCTO #13459] Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Leon Woestenberg <leon@sidebranch.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-21gcc-cross-canadian: Correct the regexp to delete versioned gcc binaryKhem Raj
After gcc 10 this expression needed to be adjusted, its better to use a bitbake variable which we do have readily available Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-18gcc: Upgrade to 10.2.0Khem Raj
Drop 0036-Enable-CET-in-cross-compiler-if-possible.patch and pr96130.patch they are already in 10.2 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-15gcc-runtime.inc: fix m32 compile fail with x86-64 compilerChangqing Li
configuration: MACHINE ??= "qemux86-64" require conf/multilib.conf MULTILIBS ?= "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 ?= "core2-32" IMAGE_INSTALL_append = " packagegroup-core-buildessential lib32-libstdc++ lib32-libstdc++-dev" m32 compile failed on target: cmd: gcc -m32 -v test.cpp -o test output: GGC heuristics: --param ggc-min-expand=45 --param ggc-min-heapsize=29590 ignoring nonexistent directory "/usr/lib64/gcc/x86_64-poky-linux/10.1.0/../../../../include/c++/10.1.0/x86_64-poky-linux/32" ignoring nonexistent directory "/usr/lib64/x86_64-poky-linux/10.1.0/include" ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/lib64/gcc/x86_64-poky-linux/10.1.0/../../../../x86_64-poky-linux/include" /usr/lib64/gcc/x86_64-poky-linux/10.1.0/../../../../include/c++/10.1.0 /usr/lib64/gcc/x86_64-poky-linux/10.1.0/../../../../include/c++/10.1.0/backward /usr/lib64/gcc/x86_64-poky-linux/10.1.0/include /usr/lib64/gcc/x86_64-poky-linux/10.1.0/include-fixed /usr/include End of search list. GNU C++14 (GCC) version 10.1.0 (x86_64-poky-linux) compiled by GNU C version 10.1.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.1.0, isl version none GGC heuristics: --param ggc-min-expand=45 --param ggc-min-heapsize=29590 Compiler executable checksum: bc3b2f3a33dad80e30112cf1235bf631 In file included from test.cpp:1: /usr/include/c++/10.1.0/iostream:38:10: fatal error: bits/c++config.h: No such file or directory 38 | #include <bits/c++config.h> | ^~~~~~~~~~~~~~~~~~ cannot find header since /usr/lib64/gcc/x86_64-poky-linux/10.1.0/x86_64-poky-linux/32 is missing fixed by link it to ../i686-poky-linux Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-12gcc: backport a fix for out-of-line atomics on aarch64Ross Burton
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-28gcc: Fix mangled patchRichard Purdie
To quote Zhuang <qiuguang.zqg@alibaba-inc.com>: """ A few days ago, I tried to compile a gcc plugin with the toolchain from poky sdk. It failed with errors about missing header files such as backend.h etc. After investigation, I found that the problem was brought by a gcc patch: 0012-gcc-Fix-argument-list-too-long-error.patch (which is considered derived from the original patch) - headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ + headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \ It changes the commands of install-plugin, making the sorting taken effect before the shell globs. Thus results in the header files under gcc $(srcdir) being not installed. By checking log.do_install, we can find that the `headers=' statement to run is incorrect and will not work as expected: headers="$(cd *.def) *.h ../../../../../../../work-shared/gcc-10.1.0-r0/gcc-10.1.0/gcc/../include/ansidecl.h ... As the patch says, "The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle it, ..." my suggestion is that we can simply take care of PLUGIN_HEADERS using the original proposed sort. """ This fixes the gcc patch as proposed as it does appear its been broken over time. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22gcc-10.1: add fix for PR 96130Dmitry Baryshkov
Fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96130 causing ICE (SegFault) when compiling current Mesa git tree. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22gcc: mitigate the Straight-line Speculation attackRoss Burton
Straight-line Speculation is a SPECTRE-like attack on Armv8-A, further details can be found in the white paper here: https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability/downloads/straight-line-speculation Backport the GCC patches to mitigate the attack. CVE: CVE-2020-13844 Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-19gcc: Remove mudflap remnantsAdrian Bunk
mudflap was removed in gcc 4.9. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>