]> code.ossystems Code Review - openembedded-core.git/commitdiff
eglibc: Fixes for running regression tests
authorKhem Raj <raj.khem@gmail.com>
Fri, 16 Dec 2011 22:33:38 +0000 (14:33 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Dec 2011 09:28:18 +0000 (09:28 +0000)
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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch [deleted file]
meta/recipes-core/eglibc/eglibc-2.13/use-sysroot-cxx-headers.patch [new file with mode: 0644]
meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch [deleted file]
meta/recipes-core/eglibc/eglibc-2.14/use-sysroot-cxx-headers.patch [new file with mode: 0644]
meta/recipes-core/eglibc/eglibc-testing.inc
meta/recipes-core/eglibc/eglibc_2.13.bb
meta/recipes-core/eglibc/eglibc_2.14.bb

diff --git a/meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch b/meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch
deleted file mode 100644 (file)
index 080568d..0000000
+++ /dev/null
@@ -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  <dan@codesourcery.com>
-
-       * 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
diff --git a/meta/recipes-core/eglibc/eglibc-2.13/use-sysroot-cxx-headers.patch b/meta/recipes-core/eglibc/eglibc-2.13/use-sysroot-cxx-headers.patch
new file mode 100644 (file)
index 0000000..c06eebf
--- /dev/null
@@ -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
diff --git a/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch b/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch
deleted file mode 100644 (file)
index 080568d..0000000
+++ /dev/null
@@ -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  <dan@codesourcery.com>
-
-       * 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
diff --git a/meta/recipes-core/eglibc/eglibc-2.14/use-sysroot-cxx-headers.patch b/meta/recipes-core/eglibc/eglibc-2.14/use-sysroot-cxx-headers.patch
new file mode 100644 (file)
index 0000000..c06eebf
--- /dev/null
@@ -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
index 2cd7c6ab14920d9590e730f8fc01d688ac6d1dfb..c30409fb94c13a7d7eba93deadba3704ac7a3938 100644 (file)
@@ -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
index 9d3ec85af6ef46b3b099e4dad256f944a0d8bf49..85559853351e57193d08ace82e7f5159360ae9fd 100644 (file)
@@ -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 \
index 855310676626d1aa36b8b0efe8ef36713b5bf2f4..ad2161e1dddbed2e3cf1245d6be23c37af7584a3 100644 (file)
@@ -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 \