Skip to contentSkip to conversation

Add gcc cross test driver and improve eglibc testing

PATCH In review Khem Raj 2 participants 6 messages Dec 16, 2011 – Dec 19, 2011

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

cover Add gcc cross test driver and improve eglibc testing

Add cross testing driver for gcc-cross
Replaces the patch to relocate gxx headers with upstream submitted one Drop shorten-build-commands eglibc patch since it hinders testing Add a patch to eglibc so it can accomodate gxx headers the way OE installs them Improve the eglibc testing since we needed to override more variables to point to final sysroot

The following changes since commit 3e05acab1c119a3b2a4703ea8729cc768935d36e:

license.bbclass: remove bashism (2011-12-16 16:50:39 +0000)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/gcc-cross-testing
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/gcc-cross-testing

Khem Raj (4):
eglibc-testing: Clean the test before running them
gcc-cross: Add cross testing driver for running regression testsuites gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option
eglibc: Fixes for running regression tests

 .../eglibc-2.13/shorten-build-commands.patch       |   82 ---------
 .../eglibc-2.13/use-sysroot-cxx-headers.patch      |   36 ++++
 .../eglibc-2.14/shorten-build-commands.patch       |   82 ---------
 .../eglibc-2.14/use-sysroot-cxx-headers.patch      |   36 ++++
 meta/recipes-core/eglibc/eglibc-testing.inc        |   34 ++++-
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 meta/recipes-core/eglibc/eglibc_2.14.bb            |    4 +-
 meta/recipes-devtools/gcc/gcc-4.6.inc              |    4 +-
 .../GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch       |  189 ++++++++++++++++++--
 meta/recipes-devtools/gcc/gcc-configure-cross.inc  |    2 +-
 meta/recipes-devtools/gcc/gcc-configure-sdk.inc    |    2 +-
 meta/recipes-devtools/gcc/gcc-cross.inc            |   91 +++++++++-
 12 files changed, 373 insertions(+), 193 deletions(-)
 delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/use-sysroot-cxx-headers.patch
 delete mode 100644 meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/use-sysroot-cxx-headers.patch
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 1/4 eglibc-testing: Clean the test before running them

We make sure that we use final cross gcc to run the tests since they require proper functioning libstdc++ and libssp which are not staged in tcbootstrap sysroot

We cleanup the tests before we run them so they all
get run in case any of them were built and/or run during compilation

Make the script executable

Add more documentation to diagnose setup problems

---
 meta/recipes-core/eglibc/eglibc-testing.inc |   36 ++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 1 deletions(-)
meta/recipes-core/eglibc/eglibc-testing.inc +35 -1
index fb632ba..2cd7c6a 100644
@@ -32,16 +32,50 @@ do_compile_append () {
 	sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testeglibc
 	sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testeglibc
 	sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testeglibc
+
+	# point to real sysroot not the toolchain bootstrap sysroot
+	sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testeglibc
+
+	# use the final cross-gcc to test since some tests need libstdc++
+	sed -i -e "s/^PATH=.*\.gcc-cross-intermediate\:/PATH=/g" ${B}/${HOST_PREFIX}testeglibc
+
 	# append execution part script
 cat >> ${B}/${HOST_PREFIX}testeglibc << STOP
 target="\$1"
 if [ "x\$target" = "x" ]
 then
-	echo "Please specify the target machine and remote user in for of user@target"
+	echo "Please specify the target machine and remote user in form of user@target"
 	exit 1;
 fi
+ssh \$target ls \$PWD\ >& /dev/null
+if [ "x\$?" != "x0" ]
+then
+	echo "Failed connecting to \$target it could be because of:"
+	echo "1. You dont have passwordless ssh setup to access \$target"
+	echo "2. NFS share on \$target is not mounted or if mounted then not matching the build tree layout."
+	echo "   The tree should be accessible at same location on build host and target"
+	echo "   You can add nfs-server to IMAGE_FEATURES to get the nfs client on target"
+	echo "3. nfs server on build host is not running."
+	echo "   Please make sure that you have 'no_root_squash' added in /etc/exports if you want"
+	echo "   to test as root user on target (usually its recommended to create a non"
+	echo "   root user."
+	echo "   As a sanity check make sure that target can read/write to the eglibc build tree"
+	echo "   Please refer to ${S}/EGLIBC.cross-testing for further instructions on setup"
+	exit 1
+fi
+	echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms
+	echo "# definitions that come from ${B}/config.make" >> ${B}/configparms
+
+	echo "CC = ${CC}" >> ${B}/configparms
+	echo "CXX = ${CXX}" >> ${B}/configparms
+	sed -i -e "s/\-tcbootstrap//g" ${B}/configparms
+
 wrapper="${S}/scripts/cross-test-ssh.sh \$target"
 localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4"
+make tests-clean
 make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check
+rm -rf ${B}/configparms
 STOP
+
+	chmod +x ${B}/${HOST_PREFIX}testeglibc
 }
