Commit Graph

108 Commits

Author SHA1 Message Date
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
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-11-10 11:51:19 +00:00
Khem Raj 74d1c5e4ad gcc-4.6: Backport fix for PR32219
This fix is needed for gold to work. Otherwise
connman fails to build since it used hidden weak
symbols.

See

http://gcc.gnu.org/bugzilla/PR32219
http://www.cygwin.com/ml/binutils/2008-02/msg00239.html

The fix proposed to gcc had reviews which were not addressed hence the
patch is not yet
applied to gcc upstream.

connman can also have workaround by changing the visibility of these
symbols to be default
 __attribute__ ((weak, visibility("hidden")))

to

 __attribute__ ((weak, visibility("default")))

in include/plugin.h

(From OE-Core rev: 3cb2b003db7371b3a47d02c08352a262e1e419b4)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-24 17:27:17 +01:00
Khem Raj 53f7342562 gcc-configure-sdk: Point sysroot to correct location
(From OE-Core rev: c9883733fed9267b1a936c08500a4caf8dc52d3d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-24 17:27:13 +01:00
Khem Raj 180caee1e2 gcc-4.6: Backport PR46934 fix
We have been hitting this issue on ARM/thumb and
have a workaround in place to compile samba
http://git.openembedded.org/openembedded/commit/recipes/samba/samba_3.2.15.bb?id=4ba7aa07c0dcd28f94515ff9927e2a04403fcf15
This backport should fix the gcc bug

(From OE-Core rev: 75f7269a7a1da2494768d4be63c44b12c5cfeeeb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-20 17:13:36 +01:00
Khem Raj 6a85e28e95 gcc-4.6: Upgrade SRCREV to latest FSF 4.6 branch
(From OE-Core rev: b1af6951e14d645fe861f289011c91ab6f1b6865)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-20 17:13:35 +01:00
Richard Purdie d2b4818c5c gcc: Drop old version 4.5.1
(From OE-Core rev: 59443380286010eda07f1434e918a3af8c8a31a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-12 14:12:09 +01:00
Richard Purdie add6cf80b9 gcc/binutils: Disable NLS/gettext dependencies
We force the C locale when running builds for determinstic error messages. We
therefore have no need to NLS support in binutils cross or gcc cross.

We also don't need the standard base/autotools dependencies for our
toolchain components since we don't autoreconf these.

This patch turns off nls and cleans up some of the dependencies resulting
in a slightly less convoluted set of build dependencies.

(From OE-Core rev: 54a3e2ee37003fc56af0339f857b0b6442790c26)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-10 10:00:07 +01:00
Khem Raj 11d435684b gcc-4.6: Update to tip of FSF gcc-4_6-branch
(From OE-Core rev: ed7deecb9503420fbf8071445e077c32beda8dc4)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-28 21:44:51 +01:00
Khem Raj 46ad3b0e2c gcc-4.6: Use --with-linker-hash-style configure option
Depending upon what hash style is in use this uses
the right flag for setting the hash style type. This
fixes the QA errors about missing GNU hash style reported
in gcc-runtime build particularly libgcc

(From OE-Core rev: f8edd9b872bcf14da037bd0b501ccc8c6fcc79bf)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-28 14:58:51 +01:00
Richard Purdie 2829e21efc gcc: Fix two QA issues
a) There is a QA warning from a .so being present in a main package.
   In the case of the plugin library for gcc, this is allowed.
b) Remove the unwanted libiberty.a file with the strange path. We
   don't need/want this and this removes an unpackaged file warning.

(From OE-Core rev: ca36a3edf9cede9fa0d73ba1a9538ab467cb5e3c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-28 14:58:49 +01:00
lumag fd3a960ec1 gcc: include libgcov.a into libgcc-dev package
First, this lib is usefull for coverage analysis-enabled building.
Second, this fixes the warning about unpackaged files in libgcc recipe.

(From OE-Core rev: 2a807a98d8be3f486e703321773db32657c71d9e)

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-28 14:58:48 +01:00
Dmitry Eremin-Solenikov 9948a81b39 gcc: fix possible problems with nscd compilation during eglibc-nativesdk build
Long time ago a066e7ca90a28d5681c5fa895a29e999ed7c88b was committed to
address possible problems with compilation of nscd during
eglibc-nativesdk build. Problems were related to the way gcc searches
for headers to check if it should enable it's own stack smash protection
bits or it can relay on eglibc for it.

However after 934d38530c9a67562e53d4034aee5531f0f26750 things got
broken, as for gcc-crosssdk-intermediate packages:
1) EXTRA_OECONF is ignored
2) headers are installed in a different location than expected by that
patch.

