This fixes the problem reported in bug 4536. Backport the patch which adds include...
authorKhem Raj <raj.khem@gmail.com>
Sat, 13 Sep 2008 01:47:08 +0000 (01:47 +0000)
committerKhem Raj <raj.khem@gmail.com>
Sat, 13 Sep 2008 01:47:08 +0000 (01:47 +0000)
I was using 2.6.25 kernel headers which means I have to backport another patch to get rid of asm/page.h.
I have tested it on angstrom 2008.1 gcc-4.3.2+glibc-2.6.1 and gcc-4.3.2+eglibc_svn
-Khem

packages/gcc/gcc-cross-initial_4.3.1.bb
packages/gcc/gcc-cross-initial_4.3.2.bb
packages/gcc/gcc-cross-intermediate_4.3.1.bb
packages/gcc/gcc-cross-intermediate_4.3.2.bb
packages/gcc/gcc-cross_4.3.1.bb
packages/gcc/gcc-cross_4.3.2.bb
packages/glibc/glibc-2.4/glibc-arm-no-asm-page.patch [new file with mode: 0644]
packages/glibc/glibc-2.4/glibc-use-isystem-include-fixed.patch [new file with mode: 0644]
packages/glibc/glibc-2.4/zecke-sane-readelf.patch
packages/glibc/glibc_2.6.1.bb

index 3858d88..067ab61 100644 (file)
@@ -7,9 +7,3 @@ EXTRA_OECONF += " --disable-libmudflap \
                  --disable-libgomp \
                  --enable-decimal-float=no \
                  --disable-libssp"
-
-# Hack till we fix *libc properly
-do_stage_append() {
-        ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
-}
-
index 3858d88..067ab61 100644 (file)
@@ -7,9 +7,3 @@ EXTRA_OECONF += " --disable-libmudflap \
                  --disable-libgomp \
                  --enable-decimal-float=no \
                  --disable-libssp"
-
-# Hack till we fix *libc properly
-do_stage_append() {
-        ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
-}
-
index b0932f5..a9ae5bd 100644 (file)
@@ -6,9 +6,3 @@ DEPENDS += "gmp-native mpfr-native"
 EXTRA_OECONF += " --disable-libmudflap \
                  --disable-libgomp \
                  --disable-libssp"
-
-# Hack till we fix *libc properly
-do_stage_append() {
-        ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
-}
-
index b0932f5..a9ae5bd 100644 (file)
@@ -6,9 +6,3 @@ DEPENDS += "gmp-native mpfr-native"
 EXTRA_OECONF += " --disable-libmudflap \
                  --disable-libgomp \
                  --disable-libssp"
-
-# Hack till we fix *libc properly
-do_stage_append() {
-        ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
-}
-
index 48934f7..2b93165 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r13"
+PR = "r14"
 
 require gcc-${PV}.inc
 require gcc-cross4.inc
@@ -9,10 +9,4 @@ SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
 
 EXTRA_OECONF += "  --enable-cheaders=c_std --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
 
-# Hack till we fix *libc properly
-do_stage_append() {
-        ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
-}
-
-
 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${layout_includedir}"
index 7e649ac..1220f8d 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
 require gcc-${PV}.inc
 require gcc-cross4.inc
 require gcc-configure-cross.inc
@@ -8,10 +8,4 @@ SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
 
 EXTRA_OECONF += "  --enable-cheaders=c_std --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
 
-# Hack till we fix *libc properly
-do_stage_append() {
-        ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
-}
-
-
 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${layout_includedir}"