Signature · 1 line
1.7.5.4
author
#2 lore raw

PATCH 2/4 gcc-cross: Add cross testing driver for running regression testsuites

This script will be generated into the build directory of gcc-cross It should be testing gcc and g++. libstdc++ tests are not run since we build them as part of gcc-runtime but we can test them here by building them with 'make all' and then running the tests

The script expects passwordless ssh access to target and is used in form

./arm-oe-linux-gnueabi-testgcc [email protected]

inside the builddir of gcc-cross

---
 meta/recipes-devtools/gcc/gcc-cross.inc |   91 ++++++++++++++++++++++++++++++-
 1 files changed, 90 insertions(+), 1 deletions(-)
meta/recipes-devtools/gcc/gcc-cross.inc +90 -1
index 5a796bc..0b31a8c 100644
@@ -8,5 +8,94 @@ require gcc-package-cross.inc
 
 do_compile () {
 	oe_runmake all-host all-target-libgcc
-}
+	# now generate script to drive testing
+	echo "#!/usr/bin/env sh" >${B}/${TARGET_PREFIX}testgcc
+	set >> ${B}/${TARGET_PREFIX}testgcc
+	# prune out the unneeded vars
+	sed -i -e "/^BASH/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^USER/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^OPT/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^DIRSTACK/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^EUID/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^FUNCNAME/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^GROUPS/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^HOST/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^HOME/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^IFS/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^LC_ALL/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^LOGNAME/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^MACHTYPE/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^OSTYPE/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^PIPE/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^SHELL/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^'/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^UID/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^TERM/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^PATCH_GET/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^PKG_/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^POSIXLY_/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^PPID/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^PS4/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^Q/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^SHLVL/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^STAGING/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${TARGET_PREFIX}testgcc
+	sed -i -e "/^PSEUDO/d" ${B}/${TARGET_PREFIX}testgcc
+
+	# append execution part of the script
+cat >> ${B}/${TARGET_PREFIX}testgcc << STOP
+target="\$1"
+shift
+usage () {
+	echo "Usage:"
+	echo "\$0 user@target 'extra options to dejagnu'"
+	echo "\$0 target 'extra options to dejagnu'"
+	echo "\$0 target"
+	echo "e.g. \$0 192.168.7.2 ' dg.exp=visibility-d.c'"
+	echo "will only run visibility-d.c test case"
+	echo "e.g. \$0 192.168.7.2 '/-mthumb dg.exp=visibility-d.c'"
+	echo "will only run visibility-d.c test case in thumb mode"
+	echo "You need to have dejagnu autogen expect installed"
+	echo "on the build host"
+    }
+if [ "x\$target" = "x" ]
+then
+	echo "Please specify the target machine and remote user in form of user@target"
+	usage
+	exit 1;
+fi
+
+echo "\$target" | grep −q "@" >& /dev/null
+if [ "x\$?" = "x0" ]
+then
+   user=echo \$target | cut -d '@' -f 1
+   target=echo \$target | cut -d '@' -f 2
+else
+   user=\$USER
+fi
+ssh \$user@\$target date >& /dev/null
+if [ "x\$?" != "x0" ]
+then
+	echo "Failed connecting to \$user@\$target it could be because"
+	echo "you don't have passwordless ssh setup to access \$target"
+	echo "or sometimes host key has been changed"
+	echo "in such case do something like below on build host"
+	echo "ssh-keygen -f "~/.ssh/known_hosts" -R \$target"
+	echo "and then try ssh \$user@\$target"
+
+	usage
+	exit 1
+fi
+	echo "lappend boards_dir [pwd]/../../.." > ${B}/site.exp
+	echo "load_generic_config \"unix\"" > ${B}/${MACHINE_ARCH}.exp
+	echo "set_board_info username \$user" >> ${B}/${MACHINE_ARCH}.exp
+	echo "set_board_info rsh_prog ssh" >> ${B}/${MACHINE_ARCH}.exp
+	echo "set_board_info rcp_prog scp" >> ${B}/${MACHINE_ARCH}.exp
+	echo "set_board_info hostname \$target" >> ${B}/${MACHINE_ARCH}.exp
+	DEJAGNU=${B}/site.exp make -k check RUNTESTFLAGS="--target_board=${MACHINE_ARCH}\$@"
 
