summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
Commit message (Collapse)AuthorAgeFilesLines
* gcc-source: Ensure deploy_source_date_epoch sstate hash doesn't changeRichard Purdie2022-11-071-0/+7
| | | | | | | | | | | | | | | | Currently if you switch machines, gcc-source do_deploy_source_date_epoch would re-run as the stamps are tune specific. This hasn't caused much of an issue until now, however if we fix the gcc recipes to reuse the timestamp from this task, it does then create problems. Copy code from allarch to ensure this task hash doesn't change between machines/tunes. (From OE-Core rev: 7e052d03464ba5e880a6c5a0e45ff2f467ef97e8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-source: Drop gengtype manipulationRichard Purdie2022-11-071-2/+0
| | | | | | | | | | | | | | Whilst we patch gengtype.cc, we don't patch gengtype-lex.cc which would be the file which would trigger regeneration of files. The real bug that was likely the cause for this fix is probably SDE issues with gcc shared workdir so this code can now be dropped. (From OE-Core rev: 7ab82b5db2a737c2a0266280b15d343a27c0e1d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-source: Fix gengtypes raceRichard Purdie2022-11-071-1/+1
| | | | | | | | | | | | | | | | | | gcc renamed .c files to .cc files: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=5c69acb32329d49e58c26fa41ae74229a52b9106 but we didn't fix this reference which meant we re-introduced a race around gengtypes-lex.c. This lead to the race reappearing on the autobuilder. Fix the naming to avoid the problem again. [YOCTO #14953] (From OE-Core rev: dbca40ed399405b663dbc3894e35596a2615f47d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-shared-source: Fix source date epoch handlingRichard Purdie2022-11-071-0/+10
| | | | | | | | | | | | | | | | | | | | | The source date epoch for gcc isn't being transferred from the shared workdir to the current WORKDIR for the specific recipe. This results in the clamping code within sstate.bbclass using a value from 2011 which changes the timestamps of many files. Since this happens part way through the build, if pieces of gcc haven't built, or build/rebuild later, we see things rebuilding when they should not and for generated files, races are possible. Fix this by copying the SDE from the shared workdir into the recipe workdir. [YOCTO #14953] (From OE-Core rev: b996293b4c8ab7ff3ed852045d17290df29205df) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Allow -Wno-error=poison-system-directories to take effectPeter Kjellerstedt2022-10-251-18/+18
| | | | | | | | | | | | The change in commit e903b29f (gcc-cross: pass -Werror=poison-system-directories to compiler stages) made it impossible to disable the error using -Wno-error=poison-system-directories. (From OE-Core rev: 1cb0245539f7d5277fae4e9abc7f2a0130d0caa8) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: set the default target archDaniel McGregor2022-09-292-1/+11
| | | | | | | | | | | | | | | | The default x86-64 architecture for target gcc (ie, the one in poky build appliances) is native. Since we have a variety of build systems it will occasionally produce instructions that don't work on all of our development system. Instead, set gcc's default architecture to the one specified in TUNE_CC_ARCH, that guarantees that gcc-runtime and any binaries produced are compatible with the target machine type. (From OE-Core rev: 52b952e474e655f8b4b6501813d57e20c9f02ba2) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross-canadian: add default plugin linkerSamuli Piippo2022-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix multilib sdk issue where gcc is unable to find linker. Previous fix was in cdd86896c8d29135f937968e9aa07f919cf543d3 using real-ld symlink, but that prevented switching between bfd and gold linkers. Running compiler with debug arguments shows that collect2 tries and fails to find linker using the multilib triples: $ $CC -v -Wl,-debug ... Looking for 'real-ld' Looking for 'collect-ld' Looking for 'mips-oemllib32-linux-ld' Looking for 'mips-oe-linux-mips-oemllib32-linux-ld' ... collect2 version 12.2.0 ld_file_name = not found ... collect2: fatal error: cannot find ‘ld’ Using --with-plugin-ld=ld in gcc-cross-canadian builds to set default linker name for collect2, lets it find the linker correctly: Looking for 'real-ld' Looking for 'collect-ld' Looking for 'ld' ... collect2 version 12.2.0 ld_file_name = /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/mips-oe-linux/gcc/mips-oe-linux/12.2.0/ld Swith between bfd and gold linker works as expected now: $ $CC -v -Wl,-debug -fuse-ld=gold ... Looking for 'real-ld' Looking for 'collect-ld' Looking for 'ld.gold' ... collect2 version 12.2.0 ld_file_name = /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/i686-oe-linux/gcc/i686-oe-linux/12.2.0/ld.gold (From OE-Core rev: cf1bb16b7f9f81514feaf1e4ecffd9039387bb89) Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "gcc-cross-canadian: Add symlink to real-ld alongside other symlinks"Samuli Piippo2022-09-171-2/+0
| | | | | | | | | | | | This reverts commit cdd86896c8d29135f937968e9aa07f919cf543d3. real-ld is always used if that is found, which means you cannot switch between bfd and gold linkers using -fuse-ld gcc option. (From OE-Core rev: 53ae417c63a4a7ff4a729d3653a31cf1c0758f10) Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: remove obsolete MinGW patchRoss Burton2022-09-092-27/+0
| | | | | | | | | | | | | | This patch appears to be obsoleted by 217d5be, in GCC 11.1 onwards. libstdc++: Test errno macros directly for all targets [PR 93151] This applies the same changes to the djgpp and mingw versions of error_constants.h as r11-6137 did for the generic version. (From OE-Core rev: e3157da1408b4e6281fdf28825b79c266e93c05e) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: remove obsolete poisoned calloc workaroundRoss Burton2022-09-092-57/+0
| | | | | | | | | This was fixed upstream in de6f402a, as part of 12.2. (From OE-Core rev: d5e6768f30579abc8559aab60429a292a4c49f3d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: remove obsolete 0012-export-CPP.patchRoss Burton2022-09-072-51/+0
| | | | | | | | | | This patch is no longer needed, the upstream Makefile exports CPP from CPP_FOR_BUILD since 12.1. (From OE-Core rev: c7546939574dc5e976caae8f0e705b805962ff03) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross: pass -Werror=poison-system-directories to compiler stagesRoss Burton2022-09-071-0/+13
| | | | | | | | | | | | The -Werror=poison-system-directories argument was being passed to runs where _just_ CPP was being invoked, so it wasn't passed to runs which also compile. Add the options to cc1_options so that compile runs also have fatal poisoning errors. (From OE-Core rev: e903b29f89e81de244ac77da464c71b718c6854d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-multilib-config: Fix i686 toolchain relocation issuesRichard Purdie2022-09-031-1/+1
| | | | | | | | | | | | | This code wasn't changing the linux.h on i686. Make the entry match that for i586 which was correct. This fixes problems where the wrong dynamic loader path was used by nativesdk-gcc on i686 SDK targets by ensuring SYSTEMLIBS_DIR is replaced by %r in the correct header files. (From OE-Core rev: d30eb681f41bf9e921f7f0d42747fff7a4be9229) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Upgrade to 12.2.0Khem Raj2022-08-2512-49/+3
| | | | | | | | | | | | | | | | | | GCC 12.2 is the first bug-fix release from the GCC 12 branch containing important fixes for regressions and serious bugs in GCC 12.1 with more than 71 bugs fixed since the previous release comprising of a number of libstdc++ and C++ and fortran fixes [1] Remove backported patch to fix libsanitizers with glibc 2.36, its already present in 12.2 [1] https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=12.2 (From OE-Core rev: b73f5c0a7b94d9d04dd69fe5a5b871eab05714a3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Update patch status to submitted for two patchesRichard Purdie2022-08-172-2/+3
| | | | | | (From OE-Core rev: a2f52f6f698a1073f264dfb8afcdb4dcbcec6be8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Add a patch to avoid hardcoded paths in libgcc on powerpcRichard Purdie2022-08-172-0/+20
| | | | | | | | | Tweak the powerpc code to just include filenames rather than full paths to avoid build reproducibility issues. (From OE-Core rev: a71832a14b6944da10c1916861545577f2f2de2c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Resolve relative prefix-map filenamesRichard Purdie2022-08-172-0/+63
| | | | | | | | | | | | Add a patch to gcc so that relative paths are handled by -fdebug-prefix-map and friends. In OE we use relative paths in autotools and removing that creates a lot of issues we'd have to fix. This alternative allows us to fix the paths within gcc and improve our debug file coverage (and SPDX manifests) accordingly. (From OE-Core rev: 591cbe7140f01470b5799bc51e5b23f58bf95ffa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross: Fix relative linksRichard Purdie2022-08-171-0/+1
| | | | | | | | | | Now that we're using absolute paths to run configure, there are absolute path symlinks within gcc's output. Use our script that fixes these so that the sstate objects work correctly. (From OE-Core rev: 78f0bb21ae4337fdf628b2436c6182c32ed4fa9d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Handle S and B separately for debug mappingRichard Purdie2022-08-172-21/+0
| | | | | | | | | | | | | | | | | We don't really need to keep S and B separate for debug source purposes and there shouldn't be source references in WORKDIR that isn't S and B either. Separating these out simplifies the shared-work directory handling for gcc and should also help fix external source usage. Therefore handle S and B in DEBUG_PREFIX_MAP separately and clean up other code. Indentation is reduced here as it is introduced on every compiler commandline so minimising it is helpful. (From OE-Core rev: c39b5020b8705d17e3745c41e38d0f99a1ac94cf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libgcc/gcc-runtime: Improve source reference handlingRichard Purdie2022-08-172-14/+19
| | | | | | | | | | | | | | | | | | | | | | This code was some of the earliest reproducible build work we did. To correctly handle the encoding of file paths, we used relative build paths to run configure which resulted in relative build paths in the binaries. We now have more modern approaches used elsewhere with the prefix remapping options. These work best with absolute paths, not relative ones. As such, drop the relative path mangling and switch to using prefix mapping exclusively on absolute paths. This makes the code matc the rest of the system and triggers the correct code to be added in /usr/src/debug. We have to include both file-prefix and debug-prefix since the assembler only looks at debug-prefix. (From OE-Core rev: 309e5d8bb56eb8599d756831f0bd38e6a50cfb05) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-sanitizers: Fix mount.h glibc 2.36 conflictKhem Raj2022-08-022-0/+46
| | | | | | | | | | backport a sanitizers upstream patch (From OE-Core rev: ca1fef4cb33b5f218cd0206002e8776d2f68b12d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libgcc: Fix standalone target builds with usrmerge distro featureKhem Raj2022-07-251-2/+6
| | | | | | | | | | | Ignore the rmdir cmd if using usrmerge distro feature since the intention is to delete /lib or /lib64 but not libdir under /usr and base_libdir = libdir when usrmerge is enabled in distro (From OE-Core rev: 3b7f6b0e0f1f16f89cd924aac001b4f661c145ca) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Use static dummy libstdc++Khem Raj2022-07-251-1/+2
| | | | | | | | | | some standalone targets e.g. riscv64-elf disable shared linking for baremetal ELF ABI in ld, therefore lets make it a static library (From OE-Core rev: 3c6219dfcbcbde314648ba8cc54a90b32ea1c952) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Use --with-target-subdir for baremetal targetsKhem Raj2022-07-251-1/+2
| | | | | | | | | | | | | | | | | This disables tests for runtime system specific functions like fcntl there is no other change seen +configure:77372: checking for fcntl +configure:77372: result: yes In libsttdc++ configure log outputs. [YOCTO #14803] (From OE-Core rev: 586b6239252ecf2711930b60f7f0f617e38ac737) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Pass -nostartfiles when building dummy libstdc++.soKhem Raj2022-07-221-2/+1
| | | | | | | | | | | This is a dummy shared object therefore reduce dependencies further by not requiring the C startup files, we wont use this shared library for anything useful anyway (From OE-Core rev: e1c4953f5587621d4911416c2e9350ad0c27b296) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Fix missing MLPREFIX in debug mappingsRichard Purdie2022-07-151-1/+1
| | | | | | | | | This fixes reproducibility issues with multilibs were a different recipe specific sysroot is used which was leaking into debug symbols in libraries. (From OE-Core rev: f442edf51e256bd315bd8e4ac4d9fa12b8e9e092) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Fix build when using goldRichard Purdie2022-07-141-1/+2
| | | | | | | | | | | | | | | | If gold is enabled as the default linker, it errors trying to link to our dummy library empty file and this turns off things which should be present in libstdc++. For example, _GLIBCXX_HAVE_S_ISREG isn't defined and HAVE_S_ISREG in libstdc++-v3/config.h isn't set properly. Instead of just creating an empty file, create an empty elf binary instead which addresses the issue. (From OE-Core rev: 2070bcd10aa3a05c96c8501c6a8c1e129fb1d440) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Backport a fix for gcc bug 105039pgowda2022-07-142-0/+93
| | | | | | | | | | | | Backport a fix from: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=9234cdca6ee88badfc00297e72f13dac4e540c79 which fixes rust recursion issues in the demangler. (From OE-Core rev: bd2c8ed2d3ddec21cfcc44b26feee0285e0cd441) Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/recipes: Introduce add DEV_PKG_DEPENDENCY to change ↵Richard Purdie2022-06-281-2/+2
| | | | | | | | | | | | RDEPENDS:${PN}-dev There is a pattern that several recipes need to break the dependency of ${PN}-dev on ${PN}, most often as ${PN} may be be empty. Add a new variable to parameterise this and allow it to be changed more easily. (From OE-Core rev: a5b381c0f45c590a762647a9956a8f41e2e2315e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-source: Fix incorrect task dependencies from ${B}Richard Purdie2022-06-152-1/+2
| | | | | | | | | | | | | | | | Some tasks may reference ${B} for gcc-source which in general would not exist. It has dependencies on HOST_SYS and TARGET_SYS which are not appropriate for a shared recipe like gcc-source. This causes problems for the archiver and multiconfigs in particlar. Set B to something else to avoid these task hash issues. Acked-by: Jose Quaresma <jose.quaresma@foundries.io> (From OE-Core rev: beb2a76c591e985c6fc7ed473abd1bee27f955a2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross-canadian: Add nativesdk-zstd dependencyRichard Purdie2022-06-041-1/+1
| | | | | | | | | To match the changes to gcc-cross, add a nativesdk-zstd dependency to ensure our configurations match. (From OE-Core rev: c145e00710fe557b5a3832fdc556ad53434b3615) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: depend on zstd-nativeJeremy Puhlman2022-06-021-1/+1
| | | | | | | | | | | | | Sharing sstate cache binaries between two systems, one with libzstd installed and the other without, leads to various gcc components being linked against the system libzstd and failing to run on the system with out it installed. Make zstd-native from our system available. (From OE-Core rev: 2b0a6f03137f24b211c8881cebf65732e550a942) Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: upgrade 11.3 -> 12.1Khem Raj2022-05-1048-5663/+532
| | | | | | | | | | | | | | | | Major gcc release with lot of changes [2] - Add patch to re-shuffle include of sched.h to fix build on musl - porting guide to gcc 12 [1] - Fix version in maintainers entry [1] https://gcc.gnu.org/gcc-12/porting_to.html [2] https://gcc.gnu.org/gcc-12/changes.html (From OE-Core rev: b8878cf0d35cf3d1ac30576d9b9943a7761c011b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Upgrade to 11.3 releaseKhem Raj2022-04-2248-961/+371
| | | | | | | | | | | | | This is a bugfix release on gcc-11 series, fixes 189 bugs [1] Drop backported patches already included in 11.3 release [1] https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=11.3 (From OE-Core rev: c6d508157058adae401059e36df7fa778852859b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: sanitizer: Fix tsan against glibc 2.34Sundeep KOKKONDA2022-04-032-0/+24
| | | | | | | | | | | | | | | The patch is needed in order to support recent glibc (2.34). libsanitizer/ChangeLog: PR sanitizer/101749 * sanitizer_common/sanitizer_posix_libcdep.cpp: Prevent generation of dependency on _cxa_guard for static initialization. (From OE-Core rev: c44c4e7fb3c860d9fcb2aada0c9d4acb1e1e8101) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta, meta-selftest: Replace more non-SPDX license identifiersPeter Kjellerstedt2022-03-011-1/+1
| | | | | | | | | | | | | | | | In commit ceda3238 (meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers) all LICENSE variables were updated to only use SPDX license identifiers. This does the same for comments and other variables where it is appropriate to use the official SPDX license identifiers. There are still references to, e.g., "GPLv3", but they are then typically in descriptive text where they refer to the license in a generic sense. (From OE-Core rev: 165759dced7fbe73b1db2ede67047896071dc6d0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Automated conversion of OE renamed variablesRichard Purdie2022-02-212-2/+2
| | | | | | (From OE-Core rev: aa52af4518604b5bf13f3c5e885113bf868d6c81) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie2022-02-201-1/+1
| | | | | | | | | | | | | license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. (From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-target: move cc1plus to g++ packageStefan Herbrechtsmeier2022-02-121-1/+0
| | | | | | | | | | Move cc1plus from gcc to g++ package. Therefor, remove the duplicate FILES entry from gcc package and keep the entry in g++ package. (From OE-Core rev: f16c0efdeaca7cd08bd5609141b1094139e746f9) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-target: fix glob to remove gcc-<version> binaryStefan Herbrechtsmeier2022-02-121-1/+1
| | | | | | | | | | The glob to remove the gcc-<version> binary expects a single-digit major version which is no longer true. (From OE-Core rev: 30de10cf939cf65c0cab6730a3575bced5c7533a) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc : Fix CVE-2021-46195pgowda2022-02-122-0/+129
| | | | | | | | | Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=f10bec5ffa487ad3033ed5f38cfd0fc7d696deab] (From OE-Core rev: 81e9f8aedab70dfb0a016601150623ef9a7c1596) Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Drop stdlib++ option patchRichard Purdie2022-02-053-121/+6
| | | | | | | | | | | | | | | | | | | The patch to gcc to disable use of libstdc++ when configuring the library during gcc-runtime is old and there are perhaps better ways to do this now. If removed, most builds still "work" but incorrect values for things like atomic ops are found during configure. mips64 and ppc fail with on target simple tests of g++ in testimage. Instead we can create a dummy libstdc++ which allows the correct configure test results to be obtained. Discussed with upstream about the patch are ongoing, if accepted, we can switch back to the commandline option if it is added in future. (From OE-Core rev: 34b0edb0d3120c32063ff7e3dd52be20d60401d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross-canadian: Fix cross canadian compiler for baremetal targetsAlejandro Hernandez Samaniego2022-01-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While building GCC it checks whether the include directory exists, if it doesnt it throws an error and exits: | The directory that should contain system headers does not exist: | tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-riscv32/ 11.2.0-r0/recipe-sysroot/usr/include/ | make[1]: *** [Makefile:3257: stmp-fixinc] Error 1 Even though for the baremetal toolchain not having this directory does make sense. We overcame this by removing the --with-sysroot=/not/exist argument for baremetal toolchains (via TARGET_OS override), however, the newlib toolchain does have headers and an includedir, hence by fixing the baremetal toolchain we broke the newlib one since it uses the same TARGET_OS as baremetal, causing for example (on newlib): /sdk/sysroots/x86_64-pokysdk-linux/usr/lib/riscv32-poky-elf/gcc/ riscv32-poky-elf/11.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory | # include_next <stdint.h> ^~~~~~~~~~ compilation terminated. By creating a dummy includedir, and removing the previous fix we allow GCC to be built the same way, unifying the cross compiler for all targets. After this fix both TCLIBC=baremetal and TCLIBC=newlib SDKs work properly. (From OE-Core rev: 08ff7c87efdf373f1874fcccd9a2a73fc0efef30) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix typo in linux64.h install patchAndrei Gherzan2022-01-111-1/+1
| | | | | | | | | | The "gcc: Fix compile of gcc plugins" patch had a typo making it a noop. This was due to a rework to make it specific to the linux64.h header. (From OE-Core rev: 5f0f00f0988c02d7fe0fa62edf3e4901ce9941a6) Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix compile of gcc pluginsAndrei Gherzan2022-01-072-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, compiling gcc plugins will fail with an error similar to: [...] fatal error: ./config/i386/linux64.h: No such file or directory [...] In Yocto, we set up compiling gcc-cross out of tree. Which in turn makes the generated headers end up in B. The tm.h header will include generated headers that are expected in plugin/include/config/*. For example, the linux64.h header, when generating gcc-cross for x86-64, will end up in tm.h header as: include "./config/i386/linux64.h" On the other hand, the make rule `install-plugin` in gcc/Makefile.in will install the linux64.h assuming that it is generated in the sources directory and because this is not the case in our setup, the Makefile ends up installing it in plugin_includedir/`basename $$path` which ends up installing the header in [..]plugin/include as opposed to [..]plugin/include/config/i386 (as expected by the generator of tm.h). The included patch modifies the Makefile rule to match the assumption of gcc-cross being compiled out of tree. (From OE-Core rev: 92167f8e02bb6fbbe1ee6a6678525a0ae27b00a5) Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Update status of musl stddef.h patchKhem Raj2021-12-211-1/+1
| | | | | | | | | This patch has been accepted upstream (From OE-Core rev: 4c644708798f258d45dbcfa01909626de32710d4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix CVE-2021-42574pgowda2021-12-175-0/+4766
| | | | | | | | | | | | 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] (From OE-Core rev: 1276fa8b501aee1561b77538219d3cad2c796a21) Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Add CVE-2021-37322 to the list of CVEs to ignoreRichard Purdie2021-12-091-0/+3
| | | | | | | | The CVE applies to binutils 2.26 and not to gcc so ignore there. (From OE-Core rev: fea2726663a3db03170c49fceaffc632c509aeea) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Update patch status submitted->backportRichard Purdie2021-12-061-1/+2
| | | | | | | | Patch was merged to upstream gcc, update status. (From OE-Core rev: ece8f1471db443d4844d475af9c89d16ef3fbab3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Drop further unneeded precompiled header patchRichard Purdie2021-11-262-58/+0
| | | | | | | | | According to comments on the bug report from gcc developers, we no longer need to do this post gcc 10. Lets therefore drop the patch. (From OE-Core rev: 8ddc6f46d40cdcc462de23d1b1218f2ed9fd3d07) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>