summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/libgcc-common.inc
AgeCommit message (Collapse)Author
2022-08-17bitbake.conf: Handle S and B separately for debug mappingRichard Purdie
We don't really need to keep S and B separate for debug source purposes and there shouldn't be source references in WORKDIR that isn't S and B either. Separating these out simplifies the shared-work directory handling for gcc and should also help fix external source usage. Therefore handle S and B in DEBUG_PREFIX_MAP separately and clean up other code. Indentation is reduced here as it is introduced on every compiler commandline so minimising it is helpful. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-17libgcc/gcc-runtime: Improve source reference handlingRichard Purdie
This code was some of the earliest reproducible build work we did. To correctly handle the encoding of file paths, we used relative build paths to run configure which resulted in relative build paths in the binaries. We now have more modern approaches used elsewhere with the prefix remapping options. These work best with absolute paths, not relative ones. As such, drop the relative path mangling and switch to using prefix mapping exclusively on absolute paths. This makes the code matc the rest of the system and triggers the correct code to be added in /usr/src/debug. We have to include both file-prefix and debug-prefix since the assembler only looks at debug-prefix. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-25libgcc: Fix standalone target builds with usrmerge distro featureKhem Raj
Ignore the rmdir cmd if using usrmerge distro feature since the intention is to delete /lib or /lib64 but not libdir under /usr and base_libdir = libdir when usrmerge is enabled in distro Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-28bitbake.conf/recipes: Introduce add DEV_PKG_DEPENDENCY to change ↵Richard Purdie
RDEPENDS:${PN}-dev There is a pattern that several recipes need to break the dependency of ${PN}-dev on ${PN}, most often as ${PN} may be be empty. Add a new variable to parameterise this and allow it to be changed more easily. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>
2018-06-15tclibc-newlib: Adds a new TCLIBC variant to build with newlib as C libraryAlejandro Enedino Hernandez Samaniego
This patch adds the posibility to build using TCLIBC=newlib. It allows users to build baremetal applications with the use of a C library. Newlib is a lightweight C library meant to be used on embedded systems, it is meant to be easily portable for new platforms and to provide basic functionality on them, by design, it provides stubs for some of these core functions declared as weak, so they can be built correctly and then linked against some other library which provides specifics about the platform being used if need be, libgloss takes care of these in some cases, but it can also be extended, this patch also allows the user to easily add other libraries to it by adding them to NEWLIB_EXTENDED for this specific reason. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
2017-01-26gcc: Clean up unnecessary variable confusionRichard Purdie
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. 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-22libgcc-common: Don't apply symlinks for nativesdkRichard Purdie
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. 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-10-08libgcc-common.inc: Fix broken symlinks for multilib SDKJuro Bystricky
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] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-29cross-canadian/libgcc-common: Fixes for arm multilibRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-12libgcc: remove duplicate configure optionsAndre McCurdy
The original fix [1] was made redundant by the followup [2]. [1] http://git.openembedded.org/openembedded-core/commit/?id=d774bb2d10f2c05900f87dcc53f073433ca02121 [2] http://git.openembedded.org/openembedded-core/commit/?id=d7799a17d5e802db3f8d16bdc824aae81538e675 Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-05-13libgcc: Ensure that gcc configure options are passed to libgcc tooKhem Raj
libgcc uses certain options from EXTRA_OECONF as well, curently we are ignoring them, as a result we do not configure libgcc to match cross gcc in some cases e.g. ppc/musl should have used 64bit long doubles but it went for 128-ldbls which is default, works on glibc but not on musl Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13libgcc: Ensure that gcc configure options are passed to libgcc tooKhem Raj
libgcc uses certain options from EXTRA_OECONF as well, curently we are ignoring them, as a result we do not configure libgcc to match cross gcc in some cases e.g. ppc/musl should have used 64bit long doubles but it went for 128-ldbls which is default, works on glibc but not on musl Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28gcc: use relative path for configure scriptHongxu Jia
The absolute path (/path/to/configure) caused __FILE__ to be an absolute path. If 'assert' invoked, it uses __FILE__, and build path would be in elf files. In assert.h ... .# define assert(expr) \ ((expr) \ ? __ASSERT_VOID_CAST (0) \ : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)) ... Which triggered buildpaths QA issue: ... | libgcc-5.3.0: File work/core2-64-poky-linux/libgcc/5.3.0-r0/packages-split/ libgcc-dev/usr/lib64/x86_64-poky-linux/5.3.0/libgcc.a in package contained reference to tmpdir [buildpaths] ... Use relative path to run configure can fix the problem. [YOCTO #7058] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30libgcc-common.inc: overrides for libc-baremetalJuro Bystricky
Added TCLIBC="baremetal" specific overrides. (From OE-Core rev: 044f989b34e46f919e6b28860d7a1b396b2c3808) 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>
2015-07-31libgcc: Fix symlink handling in cross-arch multilib casesRichard Purdie
The symlink being generated needs to match both the current arch (e.g. mips or mips64) but also use the underlying TARGET_SYS without multilib extensions to TARGET_VENDOR or extensions to TARGET_OS. The way multilib changes TARGET_VENDOR meant this code did not have a way of removing that change. The method of removing some TARGET_OS suffixes was also not working. By using immediate expansion to run this code, we can run before the multilib code changes it and get the original values. We then use the *current* TARGET_ARCH value in case this does get changed by the multilib since we need to point at the right compiler (32 bit one for 32 bit code). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-28gcc/libgcc-common.inc: Add missing 'fakeroot' to two tasksMark Hatle
Without the fakeroot flag the two tasks may create files or symbolic links that end up being owned by the user and not root:root as expected. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-03gcc: Rework shared workRichard Purdie
The current implementation of shared work for gcc is at best confusing. It relies on the fetch/unpack/patch tasks having exactly the same stamps and if this gets broken for some reason, its hard to figure out what the problem is. It also leads to complex code in bitbake. The benefits of shared work for gcc are clear but a better approach is needed. This patch adjusts things so that a single new recipe (gcc-source) provides the fetch/unpack/patch/preconfigure tasks, the rest of gcc simply depends on these tasks and have no fetch/unpack/patch tasks of their own. This means we should get the significant benefits (disk usage/performance) of the single source tree but in a way which has less potential for problems and is easier for people to understand. The cost is an extra recipe/some inc files which is probably a good tradeoff. 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-25libgcc: Spit out common code into libgcc-common.incRichard Purdie
Prepare the ground for the creation of libgcc-initial by splitting common libgcc code into a libgcc-common.inc file. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>