This results in eglibc-nativesdk build broken on some systems (e.g. mine
Debian x86_64 squeeze). Fix that by providing with-headers options to
crosssdk-intermediate gcc configuration.

(From OE-Core rev: 63494d638b7a9b88a5b7d7a02d2afcb3aa0fa064)

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-28 14:58:48 +01:00
Dmitry Eremin-Solenikov cac6eb9c11 gcc: include plugin-related headers into packaged SDK
Include headers necessary to compile gcc plugins into cross-canadian gcc
packages.

(From OE-Core rev: d12aa92b3dac1109d510e7b6f74055d1ab927817)

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-22 08:49:10 +01:00
Saul Wold 0efd5b3d11 gcc: add patch for ice 50099, which caused lttng-ust not to build
[YOCTO #1381]

This patch came from from GCC Bugzilla via Khem

Cc: Khem Raj <raj.khem@gmail.com>
(From OE-Core rev: 61dac2f6f68bc46d8f3f6f7a8757924f103c7c54)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-07 22:54:17 +01:00
Richard Purdie c04ae9bf71 gcc: Fix multilib baselib confusion
Commit 35fa8dc5f7 changed the gcc recipes to use
baselib for the compiler location. This is fine as long as baselib happens to
match the platform multilib definition which is enabled at the time.

This patch fixes things so that gcc will honour whatever ${base_libdir} is
set to re-allowing suitable customisation of the system layout.

[YOCTO #1362]

(From OE-Core rev: bc5f293b151b9ba0d6660814d88ee5041efce318)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-02 18:25:11 +01:00
Kumar Gala 5d463057b4 gcc-4.5.1: Drop gcc-poison-parameters.patch, replace with bug fix patch
The gcc-poison-parameters was added specifically to deal with an issue
on ppc targets and a bug when we build with -Os -frename-registers.

This bug below reports the issue and is fixed in gcc-4.6.x/mainline:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44618

Backport patch to gcc 4.5.1.

(From OE-Core rev: fef385e37e82a0eec743fbd1da11021b9e7158b5)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-29 13:47:59 +01:00
Kumar Gala 36cda02715 gcc-4.6: Drop gcc-poison-parameters.patch as its not need
The gcc-poison-parameters was added specifically to deal with an issue
on ppc targets and a bug when we build with -Os -frename-registers.

This bug below reports the issue and is fixed in gcc-4.6.x:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44618

(From OE-Core rev: 0fabe078a31591f41c3fdabe5aa9de1111ef82c7)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-29 13:47:59 +01:00
Robert Yang b6bd7133c2 bitbake meta-toolchain with gcc 4.5.1 failed
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-23 18:23:33 -07:00
Khem Raj a0dc330b4a recipes: Delete patch=1, its default and replace pnum with striplevel
Some place pnum=1 is used which is removed as well since
striplevel=1 is default

(From OE-Core rev: 4e108857e0d40105f7ecbc55e99bd6c367bb7386)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-23 18:23:30 -07:00
Richard Purdie 0427c2bd68 libgcc: Remove fetch/unpack/patch noexec stamps
libgcc now uses shared work directories so we cannot mark
these tasks as noexec. If we do, the tasks may not run
and hence gcc may not get patched for example which
results in failures.

This patch simple removes the flags since they're unneeded.

(From OE-Core rev: e2c03b2a80efeeea2298bdba385671d0ae208e95)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-19 15:26:04 -07:00
Richard Purdie 8f8facbed4 gcc: Various fixups to ensure consistent gcc builds
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
be1f70d68b 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-08-11 19:08:02 +01:00
Kumar Gala 35fa8dc5f7 gcc: use ${base_lib} to match gcc default configuration
Rather than tweaking MULTILIB_DIRNAMES & MULTILIB_OSDIRNAMES like is
done for x86-64 via 64bithack.patch.  We can just go with gcc defaults
and utilize ${base_lib} for where to find gcc libs.

(From OE-Core rev: cfcc282efef30ea1988ccbe14835254a999584ea)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-08 13:41:19 +01:00
Kumar Gala 7d3c85eb5e gcc-4.6: Add support for the e5500 PowerPC core
Implements basic e5500 enablement in gcc, with a scheduler, -mcpu
flag, etc...

(From OE-Core rev: b4f6fb7033d3798cae32d42bce5a0f8402ad57c1)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-05 17:16:01 +01:00
Kumar Gala be1f70d68b gcc: Fix setting of GLIBC_DYNAMIC_LINKER
The sed regex in do_configure_prepend was producing the following result:

 #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "/lib64/ld-linux-x86-64.so.2"

instead of removing the leading "/lib" or "/lib64".

Now we have it do:

 #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"

Additionally, with the regex fixed the manipulation of SYSTEMLIBS_DIR
needs to be removed.

(From OE-Core rev: b343436d03fa5690b16ee8ef5d4a738c5194b301)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-03 17:46:47 +01:00
Richard Purdie 6c936b4b1a gcc: Drop part of the 64bithack patch which is no longer used
Since we now handle GLIBC_DYNAMIC_LINKER in gcc-configure-common.inc:

's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'

we can drop the patch which changes a hardcoded value for this.

No PR bump since there is no code change resulting from this, its just
a cleanup.

There is still a valid question over the remainder of this patch and its
interaction with multilib configurations.

(From OE-Core rev: 036faf66c3889cd8bf4cd3c9b97c80f008f3c6e2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:18:51 +01:00
Richard Purdie c18aa8d065 multilib: Add support for compiling recipes against multiple ABIs
This patch adds the core multilib class which can be used along with a
parameter specifying the mutlilib to use in BBCLASSEXTEND.

The MLPREFIX variable is added and can be used in cases where its too
difficult to dynmaically work out where a mutltilib prefix is needed
to be added to a variable.

This includes:
  * SHLIBSDIR and PACKAGE_ARCH fixes from Lianhao Lu.
  * PACKAGE_DYNAMIC mapping from Yu Ke
  * PACKAGE_INSTALL mapping from Yu Ke
  * RPROVIDES mapping from Yu Ke
  * TARGET_VENDOR fix from Mark Hatle
  * Ignorning *-native-runtime dependnecies as well as *-native from Yu Ke
  * Map PKG and ALLOW_EMPTY from Dongxiao Xu
  * Ensure RCONFLICTS and PKG field dependencies are remapped (from Dongxiao Xu)
  * Ensure PN and MLPREFIX are set at the same time to ensure consistent BPN values (Yu Ke)

(From OE-Core rev: 5d9453049915db48ec4b5972e12287417ebb61a2)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:18:40 +01:00
Kumar Gala d43437307d gcc-4.6: Fix packaging of native toolchains
The base gcc package is missing liblto_plugin.so.  If we try a simple
hello world compile we get something like:

root@p5020-ds:~# gcc hello.c
gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.

We need to include liblto_plugin.so in the base gcc package and not
gcc-dev.

(From OE-Core rev: 282326a188467edf6caef21b07a7e51288674245)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:34 +01:00
Phil Blundell bc48729ee2 libgcc: correct mode on libgcc_s.so.1 to ensure it gets stripped
If the library is installed without execute permission then package.bbclass
will not consider it for stripping.  This is particularly unfortunate because
there seems to be a bug somewhere else which is causing all DSOs to end up with
a NEEDED dependency on libgcc_s, even if they don't actually require it, and
hence it is getting installed in all images (for uclibc on i586 at least).

(From OE-Core rev: b3724a67ad70f509181555e6be98e1eb3b184bb7)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 15:32:57 +01:00
Ilya Yanok ef2c0ef14c gcc_4.5.1: add pr45886.patch
Add fix for PR45886 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45886

(From OE-Core rev: d639fad9ce510e0a1c64c66bbda48b4a2436327b)

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 15:27:36 +01:00
Ilya Yanok eb83c44761 gcc_4.5.1: add pr45052.patch
Add fix for PR45052 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45052

(From OE-Core rev: 296b2e7d90f11dc50d8c2e90bd2062733fd3d47c)

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 15:27:36 +01:00
Ilya Yanok 30c9f6c933 gcc_4.5.1: add pr45094.patch
Add fix for PR45094 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45094

(From OE-Core rev: 2f1f920415dcf7f899d173352bf8924714352158)

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 15:27:36 +01:00
Ilya Yanok b2e49a6b70 gcc_4.5.1: add pr44606.patch
Add fix for PR44606 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44606

(From OE-Core rev: 5ec03dc1f80e437d5660aa3e0c7db9b561603d49)

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 15:27:35 +01:00
Ilya Yanok 44f59d24d9 gcc_4.5.1: add pr44290.patch
Add fix for PR44290 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44290

(From OE-Core rev: 94311ba57cd95b6b163d162587c6318da8c3b16a)

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 15:27:35 +01:00
Ilya Yanok 94a6e47402 gcc_4.5.1: add pr43810.patch
Add fix for PR43810 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810

Building on powerpc-eabi* with --enable-target-optspace
still fails for me though.

(From OE-Core rev: 7dc3865dd88cec50e4fb0660ea678736ec0eb46c)

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 15:27:35 +01:00
Ilya Yanok aa18b3cc98 gcc_4.5.1: fix arm_bswapsi2.patch
Acoording to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44392
correct fix should be
TARGET_EITHER && (arm_arch6 || !optimize_size)
not
TARGET_EITHER && (arm_arch6 && !optimize_size)

(From OE-Core rev: 7306e0113a158418acc9cc13d2e82125cb772389)

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 15:27:35 +01:00
Kumar Gala e10a1d6cd3 gcc: Add gcc configure for PowerPC e500v2/SPE embedded floating point ABI
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-07-20 15:27:34 +01:00
Koen Kooi 3c9206f97d gcc-package-target: don't fail if the .la files we try to delete are not there to start with
This fixes:

| rm: cannot remove `/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/gcc-4.5-r39.1+svnr175127/image/usr/libexec/gcc/arm-angstrom-linux-gnueabi/4.5.4/*.la': No such file or directory
| ERROR: Function 'do_install' failed (see /OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/gcc-4.5-r39.1+svnr175127/temp/log.do_install.19514 for further information)
NOTE: package gcc-4.5-r39.1+svnr175127: task do_install: Failed

(From OE-Core rev: 4db073061bdd1d3361ff90d309049a1621f06704)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-19 17:34:20 +01:00
Phil Blundell 51128384a7 gcc-4.6: update to 4.6.1 release
Set SRCREV to match the point at which 4.6.1 was released, update PV appropriately.

(From OE-Core rev: d575031f3bcd7acbc7dae25f17a60f0d493643fb)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-19 17:34:17 +01:00
Saul Wold 2429773613 gcc: Fix packaging correctly
[YOCTO #1233]

This fix directly packages the contents in  and adds the lib*.so
correctly to the -dev package.

(From OE-Core rev: d3c5f93714165e5c089ce80194f2be07e31d920c)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-12 15:00:46 +01:00
Nitin A Kamble 860d8fdd27 gcc-runtime: fix installed but unpackaged files
gcc recipes has changed, currently ${PV} is 4.6 and ${BINV} is 4.6.1 version.

Fix these QA warnings.
WARNING: For recipe gcc-runtime, the following files were installed but not shipped in any package:
WARNING:   /usr/share/gcc-4.6.1/python/libstdcxx/__init__.py
WARNING:   /usr/share/gcc-4.6.1/python/libstdcxx/v6/__init__.py
WARNING:   /usr/share/gcc-4.6.1/python/libstdcxx/v6/printers.py

(From OE-Core rev: e29a8601c7b028696527c70aa0d4862157ce2d81)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08 16:39:10 +01:00
Richard Purdie 42242d6aee gcc: Fix unpackaged files warnings, broken symlink and superfluous files
(From OE-Core rev: 696f00b67217242f3a372d070c2473f8ced639ed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-07 10:57:45 +01:00
Richard Purdie 463b38f605 gcc-package-cross: Switch to using pattern matching to detect when to stash libgcc into the sysroot
Currently, we stash libgcc if PN is gcc-cross or gcc-crosssdk. This patch
changes it to work for *gcc-cross and *-gcc-crosssdk which means it
will patch for multilib extended toolchains.

(From OE-Core rev: a39cbed2ec887fb83335ba93e92d971c84a0f4d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 11:39:09 +01:00
Richard Purdie 2f22d86f4c gcc: Remove unneeded module .la file and .so link
This avoids a QA error.

(From OE-Core rev: 6d284d656e129be526e272f61405d1b004fe0ec9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 11:39:08 +01:00
Richard Purdie 21effd6640 gcc: Fix removal of libiberty.a
The changes in commit 553a92c442bc3a35d1520a22e640a3a0e377b8f7 were not applying correctly
due to the error: "find: paths must precede expression"

This patch corrects the find syntax.

[YOCTO #1199]

(From OE-Core rev: b8d72e3af93ff9e2808fef4fe7b9d00b68bf9715)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 11:39:08 +01:00
Phil Blundell b78173f176 binutils: allow distro to select gold as default linker
But ensure that gcc-cross-intermediate always uses ld.bfd since
(e)glibc won't build with gold.

(From OE-Core rev: 207a9013670560d62c793a66f01e19f4760a71a8)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-30 22:42:04 +01:00
Robert Yang 64be701305 gcc-4.6: share work directories
* Fix configure and Makefile to read the defaults.h and t-oe from ${B},
  so that the ${S} can be shared.

* Change ${S} to the shared source directory.

(From OE-Core rev: c1ec5100da76d35afb91de7353599564e5b653dc)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-30 20:56:34 +01:00
Robert Yang e4f43aa5df gcc-4.5.1: share work directories
Fix configure and Makefile to read the defaults.h and t-oe from ${B},
so that the ${S} can be shared.

(From OE-Core rev: d8c6f6e01421455db30eeb4b0882720874dcb31b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-30 20:56:34 +01:00
Robert Yang 3e08c1f078 Share gcc work directories
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-06-30 20:56:33 +01:00
Koen Kooi fb38001789 gcc-cross-kernel: update to match new toolchain sysroot layout
The versioned gcc binary gets installed and the needed binutils symlinks are made.

To make it fully work again the following is needed in kernel recipes/classes:

PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel:"

(From OE-Core rev: 3f0ee65462acf199b69ed18897ca65755907340e)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 15:06:53 +01:00
Mark Hatle 1d640c9436 gcc: Fix file ownership
Most of the files that end up in the gcc include dir and other
misc files scattered throughout the install get the build users
uid and gid.

(From OE-Core rev: db99a65b3e93dfacc27ea821c788f15b5de3a497)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 13:55:40 +01:00