+STOP
+
+	chmod +x ${B}/${TARGET_PREFIX}testgcc
+
+}
Signature · 1 line
1.7.5.4
author
#3 lore raw

PATCH 3/4 gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option

In reply to Khem Raj

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

---
 meta/recipes-devtools/gcc/gcc-4.6.inc              |    4 +-
 .../GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch       |  189 ++++++++++++++++++--
 meta/recipes-devtools/gcc/gcc-configure-cross.inc  |    2 +-
 meta/recipes-devtools/gcc/gcc-configure-sdk.inc    |    2 +-
 4 files changed, 174 insertions(+), 23 deletions(-)
meta/recipes-devtools/gcc/gcc-4.6.inc +2 -2
index 18e0536..4bbb2d2 100644
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r19"
+PR = "r20"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.6.0
@@ -62,7 +62,6 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
 	   file://64bithack.patch \
 	   file://optional_libstdc.patch \
 	   file://disable_relax_pic_calls_flag.patch \
-	   file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
 	   file://COLLECT_GCC_OPTIONS.patch \
            file://volatile_access_backport.patch \
            file://use-defaults.h-and-t-oe-in-B.patch \
@@ -73,6 +72,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
 	   file://pr32219.patch \
 	   file://pr47551.patch \
 	   file://gcc-arm-set-cost.patch \
+	   file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
 	  "
 
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch "
meta/recipes-devtools/gcc/gcc-4.6/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch +170 -19

205 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc-configure-cross.inc +1 -1
index 3e37423..774dadb 100644
@@ -9,7 +9,7 @@ EXTRA_OECONF += " --enable-poison-system-directories \
 INHIBIT_DEFAULT_DEPS = "1"
 
 EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${target_exec_prefix} \
-		      --with-gxx-include-dir=${target_includedir}/c++ \
+		      --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
                       --with-sysroot=${STAGING_DIR_TARGET} \
                       --with-build-sysroot=${STAGING_DIR_TARGET}"
 
meta/recipes-devtools/gcc/gcc-configure-sdk.inc +1 -1
index f130b47..eb6757c 100644
@@ -5,7 +5,7 @@ USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibceabi", "no", "", d )}'
 
 EXTRA_OECONF_PATHS = "--with-local-prefix=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${target_exec_prefix} \
-                      --with-gxx-include-dir=${target_includedir}/c++ \
+                      --with-gxx-include-dir=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${target_includedir}/c++ \
                       --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
                       --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
                       --with-build-sysroot=${STAGING_DIR_TARGET}"
