patches/glibc/2.9/430-2.7-cross-compile-nptl.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 03 09:50:16 2009 +0000 (2009-05-03)
branchnewlib
changeset 1366 5e5d1e6f55d3
permissions -rw-r--r--
Update the newlib devel branch with stuff from /trunk@1498.

-------- diffstat follows --------
/devel/newlib/configure | 336 176 160 0 +++++++------
/devel/newlib/Makefile.in | 12 3 9 0 -
/devel/newlib/scripts/build/kernel/linux.sh | 2 1 1 0
/devel/newlib/scripts/build/internals.sh | 1 0 1 0 -
/devel/newlib/scripts/build/libc/eglibc.sh | 1 0 1 0 -
/devel/newlib/scripts/build/mpfr.sh | 2 1 1 0
/devel/newlib/scripts/functions | 111 5 106 0 ----
/devel/newlib/scripts/config.guess | 7 5 2 0 +
/devel/newlib/scripts/config.sub | 3 2 1 0 +
/devel/newlib/scripts/saveSample.sh.in | 4 2 2 0
/devel/newlib/docs/overview.txt | 8 6 2 0 +
/devel/newlib/samples/armeb-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/sh4-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-elf/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/armeb-unknown-eabi/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/arm-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/ia64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i686-nptl-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-iphone-linux-gnueabi/crosstool.config | 8 4 4 0
/devel/newlib/samples/armeb-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i586-geode-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-elf/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/powerpc-405-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-eabi/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/mipsel-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/alphaev56-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-860-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/config/kernel/linux.in | 108 2 106 0 ----
/devel/newlib/config/global/ct-behave.in | 22 13 9 0 +
/devel/newlib/config/global/download.in | 210 15 195 0 +-------
/devel/newlib/config/libc/glibc.in | 7 7 0 0 +
/devel/newlib/config/libc/glibc-eglibc.in-common | 15 14 1 0 +
45 files changed, 382 insertions(+), 839 deletions(-)
yann@1365
     1
Original patch from: gentoo/src/patchsets/glibc/2.9/5070_all_glibc-2.7-cross-compile-nptl.patch
yann@1365
     2
yann@1365
     3
-= BEGIN original header =-
yann@1365
     4
A little hack for cross-compiling NPTL
yann@1365
     5
yann@1365
     6
http://sourceware.org/ml/libc-alpha/2005-02/msg00043.html
yann@1365
     7
yann@1365
     8
-= END original header =-
yann@1365
     9
yann@1365
    10
diff -durN glibc-2_9.orig/nptl/sysdeps/pthread/configure glibc-2_9/nptl/sysdeps/pthread/configure
yann@1365
    11
--- glibc-2_9.orig/nptl/sysdeps/pthread/configure	2007-10-17 00:24:30.000000000 +0200
yann@1365
    12
+++ glibc-2_9/nptl/sysdeps/pthread/configure	2009-02-02 22:01:28.000000000 +0100
yann@1365
    13
@@ -78,6 +78,10 @@
yann@1365
    14
 fi
yann@1365
    15
 { echo "$as_me:$LINENO: result: $libc_cv_forced_unwind" >&5
yann@1365
    16
 echo "${ECHO_T}$libc_cv_forced_unwind" >&6; }
yann@1365
    17
+if test $libc_cv_forced_unwind = no -a $build_cpu != $host_cpu; then
yann@1365
    18
+  echo "$as_me:$LINENO: forcing libc_cv_forced_unwind = yes for cross-compile"
yann@1365
    19
+  libc_cv_forced_unwind=yes
yann@1365
    20
+fi
yann@1365
    21
 if test $libc_cv_forced_unwind = yes; then
yann@1365
    22
   cat >>confdefs.h <<\_ACEOF
yann@1365
    23
 #define HAVE_FORCED_UNWIND 1
yann@1365
    24
@@ -141,6 +145,10 @@
yann@1365
    25
 { echo "$as_me:$LINENO: result: $libc_cv_c_cleanup" >&5
yann@1365
    26
 echo "${ECHO_T}$libc_cv_c_cleanup" >&6; }
yann@1365
    27
   CFLAGS="$old_CFLAGS"
yann@1365
    28
+  if test $libc_cv_c_cleanup = no -a $build_cpu != $host_cpu; then
yann@1365
    29
+    echo "$as_me:$LINENO: result: forcing libc_cv_c_cleanup = yes for cross-compile"
yann@1365
    30
+    libc_cv_c_cleanup=yes
yann@1365
    31
+  fi
yann@1365
    32
   if test $libc_cv_c_cleanup = no; then
yann@1365
    33
     { { echo "$as_me:$LINENO: error: the compiler must support C cleanup handling" >&5
yann@1365
    34
 echo "$as_me: error: the compiler must support C cleanup handling" >&2;}
yann@1365
    35
diff -durN glibc-2_9.orig/nptl/sysdeps/pthread/configure.in glibc-2_9/nptl/sysdeps/pthread/configure.in
yann@1365
    36
--- glibc-2_9.orig/nptl/sysdeps/pthread/configure.in	2003-12-03 07:50:01.000000000 +0100
yann@1365
    37
+++ glibc-2_9/nptl/sysdeps/pthread/configure.in	2009-02-02 22:01:28.000000000 +0100
yann@1365
    38
@@ -28,6 +28,9 @@
yann@1365
    39
 struct _Unwind_Context *context;
yann@1365
    40
 _Unwind_GetCFA (context)],
yann@1365
    41
 libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)])
yann@1365
    42
+if test $libc_cv_forced_unwind = no -a $build_cpu != $host_cpu; then
yann@1365
    43
+  libc_cv_forced_unwind=yes
yann@1365
    44
+fi
yann@1365
    45
 if test $libc_cv_forced_unwind = yes; then
yann@1365
    46
   AC_DEFINE(HAVE_FORCED_UNWIND)
yann@1365
    47
 dnl Check for C cleanup handling.
yann@1365
    48
@@ -41,6 +44,9 @@
yann@1365
    49
   puts ("test")],
yann@1365
    50
 libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
yann@1365
    51
   CFLAGS="$old_CFLAGS"
yann@1365
    52
+  if test $libc_cv_c_cleanup = no -a $build_cpu != $host_cpu; then
yann@1365
    53
+    libc_cv_c_cleanup=yes
yann@1365
    54
+  fi
yann@1365
    55
   if test $libc_cv_c_cleanup = no; then
yann@1365
    56
     AC_MSG_ERROR([the compiler must support C cleanup handling])
yann@1365
    57
   fi