summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
Commit message (Collapse)AuthorAgeFilesLines
* gcc-target.inc: Prevent sysroot from leaking into configargs.hNathan Rossi2020-03-161-0/+8
| | | | | | | | | | | | | | | | | | | Prevent the full recipe-sysroot path from leaking into configargs.h. The configargs.h header is intended to be static and unchanged as the content is used as a means of determining that a gcc plugin is built for the same gcc. This also effects the output of 'gcc -v'. Due to per recipe sysroots and staging, the sysroot path would be replaced with the sysroot local to the recipe thus changing the content of configargs.h. This change also improves gcc binary reproducibility. The sysroot path is replaced with the base target root "/". (From OE-Core rev: 0f418fccab3f67a2afaa28195263d6f24831dd56) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b8d6e2ab68ee5e341fe970b191bfd334e6d2c40b) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross.inc: Prevent native sysroot from leaking into configargs.hNathan Rossi2020-03-162-4/+7
| | | | | | | | | | | | | | | | | | | | | Prevent the native(sdk) sysroot path from leaking into configargs.h. The configargs.h header is intended to be static and unchanged as the content is used as a means of determining that a gcc plugin is built for the same gcc. This also effects the output of 'gcc --version'. Due to per recipe sysroots and staging, the sysroot path would be replaced with the sysroot local to the recipe thus changing the content of configargs.h. The sysroot path is replaced with a generic "/host" prefix which represents the host sysroot (e.g. native or nativesdk). (From OE-Core rev: 9bb270b3f12ff94b1541649078741e683020ffe9) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 84a78f46d59447eeec3d69532a7506148f64c979) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross-canadian: A missing space in an append caused an invalid optionMark Hatle2020-03-161-2/+2
| | | | | | | | | | | | | | | | | When configuring the cross-candian toolchain for a non-linux target system, the resulting gcc configuration included: --enable-initfini-array--without-headers these should have been two separate options. (From OE-Core rev: fdd3d65b690c9d460a5758cf1b83e7b2edfc9559) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7b52893632dae7bc9ac75dddc7ad625e19f41050) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-9.2: fix bug #91102 'aarch64 ICE on Linux kernel with -Os'Taras Kondratiuk via Openembedded-core2020-02-112-0/+96
| | | | | | | | | | | | | | | | | Linux kernel compilation for aarch64 triggers ICE if CONFIG_CC_OPTIMIZE_FOR_SIZE=y. The rootcause is GCC bug #91102 'aarch64 ICE on Linux kernel with -Os'. Apply the fix to 9.2. (From OE-Core rev: 14f34d32bfdaa752f5043e62750d2e7b92c4b419) (From OE-Core rev: 8ebd3b4ed4995f27c1568cf873067ce24b1998bd) Signed-off-by: Taras Kondratiuk <takondra@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Security fix for CVE-2019-15847Armin Kuster2019-09-194-0/+663
| | | | | | | | | | | Affects <= 9.2.0 Dropped Changelog changes. (From OE-Core rev: 4d56cf8743270c1998e8cb1524881a36de982c39) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross.inc: Process binaries in build dir to be relocatableNathan Rossi2019-09-161-1/+9
| | | | | | | | | | | | Process binaries within the build directory before stashing to be relocatable with ORIGIN relative rpaths. This corrects issues with rpaths being invalid when trying to use the binaries from an unstashed build directory (e.g. gcc-runtime). (From OE-Core rev: 34d9f60a8c2e98fdacbb799af11ec015bc5700f4) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-9.2: Fix risc-v dynamic linker relocationKhem Raj2019-09-061-6/+17
| | | | | | | | | | | Accidentally dropped in 9.2 update Reported-by: Ricardo Salveti <ricardo@foundries.io> (From OE-Core rev: bd21f36faeceb83ab629bd34a4e53a6947d6a469) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-8.3: remove 8.3 from zeusArmin Kuster2019-09-0653-4542/+0
| | | | | | | | | | | warrior only had one gcc so lets be consistent. This will also reduce our maintenance overhead and we don't build this either (From OE-Core rev: fa4ecadd980eff95eacd840ba0259f6272daa9aa) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-testsuite.inc: Fix ssh.exp, ensure multilib_flags are populatedNathan Rossi2019-09-061-0/+1
| | | | | | | | | | | The 'process_multilib_options' function of dejagnu also populates the 'multilib_flags' content from the '--target_board=' arguments. The 'ssh.exp' generated is missing this call ('user.exp' includes it). (From OE-Core rev: 4d3d7cac012a1f53c61a997615a761a7f25dd33f) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Add do_check task for executing gcc test suitesNathan Rossi2019-09-062-0/+148
| | | | | | | | | | | | | | | | | | | | | | Add a do_check task to implement execution of the gcc component test suites. The component test suites require execution of compiled programs on the target. The implementation provided allows for execution testing against a host via SSH or within the local build environment using qemu linux-user execution. The selection of execution is done via the TOOLCHAIN_TEST_TARGET variable, and configuration of the remote host is done with the TOOLCHAIN_TEST_HOST, TOOLCHAIN_TEST_HOST_USER and TOOLCHAIN_TEST_HOST_PORT variables. By default the do_check task will execute all check targets, this can be changed by setting MAKE_CHECK_TARGETS to the desired test suite target (e.g. check-gcc or check-target-libatomic). (From OE-Core rev: 9d5d680baa91b34dc97641f98856a51d1bb060c1) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross: Fix header file corruption problemsRichard Purdie2019-09-061-0/+3
| | | | | | | | | | | gcc's makefile can move files, replacing with the contents "timestamp". This corrupts the headers and breaks things like the gcc testsuite. Add in a fix to ensure the headers are not corrupted through their hardlink copies. (From OE-Core rev: 7e75ed5aec86b94fe7fadbed606619f84a2e58e7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-common.inc: Process staging fixme with correct target/native sysrootNathan Rossi2019-09-061-1/+1
| | | | | | | | | | | | Correct the 'staging_processfixme' call so that target sysroot and native sysroot paths are corrected when extracting the stashed build directory. This is required for 'make check' to work correctly due paths used in configuration and scripts which point at the native sysroot. (From OE-Core rev: 2c47ffb65ec16af50112f9c388dc85439c069848) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-8.3: Security fix for CVE-2019-14250Armin Kuster2019-09-062-0/+45
| | | | | | | | | | Affects < 9.2 (From OE-Core rev: c608f32995c6f067c4f56e46c527e8e9c79e2295) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-9.2: Security fix for CVE-2019-14250Armin Kuster2019-09-032-0/+45
| | | | | | | | | | Affects: <= 9.2 (From OE-Core rev: af761de211ecdcb358c6412f9e7e3398b7525cf2) Signed-off-by: Armin Kuster <Akuster@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix ldbl-128 support for muslKhem Raj2019-09-033-120/+66
| | | | | | | | | | | | | Let the patch trigger based on target triplet instead of passing via configure, this lets gcc compile for 64bit otherwise it ends up with libgcc build errors error: unable to emulate 'TF' (From OE-Core rev: 2259bf5366a9ff654dfaf15baa5df2d943383ce6) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Move STANDARD_STARTFILE_PREFIX_1 and STANDARD_STARTFILE_PREFIX_2 back ↵Khem Raj2019-09-031-45/+2
| | | | | | | | | | | | | | | | to gcc.c when compiling for ppc64, build emits additional STANDARD_STARTFILE_PREFIX_1 and STANDARD_STARTFILE_PREFIX_2 into gcc/defaults.h which is not conditional because it really want to override others with this new value, but it ends up with two definitions since it gets emitted _after_ the definition this patch moves to default.h and ends up in duplicate defines. (From OE-Core rev: 2ad649ee9027011ae7bf6fd95417237b86e394e5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross: Clean up fixed-includesRichard Purdie2019-09-011-0/+2
| | | | | | | | | | | | | | | | | | We had interesting failures where building gcc-cross-powerpc with 5.0 kernel headers, then building eudev after moving to 5.2 headers failed. gcc-cross doesn't rebuild when linux-libc-headers changes due to its listing in SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS. This shouldn't matter but fixincludes as adding asm-generic/socket.h to its filtered list which was then replacing the real header with an older version. This mismatch lead to build failures. We trust the Linux kernel headers to be ANSI safe so lets just clear out any headers and trust the originals to be correct. (From OE-Core rev: f0fcaa88b7b2977c2cb35b060747442ee9ff3dcd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Search in OE specific target gcclibdirKhem Raj2019-08-222-7/+7
| | | | | | | | | | | | We put gcclibir to be /usr/lib/<arch>/... and not default usr/lib/gcc/<arch>, therefore make the include search path also look into this directory, this should help in finding gcc headers like omp.h (From OE-Core rev: 121ce09332099ab7ea695a3495daf4f904f69ae5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-9: Upgrade to 9.2Khem Raj2019-08-2147-226/+213
| | | | | | | | | | | BugFix only release see [1] for details [1] https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=9.2 (From OE-Core rev: d00fac5bb9c479b5709ce73ae7fc0a14474a69c9) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross-canadian: Drop obsolete shlibs exclusionRichard Purdie2019-08-141-3/+0
| | | | | | | | | | | | | | | | | This is a very old change as and be inferred from the name in the comment. We've since had many changes to pkgdata including separating it to its own sysroot now so the reasons for this blanket exclusion are likely long gone. If the shlib provides were really the problem I'd much rather have a dedicated variable for that too. Removing this fixes missing dependencies on nativesdk-libc and other libs which would then happen automatically. (From OE-Core rev: 096fa15efbcb704451b2f38ceab36508ef64f07e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Move content from gcclibdir into libdirKhem Raj2019-08-143-23/+15
| | | | | | | | | | | | | | | | | | | | | 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 Move more common bits into common inc file (From OE-Core rev: e9e5744ba8b0d43c8b874d365f83071ce20bf0a1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-9.1: add back GLIBC_DYNAMIC_LINKER riscv changesRicardo Salveti2019-07-051-7/+21
| | | | | | | | | | The riscv GLIBC_DYNAMIC_LINKER changes were dropped during the gcc 9.1 update, breaking usrmerge support. (From OE-Core rev: 87a59a79292d2673d084e148a8161a676d87bf18) Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime.inc: create the correct directory before creating the symlinks in itMartin Jansa2019-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * since commit b071a1a209556158bcfcc20e3c8bd4b15373767c Author: Changqing Li <changqing.li@windriver.com> Date: Tue Jun 18 15:46:56 2019 +0800 gcc-runtime: fix C++ header mapping for n32/x32 tune gcc-runtime.do_install is failing with: ln: failed to create symbolic link 'work/aarch64-oemllib32-linux-gnueabi/lib32-gcc-runtime/9.1.0-r0/image/usr/include/c++/9.1.0/arm-oe-linux-gnueabi/bits': No such file or directory WARNING: exit code 1 from a shell command. ERROR: Function failed: do_install (log file is located at work/aarch64-oemllib32-linux-gnueabi/lib32-gcc-runtime/9.1.0-r0/temp/log.do_install.31049) There is only empty directory without the -gnueabi suffix: work/aarch64-oemllib32-linux-gnueabi/lib32-gcc-runtime/9.1.0-r0/image/usr/include/c++/9.1.0/arm-oe-linux/ and work/aarch64-oemllib32-linux-gnueabi/lib32-gcc-runtime/9.1.0-r0/image/usr/include/c++/9.1.0/arm-oemllib32-linux-gnueabi/ bits ext * make sure to create correct directory (with -${TARGET_OS suffix instead of -linux suffix) before creating the symlinks in it (From OE-Core rev: 41cbf5dc203ba74b06cb4890e1022f3f02fbd6fd) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: fix C++ header mapping for n32/x32 tuneChangqing Li2019-06-191-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SDK was unable to find the C++ header pieces correctly since it's using a generic compiler, not one specifically targeting the multilib vendor prefix and default tune. This adds the right mapping to ensure SDKs work as expected. And fix problem in below configurations: multilib configuration 1: MACHINE="qemumips64" MULTILIBS ?= "multilib:lib32 multilib:libn32" DEFAULTTUNE_virtclass-multilib-lib32 ?= "mips" DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32" MULTILIB_GLOBAL_VARIANTS_append = " libn32" require conf/multilib.conf ignoring nonexistent directory "<path>/sysroots/mips64-poky-linux/usr/include/c++/8.2.0/mips64-poky-linux/32 multilib configuration 2: MACHINE="qemumips64" MULTILIBS = 'multilib:lib64 multilib:lib32' DEFAULTTUNE = 'mips64-n32' DEFAULTTUNE_virtclass-multilib-lib64 = 'mips64' DEFAULTTUNE_virtclass-multilib-lib32 = 'mips32r2' require conf/multilib.conf For this configuration: for target gcc-runtime, need to create symlink like mips64-poly-linux --> mips64-poky-linux-gnu32 for target lib64-gcc-runtime, need to create symlink like mips64-poly-linux/32 --> mips64-pokymllib64-linux in order to avoid conflict during populate_sdk, create symlink for subfoler bits/ext for target gcc-runtime, this is ugly, but seems no better way to cover all kinds of configuration. single lib configuration: MACHINE="qemumips64" DEFAULTTUNE = "mips64-n32" (From OE-Core rev: b071a1a209556158bcfcc20e3c8bd4b15373767c) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Remove 0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patchAdrian Bunk2019-06-074-120/+0
| | | | | | | | | | | | | | | This was added 9 years ago as a workaround for a problem with gcc 4.5 on mips. Building webkitgtk works for me without it for qemumips. Debian also builds webkitgtk for 32/64 bit big/little endian mips without using this workaround. (From OE-Core rev: 7af322a995a9385f7f452c2988188de98db300c2) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: CVE-2018-12886Zhixiong Chi2019-06-042-0/+814
| | | | | | | | | | | Backprot CVE patch from the upstream: https://github.com/gcc-mirror/gcc.git [commit f98495d] https://nvd.nist.gov/vuln/detail/CVE-2018-12886 (From OE-Core rev: 889ad561093c14da5fc161b137e95e46f3f9af3f) Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: reduce the variables in symtabZhixiong Chi2019-05-292-0/+95
| | | | | | | | | | | | | | Backport the patch from upstream: https://github.com/gcc-mirror/gcc.git [commit beb921e] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=269925 Add the premark_used_variables function, meanwhile do not mark not premarked external variables in prune_unused_types_walk. (From OE-Core rev: 5f2119a309096aa8cbae666c37521b0c93da53d0) Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-9: Add recipes for gcc 9.1 releaseKhem Raj2019-05-1248-0/+3304
| | | | | | | | | | | Add maintainer entry for gcc-source-9.1.0 Delete entry for gcc-source-7.3.0 (From OE-Core rev: bbf32e24608cd9479cf26f52aa14a42411b418c5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libgfortan: Package target gcc include directory to fixKhem Raj2019-05-121-0/+1
| | | | | | | | | | | | ERROR: libgfortran-9.1.0-r0 do_package: QA Issue: libgfortran: Files/directories were installed but not shipped in any package: /usr/lib/gcc/x86_64-poky-linux/9.1.0/include /usr/lib/gcc/x86_64-poky-linux/9.1.0/include/ISO_Fortran_binding.h (From OE-Core rev: 8493fe87e241bb7aeb9075683d2e44dd1e2bc334) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-target: Do not set --with-sysroot and gxx-include-dir pathsKhem Raj2019-05-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | These options are not needed on target infact since the defaults would be good enough for compiler to find the relevant headers and libraries from compiler runtime with gcc9 it starts to strip the sysroot from gxx-include-dir which means it tries to look for gxx headers in localdir ignoring nonexistent directory "usr/include/c++/9.0.1" ignoring nonexistent directory "usr/include/c++/9.0.1/arm-yoe-linux-gnueabi" ignoring nonexistent directory "usr/include/c++/9.0.1/backward" instead of sysroot Removing these options make it behave normal (From OE-Core rev: 2996640fb3577a3c28a22f1e25eae15e8e3d46b1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: fix CVE-2018-18484Anuj Mittal2019-04-302-0/+326
| | | | | | | (From OE-Core rev: ac6af654f50aa6f3057dee0de806f5dfae10e4a8) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-sanitizers: fix -Werror=maybe-uninitialized issueMingli Yu2019-04-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | When DEBUG_BUILD = "1" added in local.conf, there comes below build error when "bitbake gcc-sanitizers": | ./../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c: In function 'elf_is_symlink': | ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized] | return S_ISLNK (st.st_mode); After commit[16643b0322 bitbake.conf: Use -Og in DEBUG_OPTIMIZATION] introduced, "-Og" added to compiler when debug build enabled. Per https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00315.html, the gcc upstream thinks the warning is a false positive and suggests to use -O2 rather than -Og or -O1 when compiling that file, so pass -Wno-error to compiler when -Og is used to silence the error. (From OE-Core rev: d8d657f082d4a86f93ce810e5d99eb5c93333d8a) Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Remove Java support variablesAdrian Bunk2019-04-162-8/+1
| | | | | | | | | Java support was removed in upstream gcc 7. (From OE-Core rev: 81551871b183f802ce3c1d0c8fb16479d9671a04) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross-canadian: Make baremetal specific code genericKhem Raj2019-04-121-5/+4
| | | | | | | | | | | | | baremetal override is not valid for cross-canadian anymore therefore use the TARGET_OS overrides Fixes e.g. https://github.com/riscv/meta-riscv/issues/117 (From OE-Core rev: 1bc122a044de280d17525c8e5ee66e81775a7d8b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libgcc: Create linux-musleabihf and linux-gnueabihf symlinksKhem Raj2019-04-091-0/+7
| | | | | | | | | | | | | When we have hard-float ABI enabled, certain tools e.g. llvm/clang expects the hf version of tuples for crt files from libgcc, therefore create a symlink to help the cause. This makes clang work with hard-float defaults on target (From OE-Core rev: f58cf0d0ff05636a70330c54f7e537f9480674c4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-8.3: add back GLIBC_DYNAMIC_LINKER riscv changesRicardo Salveti2019-03-291-2/+16
| | | | | | | | | | The riscv GLIBC_DYNAMIC_LINKER changes were dropped during the gcc 8.3 update, breaking usrmerge support. (From OE-Core rev: 299ec755de5d568f284d98c77863da4636e3fd05) Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Update to 8.3 latest on 8.x releaseKhem Raj2019-02-2854-823/+464
| | | | | | | (From OE-Core rev: 97866f4518879bdb1977e1a87ec47cc4f9b0e0eb) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libgfortran: Set license to GPL-3.0-with-GCC-exceptionSanthosh Nadig2019-02-141-0/+5
| | | | | | | | | | | libgfortran did not have the GCC exception in the same manner as libgcc had. Change-Id: If48ab6e6775da235c8fdd0ca4e835acf1e831252 (From OE-Core rev: 0b4a4b37260e719ae12fb9a8e6556759422bfc92) Signed-off-by: Santhosh Nadig <santhosn@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Add --cache-file to EXTRA_OECONFRobert Yang2019-01-241-0/+1
| | | | | | | | | | | | | This can save configure time since it runs configure multiple times: $ time bitbake gcc-runtime -cconfigure 60s -> 54s Saved 6s (From OE-Core rev: 48cc7179ffeb89adf1ba5212338b958684e43962) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix riscv multilibs for OE wayKhem Raj2019-01-032-0/+28
| | | | | | | | | | | | | | In OE we do not build mutlib like gcc does it by default, this ensures that mutlilib is virtually disabled for OE, since we hardly use same gcc to build for multiple ABIs This fixes cases in SDK where g++ is not able to find standard c++ include headers (From OE-Core rev: badbeb01dd642d9d647d3760a3ce2aa39c3567da) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Drop virtual/libc-for-gccRichard Purdie2018-12-262-2/+1
| | | | | | | | | We no longer have special "libc" for gcc so we can rely on plain virtual/libc and reduce the complexity in the dependencies. (From OE-Core rev: 122217b421f749b5fef52bea44ad6e04bc8f8d3a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Drop the -initial versions of the compilerRichard Purdie2018-12-269-126/+6
| | | | | | | | | | Separated out from the previous commit for clarity, this simply drops all the -inital pieces of gcc which are no longer needed after the previous commit. (From OE-Core rev: d84971928b68efddbdb6344b1021d998c9e26adb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Drop gcc-cross-initial and use gcc-cross insteadRichard Purdie2018-12-265-10/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need a libgcc to build glibc. Tranditionally we therefore build a non-threaded and non-shared compiler (gcc-cross-initial), then use that to build libgcc-initial which is used to build glibc which we can then build gcc-cross and libgcc against. Firstly, we can drop the glibc dependency from gcc-cross, *if* we make two changes: a) specify the minimum glibc version to support in a configure option b) create a dummy limits.h file so that later when glibc creates one, the headers structure has support for it. We can do this with a simple empty file Once gcc-cross is libc independent, we can use it to build both libgcc-initial and then later libgcc. libgcc-initial is tricky as we need to imitate the non-threaded and non-shared case. We can do that by hacking the threading mode back to "single" even if gcc reports "posix" and disable libc presence for the libgcc-intial build. We have to create the dummy limits.h to avoid compiler errors from a missing header. glibc will fail to link with libgcc-initial due to a missing "exception handler" capable libgcc (libgcc_eh.a). Since we know glibc doesn't need any exception handler, we can safely symlink to libgcc.a. With those changes, gcc-cross can be used in all places and we only need one build of gcc for each architecture. For some reason ifunc was being disabled on mips prior to these changes but afterwards became enabled but caused assertion failures. This is therefore disabled until we can debug that. (From OE-Core rev: 62b7308b8c4d2b439a15a4f7cbc6f823077bb0be) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Drop building libmpxKhem Raj2018-12-201-29/+0
| | | | | | | | | | | | libmpx is not supported any longer and infact has been removed completely from gcc-9, see https://github.com/gcc-mirror/gcc/commit/1e42d5c637e1b1f65dfddd0923dfb25676bb56e5 (From OE-Core rev: 547174fc834273af67a2f7e50a3cf6c8e3b900f4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Add missing libc dependencyRichard Purdie2018-12-181-5/+1
| | | | | | | | | | | | | | | | | | | For reasons lost in the depths of time, perhaps performane related, we only have a dependency on libc at packaging time. This is too late, as demonstrated by a recent build failure on non-IA builds where the glibc 2.29 upgrade had been removed from the build: ld: recipe-sysroot/usr/lib/../lib/libstdc++.so: undefined reference to `log@GLIBC_2.29' libstdc++ should have been rebuilt but had not as the dependency wasn't present. Add the missing dependency to avoid this problem (and drop the other form of dependency which is no longer needed). (From OE-Core rev: 14c291e1fb6324da46885b69fbd7f01b3c6b053e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Drop 7.3 since 8.2 is working fine for us2.7_M1Richard Purdie2018-12-1561-4857/+0
| | | | | | | | We've had gcc 8.2 around for long enough that 7.3 can be removed now. (From OE-Core rev: 20aea61385e1a53ac245353899277ba20104ed2f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-7.3, gcc-8.2: Use variable SYSTEMLIBS_DIR instead of hardcoding it for ppc64Serhey Popovych2018-12-154-0/+64
| | | | | | | (From OE-Core rev: d4063951acabae0b69fc195ec1e0f2dcd02a5d01) Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Enable secureplt for powerpc64 target tooSerhey Popovych2018-12-151-1/+1
| | | | | | | (From OE-Core rev: 72c3381ef5b18c784707ef361ee02f07770220f6) Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: More places to patch to disable ldbl 128 for musl on PPCSerhey Popovych2018-12-152-2/+731
| | | | | | | | | | | | | | | | | | | 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). (From OE-Core rev: dec8e566810525563b33c2877d10db0a70965d6d) Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix preprocessor redefines for header pathesSerhey Popovych2018-12-152-72/+0
| | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 0622a4168aac627b44547f72fe93589cf1050e42) Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>