aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
AgeCommit message (Collapse)Author
2018-05-09gcc-runtime: Disable gcc version of libsspKhem Raj
libssp is implemented fully in glibc as well as in musl so we really do not need the gcc version of this library except may be for mingw, where we keep it enabled anyway gcc in OE is built with the knowledge that C library already provides libssp implementation, we should therefore not need the gcc implementation of same. libssp_nonshared piece is a detail which is needed when gcc is the compiler, in glibc this is part of libc_nonshared.a already and libc_nonshared.a is linked always when linking with -lc becuase libc.so in glibc is actually a linker script GROUP ( /usr/lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /usr/lib/ld-linux-x86-64.so.2 ) ) which automatically links in the needed runtime bits, this however is not the case for musl, where core SSP APIs are implemented in full but compiler specific runtime isn't, for this we add a new package called libssp_nonshared which generate the needed runtime stub and gcc is already carrying patch to link to libssp_nonshared.a on musl This should fix a long standing problem where static PIE executable were not buildable with OE since it was conflicting SSP implementation one from C library and the other one from gcc and we end up with duplicate symbol errors during linking. Backport a patch from trunk which enhances enable|disable-libssp to not only disable building libssp but also not emit the gcc specs to use it for subsequent linking when stack-protector options are used on compiler cmdline Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-04-06gcc-sanitizers: Update supported architecturesDan McGregor
aarch64 has been supported since GCC 5.1, sparc has been supported since 4.9, and S390 since 7.1. Also mark as broken entirely with musl. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-19gcc: Do not use --with-linker-hash-style if LINKER_HASH_STYLE is emptyKhem Raj
We allow to set LINKER_HASH_STYLE to be empty so this would fail since --with-linker-hash-style needs an argument and cant be empty Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-19gcc: backport patch to fix ICE in MIPS64 target in G++Mark Hatle
Backport a patch to fix an ICE when compiling for MIPS64. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-11gcc: drop patch that is already upstreamAlexander Kanavin
Due to patch fuzz, it was applied again, so the same code sequence was repeated twice. Not sure if that caused any bugs, but certainly wasn't the right thing to do. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-03gcc: Fix internal compiler error for PPC test case "gcc.dg/vmx/7d-02.c"Mark Hatle
Fix an internal compiler error on PPC from building a specific test: $ $CC -S 7d-02.c 7d-02.c: In function รข: 7d-02.c:11:5: internal compiler error: in copy_to_mode_reg, at explow.c:612 vec_st(v, i*16,p); ^~~~~~ The failure appears to happen on all optimizations levels as well. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-03gcc: Fix test case issue when SSE is not enabledMark Hatle
Whenever "-mno-sse" is used, "-mfpmath" should be set to 387. The test case should be modified accordingly as below: /* { dg-additional-options "-mno-sse -mfpmath=387 " { target { i?86-*-* x86_64-*-* } } } */ Original patch from: RAGHUNATH LOLUR <raghunath.lolur@kpit.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-29gcc-7.3: Drop upstreamed musl cpuinfo patchKhem Raj
This patch is already in gcc-7-branch https://github.com/gcc-mirror/gcc/commit/6e6c7fc1e15525a10f48d4f5ac2edd853e2f5cb7 Thanks nsz for noticing it Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29meta: don't use deprecated functions from utils.bbclassRoss Burton
These functions were moved to meta/lib/oe in 2010 and the base_* functions in utils.bbclass were intended to be a short-term compatibility layer. They're still used in a few places, so update the callers to use the new functions. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-26gcc: Upgrade 7.2 -> 7.3Richard Purdie
The static PIE patch was updated by Juro Bystricky <juro.bystricky@intel.com> to work with gcc 7.3. This update from the stable gcc 7 branch includes the retpoline functionality which is useful to assist with recent security issues. Two backported patches were dropped as they're included in 7.3. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-25classes/recipes: Convert SkipPackage -> SkipRecipeRichard Purdie
The new name is much more consistent with what this actually means. We put the pieces in place to rename everything a while back but looks like we forgot to actually do it! Fix that now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-11gcc: Add missing flex-native dependencyRichard Purdie
This is needed for all stages of the cross/target/canadian compilers and without it (and with indirect gcc dependencies disabled), the steps fail. Add missing dependencies. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-05gcc-runtime: improve reproducibilityJuro Bystricky
Remove various build host references from packages: libstdc++ libstdc++-staticdev gcc-runtime-dbg The references are removoved by correctly setting various compiler -fdebug-prefix-map settings. There are two main issues: The default DEBUG_PREFIX_MAP variable references WORKDIR, however, gcc sources are in a shared folder (work-shared)/ Additionally, DWARF info seems to store symlink names but gcc seems to resolve symlink names referenced in -fdebug-prefix-map. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-20gcc: Drop 6.4Richard Purdie
We've had 7.x around for long enough now that it should be tested and usable everywhere, drop 6.4. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-20libgfortran: Fix breakage from libbacktrace dependencyRichard Purdie
In 6.x and 7.x gcc, libgfortran now needs libbacktrace. Enable building of this so that libgfortran builds correctly. [YOCTO #12394] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-10gcc: backport patch to fix miscompilation on mips64Chen Qi
Backport a patch to fix miscompilation on mips64. We've observed strange behaviour of `systemctl status <xxx> on qemumips64. The output of the command is like `systemctl show <xxx>', which is incorrect. The problem is due to the miscompilation of gcc for mips64 platform, thus backporting patch from upstream to fix this problem. [YOCTO #12266] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-10Revert "gcc: fix miscompilation on mips64"Ross Burton
This reverts commit b656fd9267b1f36d46ca20a1c0bcfaedbf7df438.
2017-11-10gcc7/gcc6: Fix unaligned STRD issue on ARMKhem Raj
Backport https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82445 Fixes [YOCTO 12297] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08gcc: fix miscompilation on mips64Chen Qi
We've observed strange behaviour of `systemctl status <xxx> on qemumips64. The output of the command is like `systemctl show <xxx>', which is incorrect. This patch is from gcc bugzilla's attachment. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803 The patch hasn't been merged into gcc. But it does solve the above problem. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05gcc6: Upgrade to 6.4Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05gcc-runtime: Disable libitm on riscvKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-10-16gcc: Backport fix for a segfault on riscvKhem Raj
seen during kernel compile Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-10-09gcc-6.3: Backport patch to fix ICE on ARMKhem Raj
Fixes internal compiler error: Max. number of generated reload insns per insn is achieved (90) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18gcc-6.3.inc: Use ucontext_t not struct ucontext.Juro Bystricky
Use ucontext_t not struct ucontext in linux-unwind.h files. Current glibc no longer gives the ucontext_t type the tag struct ucontext, to conform with POSIX namespace rules. This requires various linux-unwind.h files in libgcc, that were previously using struct ucontext, to be fixed to use ucontext_t instead. This is similar to the removal of the struct siginfo tag from siginfo_t some years ago. Backport of patches by Joseph Myers, taken from https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=249957 [YOCTO #12083] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-16gcc: Upgrade to 7.2.0 releaseKhem Raj
Drop upstreamed patches Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-11gcc7: fix potential segmentation faultJuro Bystricky
Under some rare circumstances we may end up with GCC segmentation fault. This was observed with versions of sysmacros.h, which contain macros with embedded warning messages : When trying to actually display the warning, we may end up with a segmentation fault instead. The reason is the actual warning message gets parsed (the text is unquoted) and words in the message such as "not", "and" etc. are interpreted as operators CPP_NOT, CPP_AND. When the time comes to display the warning, the code uses wrong structure to access the "name" corresponding to the operators. [YOCTO #11738] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-24gcc-common.inc: set CVE_PRODUCT to gccMikko Rapeli
All recipes which include this are using gcc as product name in NVD like https://nvd.nist.gov/vuln/detail/CVE-2015-5276 Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17gcc-7.1: Update the libsanitize stack_t patch to upstreamed versionKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17gcc-cross: Fix linker and fortran symlinksKhem Raj
If we used -fuse-ld gcc option, then it does not work ending in collect2: fatal error: cannot find 'ld' compilation terminated. This is because we are not creating proper symlinks for BFD and Gold linker in gcc installation Secondly, we end up with dangling fortran compiler symlinks if fortran is not enabled when confguring gcc, therefore create these symlinks only when fortran support is enabled in gcc Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-11gcc: Fix libssh_nonshared linker specs for ppc/muslKhem Raj
The change to link libssp_nonshared.a only for musl was to move spec file changes to config/linux.h under a conditional when DEFAULT_LIBC == LIBC_MUSL which worked fine for all but ppc since gcc for ppc provided its own linux.h overrides which are used. This patch duplicates the change in those headers too Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-11gcc: Use ucontext_t instead of ucontextKhem Raj
glibc 2.26 does not expose struct ucontext anymore Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-11gcc-sanitizer: Fix build with glibc 2.26Khem Raj
sigaltstack is no more exposed by glibc see (bug 21517) therefore adjust to use stack_t instead Use res_state typedef instead of referring to __res_state struct Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-08gcc: Link libssp_nonshared.a only on musl targetsKhem Raj
glibc already provides the content for libssp_nonshared in libc_nonshared.a therefore we dont need to make it universal. This also fixed build issues on glibc when linking statically and using -fstack-protector Fixed errors like /mnt/a/oe/build/tmp/work/i586-bec-linux/aufs-util/3.14+gitAUTOINC+bdfcc0dcfc-r0/recipe-sysroot/usr/lib/../lib/libc.a(stack_chk_fail.o): In function `__stack_chk_fail': /usr/src/debug/glibc/2.26-r0/git/debug/stack_chk_fail.c:27: multiple definition of `__stack_chk_fail_local' /mnt/a/oe/build/tmp/work/i586-bec-linux/aufs-util/3.14+gitAUTOINC+bdfcc0dcfc-r0/recipe-sysroot/usr/lib/../lib/libssp_nonshared.a(libssp_nonshared_la-ssp-local.o):/usr/src/debug/gcc-runtime/7.1.0-r0/gcc-7.1.0/build.i586-bec-linux.i586-bec-linux/i586-bec-linux/libssp/../../../../../../../../work-shared/gcc-7.1.0-r0/gcc-7.1.0/libssp/ssp-local.c:47: first defined here collect2: error: ld returned 1 exit status Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-07-08gcc7: Enable static PIEKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-07-08gcc: Introduce a knob to configure gcc to default to PIEKhem Raj
GCCPIE flag which is empty by default adds "--enable-default-pie" configure option for harderned distros We do not require to add -fpie -pie flag externally anymore Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-07-06libgfortran: Add missing fincludesRicardo Ribalda Delgado
ERROR: libgfortran-6.3.0-r0 do_package: QA Issue: libgfortran: Files/directories were installed but not shipped in any package: /usr/lib/gcc/x86_64-poky-linux/6.3.0/finclude /usr/lib/gcc/x86_64-poky-linux/6.3.0/finclude/ieee_features.mod /usr/lib/gcc/x86_64-poky-linux/6.3.0/finclude/ieee_arithmetic.mod /usr/lib/gcc/x86_64-poky-linux/6.3.0/finclude/ieee_exceptions.mod Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06libgfortran: Add missing dependency gcc-crossRicardo Ribalda Delgado
Due to the fact that the recipe uses INHIBIT_DEFAULT_DEPS, we need to manually add the cross compiler as a dependency. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-27meta: Add/fix missing Upstream-Status to patchesRichard Purdie
This adds or fixes the Upstream-Status for all remaining patches missing it in OE-Core. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27meta: Fix malformed Upstream-Status tagsRoss Burton
Fix a variety of spelling and format mistakes to improve the ease of reading the tags programatically. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16meta: Remove further uclibc remnants (inc. patches and site files)Richard Purdie
Some of these are clearly dead, e.g. one binutils patch reverts the effects of the earlier one. This also removes the uclibc site files. We now have mechanisms to allow these to be extended from another layer should someone ever wish to do that. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16gcc: Drop 5.4 seriesRichard Purdie
We now have gcc 6 and gcc 7 recipes, the gcc 5 series can be dropped as we're no longer going to support it for targets. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16meta: Drop further remnants of uclibc supportRichard Purdie
uclibc support was removed a while ago and musl works much better. Start to remove the various overrides and patches related to uclibc which are no longer needed. uclibc support in a layer would still be possible. I have strong reasons to believe nobody is still using uclibc since patches are missing and I doubt the metadata even parses anymore. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14gcc_7.1.bb: disable thumb on armv5tKhem Raj
It results in same link errors like armv4t Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-06-14gcc: Add recipes for gcc-7Khem Raj
Switch default compiler to gcc 7 Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-06-14gcc-cross-canadian: Use ${target_includedir} for compatibility with meta-microMike Crowe
meta-micro puts headers in /include rather than /usr/include in the sysroot. ${target_includedir} means that the correct path will be used automatically. Signed-off-by: Mike Crowe <mac@mcrowe.com> Acked-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-12gcc-configure/gcc-target: Move arm6/7 config to target onlyRichard Purdie
We only build one gcc-cross per architecture and having target specific flags means gcc-cross would rebuild. These flags are really for the on target case, so they should be set in gcc-target only. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-10bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-componentsPeter Kjellerstedt
The path to where to install and find the sysroot components is used in many places. This warrants it to get its own variable. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12recipes/*-cross recipes: ignore TARGET_ARCH sstate hashPatrick Ohly
"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. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-08gcc-6.3: backport fix of check for empty string in ubsan.cJoshua Lock
Building gcc-cross-initial with GCC7 on the host fails due to the comparison of a pointer to an integer in ubsan_use_new_style_p, which is forbidden by ISO C++: ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] || xloc.file == '\0' || xloc.file[0] == '\xff' Backport the fix from upstream GCC to enable the build with GCC 7 Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-08glibc/gcc/libgcc-initial: Delete do_build tasks for -initialRichard Purdie
We've had a lot of users running into RSS issues where -initial recipes were being installed into sysroots alongside their counterparts and causing overlapping files issues. In general this was through do_build dependencies. Such dependencies are bad in general and I'd encourage people to compare the taskgraphs with using a more specific dependency like do_populate_sysroot, do_image_complete or do_deploy as often the more specific dependency will result in a much cleaner build. Regardless, we don't want -initial dependencies getting in the way like this and there are cases a do_build dependency could make sense. Deleting the do_build task in these cases makes sense since this is not a build "endpoint" we'd ever want a user to use, its a behind the scenes piece of bootstrappping. Unfortunately to make this work, we need a newer bitbake version which has a bitbake bug fixed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>