summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-cross.inc
AgeCommit message (Collapse)Author
2021-07-30Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-27gcc-cross: Install linker LTO plugin for binutils toolsKhem Raj
This will ensure that ar/ranlib/nm can load the lto linker plugin like gcc-ar, gcc-nm, gcc-ranlib does, this will let the behaviour match between gcc wrappers for these tools, this should help LTO builds for packages Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-10gcc-cross: make use of the system include directories fatalRoss Burton
When building the cross GCC, configure it so that including the host system include directories is fatal, not just a warning. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26gcc: Configure all gccs with --disable-install-libibertyKhem Raj
OE uses libiberty from binutils, since its properly compiled as pic archive and applications and other libraries needing libiberty can properly link with it. With this option applied, explicit delete of libiberty headers and libraries is not required in install step, since they wont get installed in first place. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-05gcc-cross.inc: Remove test runner script generationNathan Rossi
Remove the generation of the testgcc script which could be used to run the gcc test suite against a cross compiler with a remote execution target. The same functionality can now be achieved with the 'do_check' task of gcc-runtime or with oe-selftest (for automation of execution against qemu-user/qemu-system targets). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-05gcc: Improve build reproduciblityNathan Rossi
Prevent the gcc embedded checksum from containing a checksum that was computed with build specific paths. The checksum-options file included the value of LINKER/LDFLAGS which contains DEBUG_PREFIX_MAP and STAGING_DIR_TARGET. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-29gcc-cross.inc: Prevent native sysroot from leaking into configargs.hNathan Rossi
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). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-11gcc-cross.inc: Process binaries in build dir to be relocatableNathan Rossi
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). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06gcc-cross: Fix header file corruption problemsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30gcc-cross: Clean up fixed-includesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-26recipes: Drop virtual/libc-for-gccRichard Purdie
We no longer have special "libc" for gcc so we can rely on plain virtual/libc and reduce the complexity in the dependencies. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-26gcc: Drop the -initial versions of the compilerRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-26gcc: Drop gcc-cross-initial and use gcc-cross insteadRichard Purdie
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. 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-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>
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-06-14gcc: Add recipes for gcc-7Khem Raj
Switch default compiler to gcc 7 Signed-off-by: Khem Raj <raj.khem@gmail.com>
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-02-23gcc-cross: Avoid races with gcc_stash_builddirRichard Purdie
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) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-28gcc-cross: Ensure do_gcc_stash_builddir happens before do_buildRichard Purdie
If we don't do this, things break with rm_work which removes things before the task completes causing task failures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-26gcc: Split builddir saving into its own sstate taskRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
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\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30gcc-cross: Stop target recipes depending on SDK_SYSRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28SDK: Allow changing SDKMACHINE without wiping TMP folderJuro Bystricky
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] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20gcc-cross: default linker hash style to sysvChristopher Larson
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. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-29gcc-cross.inc: drop pruning of PATCH_GET from the testgcc scriptAndre McCurdy
PATCH_GET is no longer exported by bitbake.conf, so no longer needs to be pruned from the gcc-cross do_compile() environment. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30gcc-cross.inc: overrides for libc-baremetalJuro Bystricky
Modifications to to support build for TCLIBC="baremetal" (From OE-Core rev: 9e7da158e0e7628c22013fbee34270f7d2db621f) 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>
2014-11-09gcc: Fix intermittent failures during configureMark Hatle
If configure or any of the components it uses from the shared work directory change, do_configure may fail. An existing do_preconfigure was created to handle these conditions, but a 'sed' operation was missed, and a call to gnu-configize was also missed. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-24gcc: poison default sysroot pathRichard Purdie
Various pieces of the code assume that the --sysroot option gets passed into the compiler tools. By having a "sane" default, we don't always spot when this occurs and this can later show up as breakage in sstate, or in usage of the external toolchain. We've long since talked about poisoning the default such that it will break unless the correct option is specified. This patch does just that. If this patch causes something to fail to build, it most likely means the various compiler flags and commands are not correctly being passed through to the underlying piece of software and that there is a real problem that needs fixing, its not the fault of this patch. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15gcc: remove outdated configuration optionPeter A. Bigot
--enable-libunwind-exceptions was removed from gcc at release 3.4.3 about ten years ago. Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15gcc: recipe whitespace changesPeter A. Bigot
Consistent use of whitespace in multi-line assignment, with special focus on OECONF modifications. Quotes on separate lines, four-space indentation, one value per line. Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10gcc: Ensure c++ includes are in /usr/include/c++/${BINV}Richard Tollerton
It was observed that code using STLport 4.6 fails to compile under the SDK with the following error message: .../includes/cstddef:38:46: fatal error: ../4.7.2/cstddef: No such file or directory STLport 4.6 (screwily) assumes that the C++ system headers live in a gcc-versioned subdirectory, for gcc>=3.0; cf http://sourceforge.net/p/stlport/code/ci/STLport-4.6-patch/tree/stlport/config/stl_gcc.h#l269. This assumption is *almost always* valid, because that matches the default setting of --with-gxx-include-dir. We can match that behavior by appending "/${BINV}" to our own --with-gxx-include-dir settings. Natinst-CAR-ID: 446449 Natinst-Reviewboard-ID: 57209 Acked-by: Ken Sharp <ken.sharp@ni.com> Acked-by: Ben Shelton <ben.shelton@ni.com> Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-05-01gcc-cross: Drop TARGET_CC_ARCHRichard Purdie
Since we no longer build target libs within gcc-cross, we can drop the TARGET_CC_ARCH flags and hence make it independent of tune. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30binutils/gcc/gdb: Add TARGET_ARCH to PN for all cross recipesRichard Purdie
This allows them to co-exist together in the native sysroot, with one set of cross tools per target architecture. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25gcc-cross: Improve handling of unwind.hRichard Purdie
Rather than building the whole of libgcc to obtain the unwind.h header file, simply configure it and then install the file. This avoids copying chunks of data around when we don't need to and building the same thing twice. After doing this we need to make sure the target build directory exists in the libgcc case since it will no longer be created automatically. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25gcc: Convert to use hardlinkdirRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07gcc-cross: don't use oe.path.relativeRoss Burton
Instead of using oe.path.relative, use the Python Standard Library function os.path.relpath. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-05gcc: Allow fortran to build successfully in 4.8Richard Purdie
gcc 4.8 fortran presents some challenges: * libquadmath headers need to be in the libexec include dir. It turns out to be easiest just to manually do this. * libgfortran configure needs libquadmath to be compiled. This means a separate recipe is needed (the alternative is gross hacks) * the libtool uses to link libgfortran doesn't have our improved rpath handling and puts bogus RPATHS into the libraries. We can avoid this by tweaking libtool with sed. This patch resolves those issues. Any user of fortran does need to DEPEND on libgfortran in order to trigger it to build but this shouldn't be a major issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22gcc-common.inc: Drop unused LIBGCCS_VAR variableRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22gcc-cross.inc: Clean up after mergeRichard Purdie
* Remove the duplicate EXTRA_OECONF_PATHS that is overwritten * Merge the do_compile and do_compile_prepend * Group dependency and configuration variables together Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22gcc-*-cross.inc: Fold common configuration into gcc-cross.incRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22gcc-cross: Fold common configuration into gcc-cross.incRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22gcc: Drop gcc-cross4.inc, its pointless nowRichard Purdie
The include was useful historically, its not anymore so lets remove it. This should have no functional change except on any layers directly depending on it or gcc-cross.inc but even then it would only impact sh4 and is easily fixed if there was a problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-24gcc-cross: Explicitly depend on linux-libc-headersRichard Purdie
gcc-cross cannot build without linux-libc-headers but doesn't explicitly depend on it relying on the implied dependency through libc. With cases where pieces can be installed through sstate, we now need this explicit dependency to ensure builds with partial sstate work. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-01gcc-cross.inc: Fix cross testing scriptKhem Raj
shift the cmdline argument after determining there is atleast 1 argument to shift otherwise it ends up in error when no argument is specified Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-03-03gcc-cross.inc: Fix cross testing scripts to work with dashKhem Raj
dash does not like >& so be explicit and say 2>&1 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-07gcc-cross-testing: Fix evaluation of user and target nameKhem Raj
Dont use -q to grep we pipe to /dev/null anyway all we care is the return status of grep Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-01-25gcc-cross: Don't reference machine specific variablesRichard Purdie
gcc-cross is installed into a package architecture specific directory and is not meant to be machine specific. This patch replaces MACHINE_ARCH with PACKAGE_ARCH to ensure this is really the case. This was found by examining sstate checksums. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-19[PATCH 2/4] gcc-cross: Add cross testing driver for running regression ↵Khem Raj
testsuites This script will be generated into the build directory of gcc-cross It should be testing gcc and g++. libstdc++ tests are not run since we build them as part of gcc-runtime but we can test them here by building them with 'make all' and then running the tests The script expects passwordless ssh access to target and is used in form ./arm-oe-linux-gnueabi-testgcc kraj@192.168.7.2 inside the builddir of gcc-cross Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>