diff --git a/packages/glibc/glibc-2.4/glibc-arm-no-asm-page.patch b/packages/glibc/glibc-2.4/glibc-arm-no-asm-page.patch
new file mode 100644 (file)
index 0000000..7eb1717
--- /dev/null
@@ -0,0 +1,15 @@
+http://sourceware.org/ml/libc-ports/2008-04/msg00005.html
+
+
+Index: glibc-2.6.1/ports/sysdeps/unix/sysv/linux/arm/ioperm.c
+===================================================================
+--- glibc-2.6.1.orig/ports/sysdeps/unix/sysv/linux/arm/ioperm.c        2008-09-12 18:08:18.000000000 -0700
++++ glibc-2.6.1/ports/sysdeps/unix/sysv/linux/arm/ioperm.c     2008-09-12 18:08:28.000000000 -0700
+@@ -45,7 +45,6 @@
+ #include <sys/mman.h>
+ #include <linux/version.h>
+-#include <asm/page.h>
+ #include <sys/sysctl.h>
+ #define PATH_ARM_SYSTYPE      "/etc/arm_systype"
diff --git a/packages/glibc/glibc-2.4/glibc-use-isystem-include-fixed.patch b/packages/glibc/glibc-2.4/glibc-use-isystem-include-fixed.patch
new file mode 100644 (file)
index 0000000..d9ed12a
--- /dev/null
@@ -0,0 +1,46 @@
+http://sourceware.org/ml/libc-alpha/2007-03/msg00017.html
+
+GCC trunk now has multiple internal headers directories, one
+containing the self-contained GCC-provided headers and one containing
+the <limits.h> (not self-contained but including libc's <limits.h> or
+a fixed version thereof) and the fixed headers; more such directories
+may be added in future.
+
+When glibc uses -nostdinc, it needs to use -isystem options for all
+these internal directories.  This patch teaches it about the
+include-fixed directory (and is harmless with old GCC versions without
+that directory).
+
+2007-03-18  Joseph Myers  <joseph@codesourcery.com>
+
+       * configure.in: Also pass -isystem option for GCC's include-fixed
+       directory.
+       * configure: Regenerate.
+
+
+Index: glibc-2.6.1/configure
+===================================================================
+--- glibc-2.6.1.orig/configure 2008-09-12 16:38:06.000000000 -0700
++++ glibc-2.6.1/configure      2008-09-12 16:39:22.000000000 -0700
+@@ -4563,7 +4563,7 @@
+ # thing on a system that doesn't need fixincludes.  (Not presently a problem.)
+ if test -n "$sysheaders"; then
+   ccheaders=`$CC -print-file-name=include`
+-  SYSINCLUDES="-nostdinc -isystem $ccheaders \
++  SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $ccheaders-fixed \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+     cxxversion=`$CXX -dumpversion 2>&5` &&
+Index: glibc-2.6.1/configure.in
+===================================================================
+--- glibc-2.6.1.orig/configure.in      2008-09-12 16:38:26.000000000 -0700
++++ glibc-2.6.1/configure.in   2008-09-12 16:39:01.000000000 -0700
+@@ -912,7 +912,7 @@
+ # thing on a system that doesn't need fixincludes.  (Not presently a problem.)
+ if test -n "$sysheaders"; then
+   ccheaders=`$CC -print-file-name=include`
+-  SYSINCLUDES="-nostdinc -isystem $ccheaders \
++  SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $ccheaders-fixed \
+ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+   if test -n "$CXX"; then
+     cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
index 229db09..2bc8797 100644 (file)
@@ -3,14 +3,15 @@ status: WONTFIX
 comment: Use OEs version of the readelf version. There might be no
 host system version (e.g. on OSX) or it is not multiarch.
 
-Index: glibc-2.4/configure
+Index: glibc-2.6.1/configure
 ===================================================================
---- glibc-2.4.orig/configure   2006-03-06 12:18:56.000000000 +0100
-+++ glibc-2.4/configure        2006-08-06 14:10:51.000000000 +0200
-@@ -5488,6 +5488,95 @@
+--- glibc-2.6.1.orig/configure 2007-07-31 06:46:12.000000000 -0700
++++ glibc-2.6.1/configure      2008-09-12 16:38:06.000000000 -0700
+@@ -5478,6 +5478,96 @@
      fi
    fi
  
++###  AC_CHECK_TARGET_TOOL([READELF],[readelf],[readelf],[$PATH])
 +### XXXX copy and pasted
 +# Check for readelf
 +# Extract the first word of "$target_alias-readelf", so it can be a program name with args.
@@ -103,7 +104,7 @@ Index: glibc-2.4/configure
    echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
  echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
  if test "${libc_cv_initfini_array+set}" = set; then
-@@ -5507,7 +5596,7 @@
+@@ -5497,7 +5587,7 @@
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }; }
    then
