generic-poky/meta
Khem Raj af9c75c8f5 gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option
Currently we have a problem in our cross compiler since we use
/usr/include/c++ to be default gxx-include-dir and then expect
the patch we did to do the relocation w.r.t. sysroot however it
does not quite work so and we end up gxx-include-dirs not respecting
sysroot. A small test case would be

tst-unique4.cc

and it would fails like

tst-unique4.cc:1:18: fatal error: cstdio: No such file or directory
compilation terminated.

weather we use --sysroot or not it does not matter

arm-oe-linux-gnueabi-g++ -S tst-unique4.cc
--sysroot=/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/sysroots/qemuarm

failed in same way.

so we redo the GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch based on upstream
submitted patch which tries to relocate the gxx-include-dir and to
achieve the relocation it has to be specified w.r.t to --with-sysroot
directory. e.g.

--with-sysroot=${SYSROOT}
--with-gxx-include-dir=${SYSROOT}/usr/include/c++

if we configure gcc like above then it becomes relocatable when
we run the compiler and specify --sysroot=<blah> then g++ will search
for gxx-headers under <blah>/usr/include/c++

if sysroot is not defined then it will use the default sysroot
and gxx-include-dir will be w.r.t. default sysroot.

Tested on qemuarm

/arm-oe-linux-gnueabi-g++ -S tst-unique4.cc
--sysroot=/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/sysroots/qemuarm
-v
...
 /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/sysroots/qemuarm/usr/include/c++
 /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/sysroots/qemuarm/usr/include/c++/arm-oe-linux-gnueabi
 /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/sysroots/qemuarm/usr/include/c++/backward
...

and if I now change --sysroot to something else

/arm-oe-linux-gnueabi-g++ -S tst-unique4.cc
--sysroot=/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/sysroots/qemuarm4
-v
...

ignoring nonexistent directory
"/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/sysroots/qemuarm4/usr/include/c++"
ignoring nonexistent directory
"/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/sysroots/qemuarm4/usr/include/c++/arm-oe-linux-gnueabi"
ignoring nonexistent directory
"/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/sysroots/qemuarm4/usr/include/c++/backward"
...

See now its looking for them in 'qemuarm4' sysroot

(From OE-Core rev: 28b772e42a20faebe1b4f415d28b42b7e0a424fb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-19 09:29:18 +00:00
..
classes icecc.bbclass: also use icecc for kernel modules compilation 2011-12-19 09:29:17 +00:00
conf bitbake.conf, core-image-minimal-initramfs: add INITRAMFS_FSTYPES 2011-12-16 16:19:27 +00:00
files license: manifest and license path 2011-12-08 15:24:30 +00:00
lib/oe oe.license: add license flattening code 2011-12-08 15:24:29 +00:00
recipes-bsp grub-efi: specify prefix so it can find grub.cfg 2011-12-16 16:05:35 +00:00
recipes-connectivity connman: disable 'alg-test' building 2011-12-19 09:29:17 +00:00
recipes-core eglibc-testing: Clean the test before running them 2011-12-19 09:29:17 +00:00
recipes-devtools gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option 2011-12-19 09:29:18 +00:00
recipes-extended Add missing SUMMARY fields to various recipes 2011-12-19 09:29:16 +00:00
recipes-gnome gdk-pixbuf: Ensure the binaries can be relocated 2011-12-13 18:00:25 +00:00
recipes-graphics xserver-nodm-init: Fix xuser creation 2011-12-16 16:05:37 +00:00
recipes-kernel linux-yocto: update rt branches to 3.0.12 + rt30 2011-12-09 19:18:24 +00:00
recipes-multimedia libatomics-ops: move docs to correct directory 2011-12-19 09:29:17 +00:00
recipes-qt Patch Upstream Status Updates 2011-12-15 14:36:26 +00:00
recipes-rt rt-tests: update to 0.83 2011-11-04 15:43:29 +00:00
recipes-sato libical: Fix deadlock in pthread 2011-12-16 16:05:37 +00:00
recipes-support Add missing SUMMARY fields to various recipes 2011-12-19 09:29:16 +00:00
site siteinfo: create a new siteinfo for x32-linux 2011-12-12 21:50:19 +00:00
COPYING.MIT Add missing licence files (COPYING.MIT) 2006-07-23 13:52:32 +00:00
recipes.txt meta/recipes.txt: correct Qt capitalisation 2011-09-07 22:54:17 +01:00