This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

comments on patch for NPTL support?


  what follows is a (glibc) patch i found on the net for adding what
appears to be NPTL-only support (not including linuxthreads).  as dan
pointed out to me by email, that patch is clearly not acceptable if it
prevents linuxthreads support.  any comments on patches that would
allow both, based on the selection with "--enable-add-ons"?  thanks.

rday



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;}

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]