diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2015-03-26 08:14:31 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-31 22:24:33 +0100 |
commit | 232ccf23cf5ab9e39f859539ab3d823e2631e431 (patch) | |
tree | c73a6cf85a5d13acfa7c8fe1ba8e73afd970c7f9 /meta/recipes-core | |
parent | a7e20761bd61bcfc5a49f21fa02f5f2117782594 (diff) | |
download | poky-232ccf23cf5ab9e39f859539ab3d823e2631e431.tar.gz |
glibc-testing: Specify location of c++ header files
Glibc test suite contains several c++ files. They are built
with g++ -nostdinc. In this case the location of c++ include files
needs to be specified explicitly, or the programs may fail to build.
The header locations are assumed to be:
sysroot/usr/include/c++/<version>
sysroot/usr/include/c++/<version>/<machine>
The new code parses "configparms" to get the actual CXX and sysroot
used for the glibc test suite, then it queries CXX to determine
CXX <version> and CXX <machine>. With the known values for <version>
and <machine> the code composes a new value for c++-sysincludes
and appends "configparms" with that value.
[YOCTO #7081]
(From OE-Core rev: 15c5e5e83af409509140eaf29d4e10d9db99eb8a)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/glibc/glibc-testing.inc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/meta/recipes-core/glibc/glibc-testing.inc b/meta/recipes-core/glibc/glibc-testing.inc index ec16fe1fde..fd1af39922 100644 --- a/meta/recipes-core/glibc/glibc-testing.inc +++ b/meta/recipes-core/glibc/glibc-testing.inc | |||
@@ -65,9 +65,26 @@ then | |||
65 | fi | 65 | fi |
66 | echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms | 66 | echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms |
67 | echo "# definitions that come from ${B}/config.make" >> ${B}/configparms | 67 | echo "# definitions that come from ${B}/config.make" >> ${B}/configparms |
68 | |||
69 | fgrep tcbootstrap ${B}/config.make > ${B}/configparms | 68 | fgrep tcbootstrap ${B}/config.make > ${B}/configparms |
70 | sed -i -e "s/\-tcbootstrap//g" ${B}/configparms | 69 | sed -i -e "s/\-tcbootstrap//g" ${B}/configparms |
70 | |||
71 | # g++ uses flag -nostdinc, so the locations of system include headers must be explicitly specified | ||
72 | # If the locations are not already specified in config.make, then we provide the following locations: | ||
73 | # <sysroot>/usr/include/c++/<g++ version> | ||
74 | # <sysroot>/usr/include/c++/<g++ version>/<machine> | ||
75 | |||
76 | cxxincludes=\`cat ${B}/config.make | gawk '\$1 == "c++-sysincludes"' | gawk -F"=" '{print \$2}' | sed "s/[ \t]\?//g"\` | ||
77 | |||
78 | if [ -z "\$cxxincludes" ]; then | ||
79 | sysroot=\`cat ${B}/configparms | sed -n "/CXX/p" | sed -e "s/^.*--sysroot=//"\` | ||
80 | cxx=\`cat ${B}/configparms | gawk '\$1 ~ /^CXX/' | gawk -F"=" '{print \$2}' | gawk '{print \$1}'\` | ||
81 | cxxmachine=\`\$cxx -dumpmachine\` | ||
82 | cxxversion=\`\$cxx -dumpversion\` | ||
83 | # pass the new value of c++-sysincludes via configparms | ||
84 | echo "# c++-sysincludes added:" >> ${B}/configparms | ||
85 | echo "c++-sysincludes = -isystem \$sysroot/usr/include/c++/\$cxxversion -isystem \$sysroot/usr/include/c++/\$cxxversion/\$cxxmachine" >> ${B}/configparms | ||
86 | fi | ||
87 | |||
71 | wrapper="${S}/scripts/cross-test-ssh.sh \$target" | 88 | wrapper="${S}/scripts/cross-test-ssh.sh \$target" |
72 | localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4" | 89 | localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4" |
73 | make tests-clean | 90 | make tests-clean |