summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
Commit message (Collapse)AuthorAgeFilesLines
* gcc: Remove patch causing ICE on x86_64 valgrind compileRichard Purdie2018-03-142-52/+0
| | | | | | | | | | | | | | | | | | | ../../valgrind-3.12.0/VEX/priv/host_ppc_isel.c: In function 'iselInt64Expr': | ../../valgrind-3.12.0/VEX/priv/host_ppc_isel.c:3270:1: internal compiler error: Segmentation fault | } | ^ | Please submit a full bug report, | with preprocessed source if appropriate. | See <http://gcc.gnu.org/bugs.html> for instructions. | rm -f libvexmultiarch-amd64-linux.a | Makefile:1813: recipe for target 'priv/libvex_amd64_linux_a-host_ppc_isel.o' failed Remove the patch to gcc causing this until the issue can be figured out. (From OE-Core rev: f76ee525a75dd6e443743bf723ad4511707c7f49) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc6: Backport few more patchesJuro Bystricky2018-03-1413-0/+7207
| | | | | | | | | | | | Backported series of patches from https://github.com/hjl-tools/gcc.git branch /hjl/indirect/gcc-6-branch/master which contains an IA patch series for security related issues (From OE-Core rev: 8283b4ee5290843b1033ca496759fce6229b8f91) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc6: enable FL_LPAE flag for armv7ve coresAndre McCurdy2018-03-142-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | The following commit added the FL_LPAE flag to FL_FOR_ARCH7VE, but neglected to also add it to the armv7ve compatible cores defined in arm-cores.def. https://github.com/gcc-mirror/gcc/commit/af2d9b9e58e8be576c53d94f30c48c68146b0c98 The result is that gcc 6.4 now refuses to allow -march=armv7ve and -mcpu=XXX to be used together, even when -mcpu is set to an armv7ve compatible core: arm-linux-gnueabi-gcc -march=armv7ve -mcpu=cortex-a7 -Werror ... error: switch -mcpu=cortex-a7 conflicts with -march=armv7ve switch [-Werror] Fix by defining flags for armv7ve compatible cores directly from FL_FOR_ARCH7VE, rather than re-creating the armv7ve flags independently by combining FL_FOR_ARCH7A with the armv7ve specific FL_THUMB_DIV and FL_ARM_DIV flags. (From OE-Core rev: 166863e85a614a88ae0856274cfe7657e4f1e95d) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc7/gcc6: Fix unaligned STRD issue on ARMKhem Raj2018-03-142-0/+195
| | | | | | | | | | | | | | | | | Backport https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82445 Fixes [YOCTO 12297] Cherry-picked from oe-core master 568227133be3f9f015679df3525f6c4f86304fd0 (From OE-Core rev: b6d00ad1a26bfbbe17ec394365df755624e8c4f7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 568227133be3f9f015679df3525f6c4f86304fd0) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc6: Upgrade to 6.4Khem Raj2018-03-1466-81/+24
| | | | | | | | | | | Cherry-picked from oe-core master 7874fa86cb583fe6a178b95ead09430486197197 (From OE-Core rev: 4a9eee06a6d15a23f58bc981c83138964702b735) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-6.3: Backport patch to fix ICE on ARMKhem Raj2018-03-142-0/+52
| | | | | | | | | | Fixes internal compiler error: Max. number of generated reload insns per insn is achieved (90) (From OE-Core rev: e58a1b3f0edce84103529b6761fc323be301ba07) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Disable libitm on riscvKhem Raj2018-03-141-0/+2
| | | | | | | | | | | Cherry-picked from oe-core master 21caa8bcda93ce67ef58548f7b85d0569d13d0b9 (From OE-Core rev: 0571cdcf26fe657c0a4be428dcc2abd031648b09) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Use libssp_nonshared linker specs only for ppc/muslFlorin Sarbu2017-12-113-29/+88
| | | | | | | | | | | | | | Link libssp_nonshared.a only for ppc/musl because glibc already provides the content for libssp_nonshared in libc_nonshared.a and therefore we dont need to make it universal. (From OE-Core rev: c08247e3c7c004a40281d4010186a9ace86e0e47) (From OE-Core rev: ac2aad028daca6ea3aa0c0ccea8d528e896f8349) Signed-off-by: Florin Sarbu <florin@resin.io> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-6.3.inc: Use ucontext_t not struct ucontext.Juro Bystricky2017-09-212-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: ec1c18d866c137b1fa523d0fcc29f65a28f59f44) (From OE-Core rev: 5c4c077a9182561a95f071d9c0d4a7a7f06fca98) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-common.inc: set CVE_PRODUCT to gccMikko Rapeli2017-08-291-0/+2
| | | | | | | | | | | | | | All recipes which include this are using gcc as product name in NVD like https://nvd.nist.gov/vuln/detail/CVE-2015-5276 (From OE-Core rev: 8e1b34aab4bd390f53945789c91a69883613d778) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit bd6f1430334412588c143d8029be39fe814672cd) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-componentsPeter Kjellerstedt2017-05-113-4/+4
| | | | | | | | | | The path to where to install and find the sysroot components is used in many places. This warrants it to get its own variable. (From OE-Core rev: 70a84b525470f72339568409daf84845904e4cab) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes/*-cross recipes: ignore TARGET_ARCH sstate hashPatrick Ohly2017-04-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | "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. (From OE-Core rev: 39bfa0dd3237cbca47e7fca1075d521f9d073f25) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-6.3: backport fix of check for empty string in ubsan.cJoshua Lock2017-04-102-0/+29
| | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 7a7fcbab0365b9501c737dbc02715be14dda72a3) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc/gcc/libgcc-initial: Delete do_build tasks for -initialRichard Purdie2017-04-102-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 04c053d42ab05f77b2d1ca93a0fabae44073d57e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-target.inc: create symlinks for gcov and gcov-toolChen Qi2017-03-171-0/+2
| | | | | | | | | | | Create symlinks for gcov and gcov-tool and that they can be used trivially on target. (From OE-Core rev: 5b5a506a6d81095c967304fe4ec38a4bc3dc1edd) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: move cc1 binary file to package cpp.Ismo Puustinen2017-03-171-1/+2
| | | | | | | | | | | | | | | | The file /usr/libexec/gcc/.../cc1 has been installed in package gcc instead of package cpp, because FILES statements for both packages match the cc1 binary. Move the file to package cpp and add cpp to RDEPENDS_gcc to fix the dependency. Having the cc1 binary in cpp fixes errors such as: "cpp: error trying to exec 'cc1': execvp: No such file or directory". (From OE-Core rev: 4bf84edeb6cf4ba82a21bc7ceb1da4f59d839064) Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Remove unused patchJussi Kukkonen2017-03-161-290/+0
| | | | | | | | | CVE-2016-4490 applied to gcc < 6.1.1, our version is 6.3 (From OE-Core rev: d8329861bf6f48f6e541a04062b8d1f373dfcd78) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Enable libmpx for x86-64Mikko Ylinen2017-03-101-0/+7
| | | | | | | | | | | Intel MPX was recently enabled on x86 (_append_x86) but that didn't enable it on x86-64. Explicitly enable libmpx on x86-64 too. (From OE-Core rev: 5111bd5e666408dbca7db0e6d664fe0103744253) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Fix QA issueMartin Jansa2017-03-081-0/+1
| | | | | | | | | | | | ERROR: gcc-runtime-6.3.0-r0 do_package: QA Issue: gcc-runtime: Files/directories were installed but not shipped in any package: /usr/lib/libmpxwrappers.la Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. gcc-runtime: 1 installed and not shipped files. [installed-vs-shipped] (From OE-Core rev: 3658da86e57dc87ac3957b05f853a7f1a56bfab2) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-source: add comment explaining why a function is PythonRoss Burton2017-03-041-0/+2
| | | | | | | (From OE-Core rev: ead8a8e9695ea47ecf8c8eba9cd06cc1a12cc289) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Add libmpx supprt for x86Richard Purdie2017-03-041-1/+20
| | | | | | | | | | Enabling building the Intel Memory Protection Extension library for x86. Leave this disabled in musl builds as it doesn't build there yet. (From OE-Core rev: 4b144b55acbd43b38d92d29829d8ec68ff372e9d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Fix CVE-2016-6131 in libibertyYuanjie Huang2017-02-234-1/+506
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [NVD] -- https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-6131 The demangler in GNU Libiberty allows remote attackers to cause a denial of service (infinite loop, stack overflow, and crash) via a cycle in the references of remembered mangled types. [BZ #71696] -- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696 2016-08-04 Marcel Böhme <boehme.marcel@gmail.com> PR c++/71696 * cplus-dem.c: Prevent infinite recursion when there is a cycle in the referencing of remembered mangled types. (work_stuff): New stack to keep track of the remembered mangled types that are currently being processed. (push_processed_type): New method to push currently processed remembered type onto the stack. (pop_processed_type): New method to pop currently processed remembered type from the stack. (work_stuff_copy_to_from): Copy values of new variables. (delete_non_B_K_work_stuff): Free stack memory. (demangle_args): Push/Pop currently processed remembered type. (do_type): Do not demangle a cyclic reference and push/pop referenced remembered type. cherry-picked from commit of git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239143 138bc75d-0d04-0410-961f-82ee72b054a4 (From OE-Core rev: 3c288b181a4cfecc80b48994f4dd2df285e4d1d0) (From OE-Core rev: 96a16c4181d18b8580dad243350d589586cb2b07) Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-6: Add fix for missing no-PIE flagsStephen Arnold2017-02-232-0/+23
| | | | | | | | | | | | | | | | | Fixes build on hardened PAX host with gcc-5 (linker error on relocs). Completes no-PIE config by adding to ALL_* flags variables. Borrowed from Gentoo gcc patches, tested on 2 hardened amd64 hosts. Upstream-Status: Inappropriate [configuration] Commited by: Gentoo Toolchain Project <toolchain@gentoo.org> (From OE-Core rev: c178791cd78d5a9ebc4d7b7790e647a9bafe9cf2) (From OE-Core rev: fcb236ea7cd1ac052719187fefed60ebf1a30ac8) Signed-off-by: Stephen Arnold <stephen.arnold42@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross: Avoid races with gcc_stash_builddirRichard Purdie2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its sad we need to do this but do_install and do_populate_sysroot appear to change the files in ${B} and this breaks if something works in parallel like gcc_stash_builddir. We've seen a few too many race errors on the autobuilder which appear to be from this so make things run in sequence deterministically for now. An example failure was this from do_populate_sysroot whilst stash_builddir was running in parallel: ERROR: gcc-cross-initial-arm-6.3.0-r0 do_populate_sysroot: split_and_strip_files: 'file /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/work/x86_64-linux/ gcc-cross-initial-arm/6.3.0-r0/sysroot-destdir/home/pokybuild/yocto-autobuilder/yocto-worker/ nightly-arm-lsb/build/build/tmp/work/x86_64-linux/gcc-cross-initial-arm/6.3.0-r0/recipe-sysroot-native/ usr/bin/arm-poky-linux-gnueabi.gcc-cross-initial-arm/arm-poky-linux-gnueabi-gcov' failed Exception: subprocess.CalledProcessError: Command '('patchelf-uninative', '--set-interpreter', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/build/build/tmp/sysroots-uninative/ x86_64-linux/lib/ld-linux-x86-64.so.2', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm-lsb/ build/build/tmp/work/x86_64-linux/gcc-cross-initial-arm/6.3.0-r0/sstate-build-populate_sysroot/ recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi.gcc-cross-initial-arm/arm-poky-linux-gnueabi-gcov')' returned non-zero exit status 1 Subprocess output: missing section headers (From OE-Core rev: 75b76eb08c7e344142f0326605aeb6b24e61e38e) (From OE-Core rev: 7265e99d0b4b662ca7f23d480f2845a309ac57fc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Drop now unneeded update_data callsRichard Purdie2017-02-151-1/+0
| | | | | | | | | | Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. (From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross-initial: Remove unneeded temporary sysrootRichard Purdie2017-02-091-12/+1
| | | | | | | | | | We used to need to build gcc-cross-initial against a bare sysroot to avoid contamination. With RSS, we no longer need to do this since the recipe sysroot is already bare. We can therefore simply point at that and drop this code. (From OE-Core rev: f70603887f823c14030bb738c4951d7aa3f022db) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-6: Sync gcc stddef.h with musl stddef.hKhem Raj2017-02-053-92/+92
| | | | | | | | | | | | | | | GCC provides some of std* headers including stddef.h and it syncs with glibc definitions via __needed* defines to find which datatypes are expected to be defined on top of glibc. we need same for musl. Drop unused 0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch (From OE-Core rev: 7da04721a620ad741ea50adf116e6b5afd47caa5) 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-cross: Ensure do_gcc_stash_builddir happens before do_buildRichard Purdie2017-01-281-1/+1
| | | | | | | | | If we don't do this, things break with rm_work which removes things before the task completes causing task failures. (From OE-Core rev: bfea0e6a5aee9ce15bf20bcb2781329e6281284c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Clean up unnecessary variable confusionRichard Purdie2017-01-264-46/+30
| | | | | | | | | | | | | | SDKPKGSUFFIX could only really be "nativesdk" and TARGET_SYS never contains that so the code manipulating TARGET_SYS is pointless. I suspect this once worked against MULTIMACH_TARGET_SYS which would be a different question but it no longer does. Its been cut and pasted everywhere. This patch cleans up the variable references to make things a little more readable. (From OE-Core rev: 5599cb72d17bce2ba6e2be16ef64d9a388bcfb25) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc/gcc-source: Move libcc1 manipulation into gcc-sourceRichard Purdie2017-01-263-12/+5
| | | | | | | | | | | | | | Currently there is a race where if you build -cross-canadian without building gcc (target) you see QA errors about RPATHS. I've tracked this down to this manipulation where the target gcc recipe changes libcc1 in the shared sources directory. As long as you build things in the right order, the problem doesn't occur. Since its changing ${S} move it to gcc-source and avoid the race, saving RP some head scratching about why unrelated changes failed to build cleanly. (From OE-Core rev: 626064c69b6fd1b5cead6995097f99e5fbda3f19) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Split builddir saving into its own sstate taskRichard Purdie2017-01-269-32/+41
| | | | | | | | | | | | | | | | | | When we stashed the gcc build directory for use in generating the various runtimes we were being lazy and just used the staging directory. With recipe specific sysroots this means we're copying a large chunk of data around with the cross compiler which we don't really need in most cases. Separate out the data into its own task and inject this into the configure step. We have to do that here since autotools will wipe out ${B} if it thinks we're rebuilding and we therefore have to time its recreation after that. This also takes the opportunity to remove some pointless (as far as I can tell) conditionals from the do_install code. (From OE-Core rev: dcf15ccf3cc9d55e77228ba8d526f967fc9791b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Switch to Recipe Specific SysrootsRichard Purdie2017-01-232-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is comparatively large and invasive. It does only do one thing, switching the system to build using recipe specific sysroots and where changes could be isolated from it, that has been done. With the current single sysroot approach, its possible for software to find things which aren't in their dependencies. This leads to a determinism problem and is a growing issue in several of the market segments where OE makes sense. The way to solve this problem for OE is to have seperate sysroots for each recipe and these will only contain the dependencies for that recipe. Its worth noting that this is not task specific sysroots and that OE's dependencies do vary enormously by task. This did result in some implementation challenges. There is nothing stopping the implementation of task specific sysroots at some later point based on this work but that as deemed a bridge too far right now. Implementation details: * Rather than installing the sysroot artefacts into a combined sysroots, they are now placed in TMPDIR/sysroot-components/PACKAGE_ARCH/PN. * WORKDIR/recipe-sysroot and WORKDIR/recipe-sysroot-native are built by hardlinking in files from the sysroot-component trees. These new directories are known as RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE. * This construction is primarily done by a new do_prepare_recipe_sysroot task which runs before do_configure and consists of a call to the extend_recipe_sysroot function. * Other tasks need things in the sysroot before/after this, e.g. do_patch needs quilt-native and do_package_write_deb needs dpkg-native. The code therefore inspects the dependencies for each task and adds extend_recipe_sysroot as a prefunc if it has populate_sysroot dependencies. * We have to do a search/replace 'fixme' operation on the files installed into the sysroot to change hardcoded paths into the correct ones. We create a fixmepath file in the component directory which lists the files which need this operation. * Some files have "postinstall" commands which need to run against them, e.g. gdk-pixbuf each time a new loader is added. These are handled by adding files in bindir with the name prefixed by "postinst-" and are run in each sysroot as its created if they're present. This did mean most sstate postinstalls have to be rewritten but there shouldn't be many of them. * Since a recipe can have multiple tasks and these tasks can run against each other at the same time we have to have a lock when we perform write operations against the sysroot. We also have to maintain manifests of what we install against a task checksum of the dependency. If the checksum changes, we remove its files and then add the new ones. * The autotools logic for filtering the view of m4 files is no longer needed (and was the model for the way extend_recipe_sysroot works). * For autotools, we used to build a combined m4 macros directory which had both the native and target m4 files. We can no longer do this so we use the target sysroot as the default and add the native sysroot as an extra backup include path. If we don't do this, we'd have to build target pkg-config before we could built anything using pkg-config for example (ditto gettext). Such dependencies would be painful so we haven't required that. * PKDDATA_DIR was moved out the sysroot and works as before using sstate to build a hybrid copy for each machine. The paths therefore changed, the behaviour did not. * The ccache class had to be reworked to function with rss. * The TCBOOTSTRAP sysroot for compiler bootstrap is no longer needed but the -initial data does have to be filtered out from the main recipe sysroots. Putting "-initial" in a normal recipe name therefore remains a bad idea. * The logic in insane needed tweaks to deal with the new path layout, as did the debug source file extraction code in package.bbclass. * The logic in sstate.bbclass had to be rewritten since it previously only performed search and replace on extracted sstate and we now need this to happen even if the compiled path was "correct". This in theory could cause a mild performance issue but since the sysroot data was the main data that needed this and we'd have to do it there regardless with rss, I've opted just to change the way the class for everything. The built output used to build the sstate output is now retained and installed rather than deleted. * The search and replace logic used in sstate objects also seemed weak/incorrect and didn't hold up against testing. This has been rewritten too. There are some assumptions made about paths, we save the 'proper' search and replace operations to fixmepath.cmd but then ignore this. What is here works but is a little hardcoded and an area for future improvement. * In order to work with eSDK we need a way to build something that looks like the old style sysroot. "bitbake build-sysroots" will construct such a sysroot based on everything in the components directory that matches the current MACHINE. It will allow transition of external tools and can built target or native variants or both. It also supports a clean task. I'd suggest not relying on this for anything other than transitional purposes though. To see XXX in that sysroot, you'd have to have built that in a previous bitbake invocation. * pseudo is run out of its components directory. This is fine as its statically linked. * The hacks for wayland to see allarch dependencies in the multilib case are no longer needed and can be dropped. * wic needed more extensive changes to work with rss and the fixes are in a separate commit series * Various oe-selftest tweaks were needed since tests did assume the location to binaries and the combined sysroot in several cases. * Most missing dependencies this work found have been sent out as separate patches as they were found but a few tweaks are still included here. * A late addition is that extend_recipe_sysroot became multilib aware and able to populate multilib sysroots. I had hoped not to have to add that complexity but the meta-environment recipe forced my hand. That implementation can probably be neater but this is on the list of things to cleanup later at this point. In summary, the impact people will likely see after this change: * Recipes may fail with missing dependencies, particularly native tools like gettext-native, glib-2.0-native and libxml2.0-native. Some hosts have these installed and will mask these errors * Any recipe/class using SSTATEPOSTINSTFUNCS will need that code rewriting into a postinst * There was a separate patch series dealing with roots postinst native dependency issues. Any postinst which expects native tools at rootfs time will need to mark that dependency with PACKAGE_WRITE_DEPS. There could well be other issues. This has been tested repeatedly against our autobuilders and oe-selftest and issues found have been fixed. We believe at least OE-Core is in good shape but that doesn't mean we've found all the issues. Also, the logging is a bit chatty at the moment. It does help if something goes wrong and goes to the task logfiles, not the console so I've intentionally left this like that for now. We can turn it down easily enough in due course. (From OE-Core rev: 809746f56df4b91af014bf6a3f28997d6698ac78) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-source.inc: cleanly disable do_rm_workPatrick Ohly2017-01-191-1/+1
| | | | | | | | | | | | | | | | Using "deltask" assumes that do_rm_work has been added already, which won't be the case anymore in the upcoming improved rm_work.bbclass, because then an anonymous python method will add do_rm_work. Setting RM_WORK_EXCLUDE works with the current and upcoming rm_work.bbclass and is the API that is meant to be used for excluding recipes from cleaning, so use that. (From OE-Core rev: 1f2a3cdadac1560b0e03a7be25f452ad48c27ddb) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc6: Upgrade to 6.3.0Khem Raj2017-01-0962-6/+5
| | | | | | | | | | 6.3.0 is a bugfix release in gcc 6 series (From OE-Core rev: 36ffcd1d7d2ab9dcc91e9c09623a6613a248bc69) 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>
* libgcc-common: Don't apply symlinks for nativesdkRichard Purdie2016-12-221-0/+3
| | | | | | | | | | nativesdk-libgcc doesn't need a symlink into the target space and if we do this sstate installation of the recipe can fail depending on whether it races with the cross-canadian toolchains. (From OE-Core rev: b2c1e1fe4221862e0dbf5d08960f0d0228e47c72) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-166-48/+48
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime: Reduce duplication in MIPS variants.Zubair Lutfullah Kakakhel2016-11-151-8/+1
| | | | | | | | | | | Reduce duplication in MIPS variants now that the MACHINEOVERRIDES variable is defined (From OE-Core rev: c84c884da5007539ea290587c468f30c19f568e9) Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime.inc: Add CPP support for x86-64-x32 tuneJuro Bystricky2016-10-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | Using the following setup (as specified in yocto sample code): MACHINE = "qemux86-64" require conf/multilib.conf MULTILIBS = "multilib:libx32" DEFAULTTUNE_virtclass-multilib-libx32 = "x86-64-x32" We fail to compile simple CPP programs because CPP cannot find relevant header files, looking for them in a non-existing place. To fix this, we create a symlink of the name CPP expects and point it to the corresponding existing directory. [YOCTO#10354] [YOCTO#10380] (From OE-Core rev: 9f9be229040f4f9a523a1e25afd78d5c3f4efc23) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libgcc-common.inc: Fix broken symlinks for multilib SDKJuro Bystricky2016-10-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes broken "32" symlinks for multilib settings: MACHINE = "qemuarm64" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "armv7a" and MACHINE = "qemux86-64" require conf/multilib.conf MULTILIBS = "multilib:libx32" DEFAULTTUNE_virtclass-multilib-libx32 = "x86-64-x32" [YOCTO#8642] [YOCTO#10380] (From OE-Core rev: 2810671a0f96776c135137f27a5ca52194ddd692) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-configure: Add mipsisa{32, 64}r6{el, } supportZubair Lutfullah Kakakhel2016-10-072-0/+8
| | | | | | | | | Add support for MIPS Release 6 ISA (From OE-Core rev: 4c694d5bd29c406009332e3bd388e3f6a504d103) Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-cross: Stop target recipes depending on SDK_SYSRichard Purdie2016-10-011-0/+3
| | | | | | | | | | | gcc-cross target recipes should not depend on SDK_SYS but started to after recent changes. Remove the dependency to stop this (its caused by shared code in do_install). The compiler names contain SDK_SYS so changes would be correctly handled via other means. (From OE-Core rev: 2b5761350a074de2e1a6db19621945fba39089fc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross-canadian/libgcc-common: Fixes for arm multilibRichard Purdie2016-09-301-4/+7
| | | | | | | | | | | | | | | | | | | | | | | Arm is unusual in that we force it to "linux-gnueabi" and "linux" doesn't build. This was causing problems for multilib configurations which were assuming "linux" was the default compiler rather than linux-gnueabi. This change does two things, ensures symlinks are generated for linux-gnueabi and also adapts the libgcc code to account for the difference on arm. It still needs to immediately expand/save TARGET_VENDOR but we defer deciding what TARGET_OS should be until we know TARGET_ARCH (which the multilib code may change). [YOCTO #8642] Note that sanity tests of a 32 bit arm multilib still break due to issues with the kernel headers on a mixed bit system. This looks to be a general headers issue for the platform though and a different type of bug. (From OE-Core rev: bcddc3e7eff138add031bc9c9728be5a42fa62ef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* SDK: Allow changing SDKMACHINE without wiping TMP folderJuro Bystricky2016-09-285-5/+5
| | | | | | | | | | | | | | | | | | | When changing SDKMACHINE, we may encounter an error forcing us to wipe the TMP folder. Since only SDK_ARCH is captured in the PN of the crosssdk recipes, changes to SDK_OS result in conflicts. Eventually we hit the error: ERROR: ...: The recipe <...> is trying to install files into a shared area when those files already exist. The build has stopped as continuing in this scenario WILL break things This patchset addresses the problem by SDK_SYS as the recipe name suffix instead of SDK_ARCH. [YOCTO #9281] (From OE-Core rev: d2eccccb70e809d482c493922f23aef4409cfd82) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-configure: Enable initfini-arraySaul Wold2016-09-201-0/+4
| | | | | | | | | | | | | | | | This adds the correct support for initfini-array which replaces .init and .fini with .init-array and .fini-array. There is no appreciable size difference with this change. The change is needed since configure will not correctly detect support when building cross-compilers. (From OE-Core rev: 9f8a075ab46691534e2b22d0a363b3c847394215) Signed-off-by: Haitao Huang <haitao.huang@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime.inc: add CPP support for mips64-n32 tuneJuro Bystricky2016-09-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the problem where the CPP compiler cannot find include files. The compiler is configured to look for the files in places that do not exist. When querying the CPP for search paths, we observe messages such as these: multilib configuration: MACHINE="qemumips64" require conf/multilib.conf MULTILIBS = "multilib:lib64 multilib:lib32" DEFAULTTUNE = "mips64-n32" DEFAULTTUNE_virtclass-multilib-lib64 = "mips64" DEFAULTTUNE_virtclass-multilib-lib32 = "mips32r2" ignoring nonexistent directory "<path>/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.2.0/mips64-poky-linux/32 single lib configuration: MACHINE="qemumips64" DEFAULTTUNE = "mips64-n32" ignoring nonexistent directory "<path>/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.2.0/mips64-poky-linux/ To fix this, create a symlink of the name CPP expects and point it to the corresponding "gnun32" directory. [YOCTO#10142] (From OE-Core rev: 55115f90f909d27599c686852e73df321ad1edff) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Update to final 6.2.0 releaseKhem Raj2016-08-251-8/+6
| | | | | | | | (From OE-Core rev: 38b29d6730d67cd2421b6177472f6ed78f4542e0) 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: Upgrade to 6.2 RC1Khem Raj2016-08-1962-10/+11
| | | | | | | (From OE-Core rev: 41ce4b438795108025c79cd3eec067367d53623e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Don't use vectorized builtins when Neon is not thereKhem Raj2016-07-262-0/+93
| | | | | | | | | | Fixes [YOCTO #9991] (From OE-Core rev: 0d69b3bf6cdeee866642529b6269391146333a43) 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: Fix libgcc unresolved symbols with PIE on muslKhem Raj2016-07-262-0/+86
| | | | | | | | | | | | Fixes [YOCTO #9772] (From OE-Core rev: f96da00e78999899ea7037ebc9547a87023e309a) 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-cross: default linker hash style to sysvChristopher Larson2016-07-201-0/+5
| | | | | | | | | | | | | | | | | | | | We explicitly set the hash style to gnu in our LDFLAGS. Setting the default to this in the toolchain, while convenient, actually hides bugs, as a failure to obey LDFLAGS isn't noticed. By removing this, it's not dissimilar to how we poison the sysroot -- rather than relying on the default, notice right away if somoeone isn't obeying the needed flags. This will result in a failure to obey LDFLAGS causing a GNU_HASH QA failure, which is what's often seen with external toolchains. This brings us all on the same page, and makes sure a failure to obey LDFLAGS is seen early. This is limited to cross, to retain ease of use for SDKs. (From OE-Core rev: fa436aeb3242cbfdbbe16d448d45bce8eb5b74fd) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>