aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-common.inc
AgeCommit message (Collapse)Author
2012-09-25gcc-common.inc: Consider multilib when renaming libgcc for debian'nessKhem Raj
When doing multilib builds rpm does not find libgcc1 for lib32 multilib because its not honoring the debian renaming scheme for libgcc-multilib. Lets add MLPREFIX to fix it. (From OE-Core rev: 9327ca868667b15f29af3123611d6f56b4249a63) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-21gcc: Use 4.7.2 release tarballKhem Raj
This avoids the SVN or git fetcher issues for gcc and the tar is mirrored around the world so it will not be slow Fixes [YOCTO #2908] (From OE-Core rev: 5e03d1e83d0536a2fc69a88d3e5407108836203f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-21bitbake.conf/gcc-common.inc: Fix STAMPCLEAN expressionRichard Purdie
The globs used for STAMPCLEAN were too greedy matching gcc-cross-initial stamps for gcc-cross for example. This patch resolves that problem making the assumption that PV starts with something numeric. This assumption should hold in most cases and has a better failure case that the current situation. (From OE-Core rev: d7fbc70b6c6ac629d2a23ac16ab45461f88b4b26) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20bitbake.conf/gcc: Add clean masks for stamp filesRichard Purdie
This takes advantage of new bitbake functionality to clean up stale stamp files when creating new stamp files. [YOCTO #2961] (From OE-Core rev: e21b6c04e512a3bc2339a20045b7041f1d26e859) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17gcc: Convert do_headerfix into a definitive patchKhem Raj
do_headerfix task is essentially editing configuration headers in sources which can well be maintained as a patch which is easier to spot errors (if any) than dynamically edited source tree (From OE-Core rev: ddd344e9acef88d614473581266569ce14716ccc) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09gcc-common: Don't use "is" for comparing strings, use "=="Kartik Mohta
Needed because the equality check was failing here even though upon printing the LHS and RHS were the same. As per http://stackoverflow.com/a/2987975/64537, using "is" compares the memory addresses of the two objects which is not what we want here. We just want to compare the values. (From OE-Core rev: 7fd82cc90a48302ed42b6bfa962bb0de2c652b45) Signed-off-by: Kartik Mohta <kartikmohta@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-11gcc-common: Replace use of TARGET_ARCH with TRANSLATED_TARGET_ARCHKhem Raj
TARGET_ARCH is poured into TRANSLATED_TARGET_ARCH for gcc-cross family or gcc-crosssdk family of recipes we have to check for TRANSLATED_TARGET_ARCH (From OE-Core rev: 03f7322b1f4e1b1cf465a46cba3b82573384ab9e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-11gcc-common: Enable hardfloat ABI when target is armKhem Raj
We need to check target to be arm before enabling hard-float ABI. There are crossdk targets or candian-cross targets built for arm and we should not enable it for those class of recipes. (From OE-Core rev: f48bb903218e14ba15dab452e8bb43ba25b9ea44) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24gcc: Grok for callconvention-hard to enable hard floatKhem Raj
If callconvention-hard is set then we build gcc defaulting to hard-float ABI (From OE-Core rev: 88dee5cf5265d3ea26fc9d471fc6155e48935dc7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie
sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-21gcc: Excluding the DATE/SRCDATE from do_patch dependency.Lianhao Lu
Corrected the error introduced by commit afb400e of dropping DATE/SRCDATE out of the vardepsexlude list of do_patch. (From OE-Core rev: 6546096d068b51cc9cf4557cdb35aee6f62838d5) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-10gcc: Ensure same sstate hashes for shared soruce directoryLianhao Lu
Ensure do_patch have the same sstate hashes for nativesdk variants of gcc family recipes, since they share the same source directory. (From OE-Core rev: afb400e9c3ddac604906bde44df5da29a6c134d9) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-24gcc-common.inc: Fix commentRichard Purdie
(From OE-Core rev: a4a98b6d6273d4e716afbff0880d0ac2ff7be0a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-24gcc-common.inc: Ensure WORKDIR doesn't adversly affect sstate checksumsRichard Purdie
Changes in WORKDIR were changing the do_patch stamps between gcc-crosssdk and gcc-cross. This excludes the variable since in this case, we don't need want those changes to affect the signatures. (From OE-Core rev: 0de85d2ca3bc9674323302a35995dfddb6044a71) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-23gcc: Ensure that the shared source directory shared the same sstate hashesRichard Purdie
The fetch/unpack/patch/headerfix tasks are shared and hence their sstate hashes should also match. Sadly this is not the case since: a) gcc-runtime applies an additional patch b) The do_headerfix task was missing from libgcc c) The do_headerfix task is a shell task and hence depends on all exported variables which can vary between cross and target recipes. To fix this, the patch moves the patch to the common code, adds the headerfix task to a common include file and disabled shell dependencies on the do_headerfix task since its clear in this case we don't need thsoe dependencies since we just call sed. With this patch applied, all these recipes now share common sstate checksums. (From OE-Core rev: 2c4569801a710f34a695b8d2a0ee7fc127fb34e4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-30Fix multiarch DISTRO_FEATUREJulian Pidancet
Make get_gcc_multiarch_setting more elegant. Use a dictionnary to store the config options and replace bb.data.getVar with d.getVar. Remove i686 from the architecture list because it doesn't seem to be a valid TARGET_ARCH any more in OE. Configure gdb (gdb and gdb-cross) with --enable-64-bit-bfd if multiarch DISTRO_FEATURE is present (From OE-Core rev: 0b42b2fc118bef8ce0d1473b146673182f5d1f78) Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-29Introduce multiarch DISTRO_FEATUREJulian Pidancet
This patch introduces a distro feature which enables gcc to produce both 32bit and 64bit code, and enables binutils to operate on both 32bit and 64bit binaries. It differs from multilib toolchains in that it does not require to compile a version of the libc for each architecture variant. However, the code produced for the secondary architecture will not be linkable against the libc. v2: - Renamed the feature name from "biarch" to "multiarch". The GCC installation manual claims that the mips-linux can be made a tri-arch compiler (http://gcc.gnu.org/install/configure.html) - For x86_64, the compiler is made bi-arch by default, so nothing has to be done in particular. - I analyzed the gcc/config.gcc from GCC sources and added in this patch all the architectures that could be made biarch with the version of gcc currently used in OE, which are powerpc, and sparc, in addition to x86. mips and s390 will probably be supported in future versions of gcc. For x86 and sparc, only the --enable-targets=all option is valid to make this work (this option doesn't have any other side effects than making the compiler bi-arch). For powerpc, I used the --enable-targets=powerpc64 option (although 'all' also works). Note: - Untested on powerpc and sparc. But I believe it works the same as with x86. - gcc in meta-toolchain is also made multiarch. (From OE-Core rev: 99e295ef30ba02db3966c66619807c037ef5089f) Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-23bitbake meta-toolchain with gcc 4.5.1 failedRobert Yang
Fixes bug [YOCTO #1386] 1) Add the following lines to conf/local.conf: SDKGCCVERSION="4.5.1" GCCVERSION="4.5.1" 2) bitbake meta-toolchain The we will notice the error that sed can't find the directory: ${TMPDIR}/work-shared/gcc-${PV}/gcc-${PV}-${PR} we had changed the name of S from gcc-${PV} to gcc-${PV}-${PR}, but didn't update meta/recipes-devtools/gcc/gcc-common.inc, so fix S in gcc-common.inc would make it work. (From OE-Core rev: 282773ff3e0f365c08ae7e8fe759029f33e575b1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-11gcc: Various fixups to ensure consistent gcc buildsRichard Purdie
We ensure that: * the shared work directory contains PR and ensure PR values are consistent across gcc builds * the regexp to handle library directories is in a specific task and run once This avoids breakage that was seen in incremental builds after commit be1f70d68b6b75772ebab8bdff683ddd7c42b0cd where the interpretor could become corrupted. This was due to the sed expression corrupting the source directory. (From OE-Core rev: 970af6b09e1d69041b0d82fa56ace19543405eb1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20gcc: Add gcc configure for PowerPC e500v2/SPE embedded floating point ABIKumar Gala
The e500v2 core utilizes a unique floating point programming model / ABI. We utilize TARGET_FPU = "ppc-efd" to distinguish this choice (Embedded scalar single-precision floating-point). When building the toolchain for this ABI we need configure gcc with --enable-e500_double. (From OE-Core rev: 5136c4ad6279c1593301f6dde9b959ad26a2fd0f) Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-30Share gcc work directoriesRobert Yang
This patched is derived from Richard, make gcc use the shared source directory during the different building: 1) Make gcc-cross, gcc-cross-initial, gcc-cross-intermediate and gcc-runtime share the same source directory. 2) The source directory is ${TMPDIR}/work-shared/gcc-${PV}, for example: tmp/work-shared/gcc-4.5.1 3) Fix do_clean to clean the shared source directory and stamps 4) gcc uses sed and creates config files against ${S} which means the directory should not be shared. Change the way to make it work: * The configure option --with-headers=${STAGING_DIR_TARGET}${SYSTEMHEADERS} can replace the sed command, see the code in configure: if test "x$with_headers" != x; then glibc_header_dir=$with_headers This has the same effect as the sed command: sed -i 's:^\([ ]*\)glibc_header_dir=\"${with_build_sysroot}/usr/include\": ... so add the --with-headers=${STAGING_DIR_TARGET}${SYSTEMHEADERS} to gcc-configure-cross.inc( not add to gcc-configure-common.inc, since not all the gcc building need this, the one which has its own do_configure doesn't need it). * Move t-oe from ${T} to ${B}/gcc, so that the patched Makefile.in can read it easily, please see the commit for gcc-4.5.1 and gcc-4.6.0. * Use the defaults.h in ${B}/gcc instead of ${S}/gcc, and the patched configure.ac(configure) can read it correctly, please see the commit for gcc-4.5.1 and gcc-4.6.0. * The gcc-crosssdk.inc used sed to edit ${S}/config/*/linux*.h to change the GLIBC_DYNAMIC_LINKER, which made the source incompatible. To make the source compatible: - Use: sed -i ${S}/gcc/config/*/linux*.h -e \ 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#' so entries in the files that look like: #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" would become #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR"/ld-linux-x86-64.so.2" and we define SYSTEMLIBS_DIR in defaults.h. NOTE: #define GLIBC_DYNAMIC_LINKER64 (SYSTEMLIBS_DIR "/ld-linux-x86-64.so.2") doesn't work in in the following define: #define LINUX_DYNAMIC_LINKER \ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) so use #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR"/ld-linux-x86-64.so.2" 5) Add do_configure_prepend to gcc-configure-common.inc and remove the one in gcc-crosssdk.inc, this makes it easy to share the source, otherwise we need do extra changes in gcc-configure-sdk.inc. 6) Use "cat > file <_EOF" to replace the "echo > file" (From OE-Core rev: 934d38530c9a67562e53d4034aee5531f0f26750) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-29Revert "bitbake/gcc: Enable a shared common source tree"Richard Purdie
This reverts commit 12b163dbd81cafafec1ebe3c4039c65af60ee261 as it was an unintended change for master
2011-03-28bitbake/gcc: Enable a shared common source treeRichard Purdie
This patch is a quick proof of concept to show how source code could be shared between recipes which use ${B} to have a separate build directory compared to source directory ${S}. Issues: a) gcc uses sed and creates config files against ${S} which means the directory should not be shared. Need to change the way that works. b) Could be extended to cover eglibc except there is a patch applied against nativesdk versions which again makes the source incompatible. c) Need to clean up the layout in work-shared and make a directory level deeper to ensure patch separation. d) clean task does not remove stamps Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11meta: Update mirror urls to new format and update yocto project urlsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2010-08-27Major layout change to the packages directoryRichard Purdie
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>