generic-poky/meta/recipes-devtools/gcc
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
..
gcc-4.6 gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option 2011-12-19 09:29:18 +00:00
gcc-csl-arm gcc: remove unused patches and move patches in proper dir 2011-05-18 14:32:47 +01:00
gcc-4.6.inc gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option 2011-12-19 09:29:18 +00:00
gcc-common.inc Fix multiarch DISTRO_FEATURE 2011-11-30 23:36:08 +00:00
gcc-configure-common.inc Introduce multiarch DISTRO_FEATURE 2011-11-29 11:22:06 +00:00
gcc-configure-cross.inc gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option 2011-12-19 09:29:18 +00:00
gcc-configure-runtime.inc gcc: Fix file ownership 2011-06-28 13:55:40 +01:00
gcc-configure-sdk.inc gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option 2011-12-19 09:29:18 +00:00
gcc-configure-target.inc gcc: Fix c++ search path for target system compiler making everything consistent 2010-10-07 11:06:32 +01:00
gcc-cross-canadian.inc Using TRANSLATED_TARGET_ARCH instead of TARGET_ARCH. 2010-12-10 15:36:48 +00:00
gcc-cross-canadian_4.6.bb gcc-4.6: Switch to using svn SRC_URI for recipe 2011-06-23 11:50:07 +01:00
gcc-cross-initial.inc cross-recipes: Disable nls in gettext bbclass 2011-12-15 14:36:23 +00:00
gcc-cross-initial_4.6.bb gcc-4.6: Switch to using svn SRC_URI for recipe 2011-06-23 11:50:07 +01:00
gcc-cross-initial_csl-arm-2008q1.bb Major layout change to the packages directory 2010-08-27 15:29:45 +01:00
gcc-cross-intermediate.inc cross-recipes: Disable nls in gettext bbclass 2011-12-15 14:36:23 +00:00
gcc-cross-intermediate_4.6.bb gcc-4.6: Switch to using svn SRC_URI for recipe 2011-06-23 11:50:07 +01:00
gcc-cross-intermediate_csl-arm-2008q1.bb Major layout change to the packages directory 2010-08-27 15:29:45 +01:00
gcc-cross-kernel.inc gcc-cross-kernel: update to match new toolchain sysroot layout 2011-06-28 15:06:53 +01:00
gcc-cross.inc gcc-cross: Add cross testing driver for running regression testsuites 2011-12-19 09:29:17 +00:00
gcc-cross4.inc gcc-4.6: fix toolchain build for SH4 2011-11-16 17:32:45 +00:00
gcc-cross_4.6.bb gcc-4.6: Switch to using svn SRC_URI for recipe 2011-06-23 11:50:07 +01:00
gcc-cross_csl-arm-2008q1.bb gcc: Various fixups to ensure consistent gcc builds 2011-08-11 19:08:02 +01:00
gcc-crosssdk-initial.inc gcc-crosssdk-initial: Ensure native dependencies are built, these can differ accross different gcc versions causing build failures 2010-09-06 22:55:49 +01:00
gcc-crosssdk-initial_4.6.bb gcc-4.6: Switch to using svn SRC_URI for recipe 2011-06-23 11:50:07 +01:00
gcc-crosssdk-intermediate.inc gcc: fix possible problems with nscd compilation during eglibc-nativesdk build 2011-09-28 14:58:48 +01:00
gcc-crosssdk-intermediate_4.6.bb gcc-4.6: Switch to using svn SRC_URI for recipe 2011-06-23 11:50:07 +01:00
gcc-crosssdk.inc Share gcc work directories 2011-06-30 20:56:33 +01:00
gcc-crosssdk_4.6.bb gcc-4.6: Switch to using svn SRC_URI for recipe 2011-06-23 11:50:07 +01:00
gcc-csl-arm-2005q3.inc recipes: Delete patch=1, its default and replace pnum with striplevel 2011-08-23 18:23:30 -07:00
gcc-csl-arm-2008q1.inc recipes: Delete patch=1, its default and replace pnum with striplevel 2011-08-23 18:23:30 -07:00
gcc-package-cross.inc gcc-package-cross: Switch to using pattern matching to detect when to stash libgcc into the sysroot 2011-07-05 11:39:09 +01:00
gcc-package-runtime.inc gcc-runtime: fix installed but unpackaged files 2011-07-08 16:39:10 +01:00
gcc-package-sdk.inc gcc: Fix two QA issues 2011-09-28 14:58:49 +01:00
gcc-package-target.inc gcc-package-target.inc: add the symbol link /lib/cpp 2011-11-24 23:33:35 +00:00
gcc-runtime_4.6.bb gcc-4.6: Switch to using svn SRC_URI for recipe 2011-06-23 11:50:07 +01:00
gcc_4.6.bb gcc-4.6: Switch to using svn SRC_URI for recipe 2011-06-23 11:50:07 +01:00
gcc_csl-arm-2008q1.bb gcc: Various fixups to ensure consistent gcc builds 2011-08-11 19:08:02 +01:00
libgcc_4.6.bb libgcc: reintroduce debug package, containing symbols 2011-12-16 16:19:28 +00:00