@@ -112,7 +113,7 @@ Index: glibc-2.4/configure
        libc_cv_initfini_array=yes
      else
        libc_cv_initfini_array=no
-@@ -5801,7 +5890,7 @@
+@@ -5797,7 +5887,7 @@
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }; }
    then
@@ -121,20 +122,108 @@ Index: glibc-2.4/configure
        libc_cv_z_combreloc=yes
      else
        libc_cv_z_combreloc=no
-Index: glibc-2.4/configure.in
+Index: glibc-2.6.1/configure.in
 ===================================================================
---- glibc-2.4.orig/configure.in        2006-03-01 10:17:40.000000000 +0100
-+++ glibc-2.4/configure.in     2006-08-06 14:09:31.000000000 +0200
-@@ -1350,6 +1350,8 @@
+--- glibc-2.6.1.orig/configure.in      2007-03-20 05:11:23.000000000 -0700
++++ glibc-2.6.1/configure.in   2008-09-12 16:38:26.000000000 -0700
+@@ -1347,6 +1347,96 @@
      fi
    fi
  
-+  AC_CHECK_TARGET_TOOL([READELF],[readelf],[readelf],[$PATH])
++###  AC_CHECK_TARGET_TOOL([READELF],[readelf],[readelf],[$PATH])
++### XXXX copy and pasted
++# Check for readelf
++# Extract the first word of "$target_alias-readelf", so it can be a program name with args.
++set dummy $target_alias-readelf; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_READELF+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  if test -n "$READELF"; then
++  ac_cv_prog_READELF="$READELF" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++  for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_READELF="$target_alias-readelf"
++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++READELF=$ac_cv_prog_READELF
++if test -n "$READELF"; then
++  { echo "$as_me:$LINENO: result: $READELF" >&5
++echo "${ECHO_T}$READELF" >&6; }
++else
++  { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++if test -z "$ac_cv_prog_READELF"; then
++  if test "$build" = "$target"; then
++    ac_ct_READELF=$READELF
++    # Extract the first word of "readelf", so it can be a program name with args.
++set dummy readelf; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_ac_ct_READELF+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  if test -n "$ac_ct_READELF"; then
++  ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++  for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_READELF="readelf"
++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++done
++IFS=$as_save_IFS
++
++  test -z "$ac_cv_prog_ac_ct_READELF" && ac_cv_prog_ac_ct_READELF="readelf"
++fi
++fi
++ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
++if test -n "$ac_ct_READELF"; then
++  { echo "$as_me:$LINENO: result: $ac_ct_READELF" >&5
++echo "${ECHO_T}$ac_ct_READELF" >&6; }
++else
++  { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++    READELF=ac_ct_READELF
++  else
++    READELF="readelf"
++  fi
++else
++  READELF="$ac_cv_prog_READELF"
++fi
++
++### XXXX copy and pasted
 +
    AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
                 libc_cv_initfini_array, [dnl
    cat > conftest.c <<EOF
-@@ -1361,7 +1363,7 @@
+@@ -1358,7 +1448,7 @@
    if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
                     -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
    then
@@ -143,7 +232,7 @@ Index: glibc-2.4/configure.in
        libc_cv_initfini_array=yes
      else
        libc_cv_initfini_array=no
-@@ -1543,7 +1545,7 @@
+@@ -1543,7 +1633,7 @@
  dnl introducing new options this is not easily doable.  Instead use a tool
  dnl which always is cross-platform: readelf.  To detect whether -z combreloc
  dnl look for a section named .rel.dyn.
index 6541dda..5cd1d5b 100644 (file)
@@ -1,5 +1,5 @@
 require glibc.inc
-PR = "r11"
+PR = "r12"
 
 PACKAGES_DYNAMIC = "libc6*"
 RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
@@ -55,6 +55,8 @@ SRC_URI = "\
   file://generate-supported.mk \
   file://glibc-2.6.1-RTLD_SINGLE_THREAD_P-1.patch;patch=1 \
   file://glibc-2.6.1-use-short-for-fnstsw.patch;patch=1 \
+  file://glibc-use-isystem-include-fixed.patch;patch=1 \
+  file://glibc-arm-no-asm-page.patch;patch=1 \
 "
 
 # Build fails on sh3 and sh4 without additional patches