aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
AgeCommit message (Collapse)Author
2018-12-15gcc: Drop 7.3 since 8.2 is working fine for usRichard Purdie
We've had gcc 8.2 around for long enough that 7.3 can be removed now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15gcc-7.3, gcc-8.2: Use variable SYSTEMLIBS_DIR instead of hardcoding it for ppc64Serhey Popovych
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15gcc: Enable secureplt for powerpc64 target tooSerhey Popovych
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15gcc: More places to patch to disable ldbl 128 for musl on PPCSerhey Popovych
There are four functions using TFmode type (128bit) that isn't available when building with musl. Move each of them from common ppc64-fp.c to individual files referenced from t-float128 that used when ldbl 128 enabled at configure time. For gcc-7.3 if -mfloat128 is given -mfloat128-type must be given too. Exclude ibm-ldouble.c when ldbl 128 isn't enabled at config time. Build and boot tested with musl (no float128) and glibc (float128 and ibm128 on PowerPC64). Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15gcc: Fix preprocessor redefines for header pathesSerhey Popovych
When building for powerpc64 using musl as C library we get preprocessor macro redefinition errors since gcc-configure-common.inc adds #define of STANDARD_STARTFILE_PREFIX_1 and STANDARD_STARTFILE_PREFIX_2 to gcc/defaults.h after ones added by a patch that ensures target gcc headers included. Since gcc-configure-common.inc included in every gcc recipe either directly or indirectly, do_configure task is not disabled/deleted for any of them (except gcc-source.inc) and there is no precondition that skips gcc/defaults.h patching in gcc-configure-common.inc::do_configure_prepend() we can just remove conflicting parts of mentioned above patch to have single place where start files prefixes defined in do_configure() task. Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22gcc: Select proper ARC CPU when build for targetAlexey Brodkin
By default GCC for ARC is configured with ARC700 CPU. This means when we don't pass "-mcpu=xxx": a) Code will be compiled for ARC700 b) Libs will used for ARC700 And if we happen to run on ARCv2 core like ARC HSxx we won't be able to use target gcc w/o "-mcpu=xxx" which is not very convenient as we want to build "target" toolchain but not canadian-cross. Note the trick here is we set TUNE_PKGARCH in just 2 values, it is either "arc700" for all ARCompact cores (ARC750 & ARC770) and "archs" for all ARCv2 cores (ARC HS38 & HS48), see [1]. This gives us usable defaults. For cross-compilation we use TUNE_CCARGS for fine-tuning depending on which HW features we have on the current target so that we may have HW feature A & B or B & C or A & B & C, see [2]. [1] https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsys/blob/master/conf/machine/include/tune-arcv2.inc#L4 [2] https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsys/blob/master/conf/machine/include/tune-arcv2.inc#L34 Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17libgcc/gcc-runtime: Disable thumb mode on armv6Richard Purdie
Without this the build fails for armv6t targets due to invalid assembler instructions in thumb mode. [YOCTO #12929] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-09gcc: Remove unnecessary --with-mpfr and --with-mpc when cross compilingMike Crowe
Passing --with-mpfr and --with-mpc when compiling the cross compiler appears to be at best unnecessary, and at worst can cause build failures. Firstly, the paths passed in gcc-cross-canadian are using the undefined ${layout_exec_prefix}. This results in configure passing -I${STAGING_DIR_HOST}/include twice to the compiler when it's doing its test builds. This is mostly pointless since that directory doesn't exist with the default oe-core configuration - the correct path would be -I${STAGING_DIR_HOST}/usr/include. The path for mpfr passed in gcc-cross is correct, but unnecessary since it is just the sysroot default. I've gone back through the history, and it seems that these lines (or similar ones) were originally added way back in 8800d8be25295dd7c7d84dde62c3be4df8e43346 for GCC 4.1.1 in 2006! I asked[1] if anyone knew why this was necessary but received no response, so I can only assume that no-one knows. I've successfully built for various targets with this patch applied and observed no problems. [1] http://lists.openembedded.org/pipermail/openembedded-core/2018-September/155971.html Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-22gcc: Fix specs generation for ARCAlexey Brodkin
GCC's built-in spec for LD is missing a space after "--eh-frame-hdr" thus with the next option merged together they are not understood by LD and so LD fails. Back-port from upstream GCC, see: https://github.com/gcc-mirror/gcc/commit/892142379c6b99fe8c3ebdfe0b79e2a435228c1d Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-09-21gcc: Disable libitm for ARCAlexey Brodkin
The libitm is not supported on ARC, so disable it Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-09-05gcc: Merge two related patches togetherRichard Purdie
These patches may as well be merged together as they affect the same code and things are clearer this way. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-31gcc-7.3: Backport fixes for std::pair high memory usageJoel Stanley
C++ applications that contain a specfic use of std::pair with tempates cause the build to require many gigabytes of RAM to build. This is a fix that was applied to the upstream GCC 7 branch. Change-Id: I213f96d1d6332e2dce5765482ff3413f1abd7ff8 Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-31gcc-7.3: Fix build on ppc64le hostsJoel Stanley
When building on ppc64le hosts that have GCC 8 (such as Ubuntu 18.10) the GCC build bootstrap fails. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162 This is a fix that was applied to the upstream GCC 7 branch. Change-Id: I7796d2a999ec420805dd1c6cf0a1ecba1de5a897 Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-30gcc-8: Upgrade to 8.2 releaseKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-06-28gcc-8: define GLIBC_DYNAMIC_LINKER relative to SYSTEMLIBS_DIR on riscvRicardo Salveti
Refresh 0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch to also define GLIBC_DYNAMIC_LINKER relative to SYSTEMLIBS_DIR on riscv. Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-21gcc-8: Enable fp arch extention when fpu is availableKhem Raj
This is especially needed when defaulting to hard-float ABI Fixes errors e.g. cc1: error: -mfloat-abi=hard: selected processor lacks an FPU Fixes [YOCTO #12795] 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>
2018-06-18gcc-target.inc: configure gcc for armv7ve targets to default to armv7veAndre McCurdy
Originally these ARM specific EXTRA_OECONF options were applied to both gcc for the target and gcc-cross. That lead to a compromise being made: gcc on the target was configured to default to an ARM architecture which was at least compatible with the target (but not necessarily an exact match) and gcc-cross was configured default to armv7a for both armv7a and armv7ve (to avoid gcc-cross rebuilds when switching between the two). However, when these ARM specific EXTRA_OECONF options were moved from gcc-configure-common.inc into gcc-target.inc (ie they were made to apply only to gcc on the target) the compromise no longer needed to be made. http://git.openembedded.org/openembedded-core/commit/?id=851937dde81de2a9ef54c5f19a78fb12fb82afd4 Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18gcc-8: Fix spurious mcpu/march conflict for xscaleKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18gcc8: drop stray uClibc specific patchAndre McCurdy
The patch was previously removed for gcc7 but came back with gcc8. http://git.openembedded.org/openembedded-core/commit/?id=f71bc69e5b7581c53071055b694bb0dbfe4b4a87 Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-15gcc-8: enable build-id in gcc-cross-initialRichard Purdie
Apply patch from Taras Kondratiuk <takondra@cisco.com> to gcc 8.x too. Normal gcc-cross has build-id feature enabled by default, so most of target binaries has build-id. But libc (glibc, musl) doesn't have build-id, because it is built with gcc-cross-initial. Build-id is a useful feature, so enable it for gcc-cross-initial too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-15gcc: enable build-id in gcc-cross-initialTaras Kondratiuk
Normal gcc-cross has build-id feature enabled by default, so most of target binaries has build-id. But libc (glibc, musl) doesn't have build-id, because it is built with gcc-cross-initial. Build-id is a useful feature, so enable it for gcc-cross-initial too. Signed-off-by: Taras Kondratiuk <takondra@cisco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-06-15tclibc-newlib: Adds a new TCLIBC variant to build with newlib as C libraryAlejandro Enedino Hernandez Samaniego
This patch adds the posibility to build using TCLIBC=newlib. It allows users to build baremetal applications with the use of a C library. Newlib is a lightweight C library meant to be used on embedded systems, it is meant to be easily portable for new platforms and to provide basic functionality on them, by design, it provides stubs for some of these core functions declared as weak, so they can be built correctly and then linked against some other library which provides specifics about the platform being used if need be, libgloss takes care of these in some cases, but it can also be extended, this patch also allows the user to easily add other libraries to it by adding them to NEWLIB_EXTENDED for this specific reason. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
2018-06-15newlib: Adds newlib and libgloss recipesAlejandro Enedino Hernandez Samaniego
Newlib is a C library that is intended to be used on embedded systems. It is a conglomeration of several library parts, all under free software licenses that make them easily usable on embedded products. Newlib provides a C library alternative that can run on baremetal, mainly for resource constrained devices. Libgloss is the BSP part of the C library, which can be easily modified to port for new hardware platforms. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
2018-06-11gcc-sanitizers: don't use thumb for armv[45]Martin Jansa
* otherwise it fails with: sanitizer_linux.s:5749: Error: lo register required -- `ldr ip,[sp],#8' @ 1538 "../../../../../../../../../work-shared/gcc-8.1.0-r0/gcc-8.1.0/libsanitizer/sanitizer_common/sanitizer_linux.cc" 1 swi 0x0 cmp r0, #0 bne 1f ldr r0, [sp, #4] ldr ip, [sp], #8 blx ip mov r7, #1 swi 0x0 1: mov r0, r0 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-11gcc-runtime_8.1.bb: disable ifuncs in libatomic for arm archKhem Raj
This will solve the mcpu/march conflicts we get when -mcpu=cortex-a7 is passed on cmdline since it will become incompatible with default ifuncs in libatomic which is using armv7-a Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-08gcc-8: Enabled mspe options for rs6000 ppc backendKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-08gcc-8: Disable float128 for ppc/muslKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-08gcc-8: Disable libssp for non mingw targetsKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-08gcc-8: Add recipes for 8.1 releaseKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-15gcc-sanitizers: Package new liblsan objects built with gcc8Khem Raj
Fixes installed-vs-shipped QA errors Reported-by: Dan McGregor <danismostlikely@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-15gcc7: drop stray uClibc specific patchAndre McCurdy
The patch seems to have been left behind when other uClibc specific patches were purged from gcc in: http://git.openembedded.org/openembedded-core/commit/?id=ec03023d2165b49a52b83bac1ea2f0bfded7b852 Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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>