where are the NPTL patches in crosstool-0.40?

Robert P. J. Day rpjday@mindspring.com
Wed Feb 22 16:48:00 GMT 2006


On Wed, 22 Feb 2006, Dan Kegel wrote:

> On 2/22/06, Robert P. J. Day <rpjday@mindspring.com> wrote:
> >   is there a reason why there are no NPTL patches incorporated into
> > ct-0.40?
>
> Did you look in contrib?

ok, here's the story on NPTL patches.  first, one of the patches i was
thinking of *is* there, it had just been renamed slightly.  that would
be this one:

	glibc-2.3.6/glibc-2.3.5-sh-lowlevellock.patch

which *used* to have the phrase "nptl" in its name -- that's why i
missed it as i just did a find looking for "*nptl*".  my bad.  sorry.

the other patch i'm thinking of is this one:

	glibc-5070_all_cross-compile-nptl.patch

which i've attached if anyone wants to check it out.  it's a patch
against glibc/nptl/sysdeps/pthread/configure{,.in} that i pulled out
of the gentoo patch repo (based on, i believe, mike frysinger's
advice).  as i recall, this patch can be applied regardless of whether
you're building with linuxthreads or NPTL so it should be there in
either case, but i'll defer to others who know much more about this
than me.

  finally, that patch in contrib is a patch against crosstool itself,
so it doesn't affect what i've written above.  i'm looking at that
patch as a totally independent issue.

rday
-------------- next part --------------
A little hack for cross-compiling NPTL w/out linuxthreads.

--- libc/nptl/sysdeps/pthread/configure.in
+++ libc/nptl/sysdeps/pthread/configure.in
@@ -28,6 +28,9 @@
 struct _Unwind_Context *context;
 _Unwind_GetCFA (context)],
 libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)])
+if test $libc_cv_forced_unwind = no -a $build_cpu != $host_cpu; then
+  libc_cv_forced_unwind=yes
+fi
 if test $libc_cv_forced_unwind = yes; then
   AC_DEFINE(HAVE_FORCED_UNWIND)
 dnl Check for C cleanup handling.
@@ -41,6 +44,9 @@
   puts ("test")],
 libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
   CFLAGS="$old_CFLAGS"
+  if test $libc_cv_c_cleanup = no -a $build_cpu != $host_cpu; then
+    libc_cv_c_cleanup=yes
+  fi
   if test $libc_cv_c_cleanup = no; then
     AC_MSG_ERROR([the compiler must support C cleanup handling])
   fi
--- libc/nptl/sysdeps/pthread/configure
+++ libc/nptl/sysdeps/pthread/configure
@@ -81,6 +81,10 @@
 fi
 echo "$as_me:$LINENO: result: $libc_cv_forced_unwind" >&5
 echo "${ECHO_T}$libc_cv_forced_unwind" >&6
+if test $libc_cv_forced_unwind = no -a $build_cpu != $host_cpu; then
+  echo "$as_me:$LINENO: forcing libc_cv_forced_unwind = yes for cross-compile"
+  libc_cv_forced_unwind=yes
+fi
 if test $libc_cv_forced_unwind = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_FORCED_UNWIND 1
@@ -147,6 +151,10 @@
 echo "$as_me:$LINENO: result: $libc_cv_c_cleanup" >&5
 echo "${ECHO_T}$libc_cv_c_cleanup" >&6
   CFLAGS="$old_CFLAGS"
+  if test $libc_cv_c_cleanup = no -a $build_cpu != $host_cpu; then
+    echo "$as_me:$LINENO: result: forcing libc_cv_c_cleanup = yes for cross-compile"
+    libc_cv_c_cleanup=yes
+  fi
   if test $libc_cv_c_cleanup = no; then
     { { echo "$as_me:$LINENO: error: the compiler must support C cleanup handling" >&5
 echo "$as_me: error: the compiler must support C cleanup handling" >&2;}

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
-------------- next part --------------
------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.org


More information about the crossgcc mailing list