Signature · 1 line
1.7.5.4
author
#4 lore raw

PATCH 4/4 eglibc: Fixes for running regression tests

In reply to Khem Raj

Override cxx-sysincludes along with CC and CXX since it contains path pointing to tcbootstrap sysroot which does not have c++ headers and libraries

Drop shorten-build-commands patch since it
did not override the include flags for c++ headers when tests written in c++ are executed the @includes file does not get updated to add c++ header paths This patch only reduced the build output anyway

Add a patch to point eglibc to look into c++
headers the way OE installs them its not standard
install e.g. usr/include/c++/GCC_VER but instead
usr/include/c++. This lets g++ find the headers
in right place when compiling c++ testcases

---
 .../eglibc-2.13/shorten-build-commands.patch       |   82 --------------------
 .../eglibc-2.13/use-sysroot-cxx-headers.patch      |   36 +++++++++
 .../eglibc-2.14/shorten-build-commands.patch       |   82 --------------------
 .../eglibc-2.14/use-sysroot-cxx-headers.patch      |   36 +++++++++
 meta/recipes-core/eglibc/eglibc-testing.inc        |    4 +-
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 meta/recipes-core/eglibc/eglibc_2.14.bb            |    4 +-
 7 files changed, 77 insertions(+), 171 deletions(-)
 delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/use-sysroot-cxx-headers.patch
 delete mode 100644 meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/use-sysroot-cxx-headers.patch
meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch deleted +0 -82
deleted file mode 100644
index 080568d..0000000
@@ -1,82 +0,0 @@
-
-Source: http://sourceware.org/ml/libc-alpha/2010-03/msg00064.html
-
-This patch scratches an itch.  Each individual gcc command in the
-glibc build is over 1K, which means it takes up a good chunk of my
-terminal.  Most of that is include paths.  Any version of GCC new
-enough to build glibc supports response files, which were added in
-2005.  So use a response file for the static list of include paths.
-Now the build commands are a lot shorter, and easier to use when
-developing glibc.
-
-Tested on x86_64-linux-gnu.  Please apply if acceptable.
-
--- 
-Daniel Jacobowitz
-CodeSourcery
-
-2010-03-30  Daniel Jacobowitz  <[email protected]>
-
-	* Makeconfig (+common-includes): Define.
-	(+includes): Use @$(common-objpfx)includes.
-	* Makefile (postclean): Remove includes and includes.mk.
-	* Makerules ($(common-objpfx)includes.mk): Include and create
-	includes.mk.  Create includes.
-
-Upstream-Status: Pending
-
-Index: libc/Makeconfig
-===================================================================
---- libc.orig/Makeconfig	2009-10-13 22:55:12.000000000 -0700
-+++ libc/Makeconfig	2010-03-31 16:02:37.120489733 -0700
-@@ -678,9 +678,10 @@ endif	# $(+cflags) == ""
- # library source directory, in the include directory, and in the
- # current directory.
- +sysdep-includes = $(addprefix -I,$(+sysdep_dirs))
-++common-includes = $(+sysdep-includes) $(includes) $(sysincludes)
- +includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
--	    $(+sysdep-includes) $(includes) \
--	    $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
-+	    @$(common-objpfx)includes \
-+	    $(patsubst %/,-I%,$(..)) $(libio-include) -I.
- 
- # Since libio has several internal header files, we use a -I instead
- # of many little headers in the include directory.
-Index: libc/Makefile
-===================================================================
---- libc.orig/Makefile	2009-12-09 12:06:28.000000000 -0800
-+++ libc/Makefile	2010-03-31 16:02:37.132481508 -0700
-@@ -247,7 +247,7 @@ parent-mostlyclean: common-mostlyclean #
- parent-clean: parent-mostlyclean common-clean
- 
- postclean = $(addprefix $(common-objpfx),$(postclean-generated)) \
--	    $(addprefix $(objpfx),sysd-dirs sysd-rules) \
-+	    $(addprefix $(objpfx),sysd-dirs sysd-rules includes includes.mk) \
- 	    $(addprefix $(objpfx),sysd-sorted soversions.mk soversions.i)
- 
- clean: parent-clean
-Index: libc/Makerules
-===================================================================
---- libc.orig/Makerules	2009-12-09 12:06:28.000000000 -0800
-+++ libc/Makerules	2010-03-31 16:02:37.140481645 -0700
-@@ -254,6 +254,20 @@ ifndef sysd-rules-done
- no_deps=t
- endif
- 
-+-include $(common-objpfx)includes.mk
-+ifneq ($(+common-includes),$(saved-includes))
-+# Recreate includes.mk (and includes).
-+includes-force = FORCE
-+FORCE:
-+endif
-+$(common-objpfx)includes.mk: $(includes-force)
-+	-@rm -f $@T $(common-objpfx)includesT
-+	for inc in $(+common-includes); do echo "$$inc"; done \
-+	  > $(common-objpfx)includesT
-+	mv -f $(common-objpfx)includesT $(common-objpfx)includes
-+	echo 'saved-includes := $(+common-includes)' > $@T
-+	mv -f $@T $@
-+
- define o-iterator-doit
- $(objpfx)%$o: %.S $(before-compile); $$(compile-command.S)
- endef
meta/recipes-core/eglibc/eglibc-2.13/use-sysroot-cxx-headers.patch new file +36 -0
new file mode 100644
index 0000000..c06eebf
@@ -0,0 +1,36 @@
+build system of glibc currently adds the cxx headers path by detecting
+it using provided CXX and expects that they are installed w.r.t to standard
+installation location but in OE we install and use cxx headers from target
+sysroot therefore that code needs to be adapted for OE
+
+Upstream-Status: Inappropriate [OE-specific]
+
+-Khem
+
+
+--- a/configure.in
++++ b/configure.in
+@@ -1118,9 +1118,8 @@ if test -n "$sysheaders"; then
+   SYSINCLUDES="$SYSINCLUDES \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+-    cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
+     cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
+-    cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
++    cxxheaders=`$CXX -print-sysroot`"$prefix/include/c++" &&
+     CXX_SYSINCLUDES="-isystem $cxxheaders \
+ -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+   fi
+--- a/configure
++++ b/configure
+@@ -5544,9 +5544,8 @@ if test -n "$sysheaders"; then
+   SYSINCLUDES="$SYSINCLUDES \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+-    cxxversion=`$CXX -dumpversion 2>&5` &&
+     cxxmachine=`$CXX -dumpmachine 2>&5` &&
+-    cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
++    cxxheaders=`$CXX -print-sysroot`"$prefix/include/c++" &&
+     CXX_SYSINCLUDES="-isystem $cxxheaders \
+ -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+   fi
meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch deleted +0 -82

82 lines not on this page · raw message

meta/recipes-core/eglibc/eglibc-2.14/use-sysroot-cxx-headers.patch new file +36 -0
new file mode 100644
index 0000000..c06eebf
@@ -0,0 +1,36 @@
+build system of glibc currently adds the cxx headers path by detecting
+it using provided CXX and expects that they are installed w.r.t to standard
+installation location but in OE we install and use cxx headers from target
+sysroot therefore that code needs to be adapted for OE
+
+Upstream-Status: Inappropriate [OE-specific]
+
+-Khem
+
+
+--- a/configure.in
++++ b/configure.in
+@@ -1118,9 +1118,8 @@ if test -n "$sysheaders"; then
+   SYSINCLUDES="$SYSINCLUDES \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+-    cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
+     cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
+-    cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
++    cxxheaders=`$CXX -print-sysroot`"$prefix/include/c++" &&
+     CXX_SYSINCLUDES="-isystem $cxxheaders \
+ -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+   fi
+--- a/configure
++++ b/configure
+@@ -5544,9 +5544,8 @@ if test -n "$sysheaders"; then
+   SYSINCLUDES="$SYSINCLUDES \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+-    cxxversion=`$CXX -dumpversion 2>&5` &&
+     cxxmachine=`$CXX -dumpmachine 2>&5` &&
+-    cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
++    cxxheaders=`$CXX -print-sysroot`"$prefix/include/c++" &&
+     CXX_SYSINCLUDES="-isystem $cxxheaders \
+ -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+   fi
meta/recipes-core/eglibc/eglibc-testing.inc +1 -3
index 2cd7c6a..c30409f 100644
@@ -66,10 +66,8 @@ fi
 	echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms
 	echo "# definitions that come from ${B}/config.make" >> ${B}/configparms
 
-	echo "CC = ${CC}" >> ${B}/configparms
-	echo "CXX = ${CXX}" >> ${B}/configparms
+	fgrep tcbootstrap ${B}/config.make > ${B}/configparms
 	sed -i -e "s/\-tcbootstrap//g" ${B}/configparms
-
 wrapper="${S}/scripts/cross-test-ssh.sh \$target"
 localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4"
 make tests-clean
meta/recipes-core/eglibc/eglibc_2.13.bb +2 -2
index 9d3ec85..8555985 100644
@@ -3,14 +3,13 @@ require eglibc.inc
 SRCREV = "15508"
 
 DEPENDS += "gperf-native"
-PR = "r19"
+PR = "r20"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_13"
 SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \
            file://eglibc-svn-arm-lowlevellock-include-tls.patch \
            file://IO-acquire-lock-fix.patch \
-           file://shorten-build-commands.patch \
            file://mips-rld-map-check.patch \
            file://stack-protector-test.patch \
            file://armv4-eabi-compile-fix.patch \
@@ -18,6 +17,7 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
            file://generate-supported.mk \
            file://ppc-sqrt.patch \
            file://multilib_readlib.patch \
+           file://use-sysroot-cxx-headers.patch \
 	   "
 LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
meta/recipes-core/eglibc/eglibc_2.14.bb +2 -2
index 8553106..ad2161e 100644
@@ -3,14 +3,13 @@ require eglibc.inc
 SRCREV = "15870"
 
 DEPENDS += "gperf-native"
-PR = "r2"
+PR = "r3"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_14"
 SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \
            file://eglibc-svn-arm-lowlevellock-include-tls.patch \
            file://IO-acquire-lock-fix.patch \
-           file://shorten-build-commands.patch \
            file://mips-rld-map-check.patch \
            file://stack-protector-test.patch \
            file://armv4-eabi-compile-fix.patch \
@@ -20,6 +19,7 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
            file://multilib_readlib.patch \
            file://eglibc-rpc-export-again.patch \
            file://glibc-2.14-libdl-crash.patch \
+           file://use-sysroot-cxx-headers.patch \
           "
 LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
Signature · 1 line
1.7.5.4
#5 lore raw
In reply to Khem Raj
Quoted 16 lines · Khem Raj

Add cross testing driver for gcc-cross
Replaces the patch to relocate gxx headers with upstream submitted one Drop shorten-build-commands eglibc patch since it hinders testing Add a patch to eglibc so it can accomodate gxx headers the way OE installs them Improve the eglibc testing since we needed to override more variables to point to final sysroot

The following changes since commit 3e05acab1c119a3b2a4703ea8729cc768935d36e:

license.bbclass: remove bashism (2011-12-16 16:50:39 +0000)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/gcc-cross-testing
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/gcc-cross-testing

Quoted 5 lines

Khem Raj (4):
eglibc-testing: Clean the test before running them
gcc-cross: Add cross testing driver for running regression testsuites gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option
eglibc: Fixes for running regression tests

I merged this to master. I'm still not convinced there is *any* change n behaviour from the g++ relocation patch but it makes sense to keep more in line with upstream.

Cheers,

Richard