diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-21 22:07:30 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-21 22:07:30 +0000 |
commit | 33b8ea2a147a3bf8f4617b0399cbb2b2dbbb6f9e (patch) | |
tree | 4c9de9e1ba2a27a47f6d8da1bbd87446fe43e48f /boehm-gc/configure.ac | |
parent | e405ec65e3d665ec66e9356351e7da3e02dd8232 (diff) | |
download | gcc-33b8ea2a147a3bf8f4617b0399cbb2b2dbbb6f9e.tar.gz |
boehm-gc
PR libgcj/13212:
* configure.ac: Check for pthread_getattr_np(). Remove
GC_PTHREAD_SYM_VERSION detection.
* include/gc.h (GC_register_my_thread, GC_unregister_my_thread,
GC_get_thread_stack_base): New declarations.
* pthread_support.c (GC_register_my_thread, GC_unregister_my_thread,
GC_get_thread_stack_base): New functions.
(GC_delete_thread): Don't try to free the first_thread.
* misc.c (GC_init_inner): Use GC_get_thread_stack_base() if possible.
(pthread_create_, constr): Removed.
(pthread_create): Don't rename.
* include/gc_ext_config.h.in: Rebuilt.
* include/gc_pthread_redirects.h (pthread_create): Define
unconditionally.
* include/gc_config.h.in: Rebuilt.
* configure: Rebuilt.
libjava
* java/lang/natThread.cc (_Jv_AttachCurrentThread): Attach thread
to GC.
(_Jv_DetachCurrentThread): Detach thread from GC.
* include/boehm-gc.h (_Jv_GCAttachThread, _Jv_GCDetachThread):
Declare.
* boehm.cc (_Jv_GCAttachThread): New function.
(_Jv_GCDetachThread): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116313 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/configure.ac')
-rw-r--r-- | boehm-gc/configure.ac | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/boehm-gc/configure.ac b/boehm-gc/configure.ac index b1d53cf6a88..807b7a1a758 100644 --- a/boehm-gc/configure.ac +++ b/boehm-gc/configure.ac @@ -1,4 +1,4 @@ -# Copyright (c) 1999, 2000, 2001, 2002, 2003 by Red Hat, Inc. All rights reserved. +# Copyright (c) 1999, 2000, 2001, 2002, 2003, 2006 by Red Hat, Inc. All rights reserved. # Copyright 2004 Nathanael Nerode # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED @@ -329,6 +329,13 @@ case "$host" in ;; esac +# Checks for pthreads functions +# +oldLIBS="$LIBS" +LIBS="$LIBS $THREADLIBS" +AC_CHECK_FUNCS([pthread_getattr_np]) +LIBS="$oldLIBS" + # Configuration of machine-dependent code # # We don't set NO_EXECUTE_PERMISSION by default because gcj (and @@ -488,25 +495,6 @@ if test "${gc_use_mmap}" = "yes"; then AC_DEFINE(USE_MMAP, 1, [use MMAP instead of sbrk to get new memory]) fi -symver= -case "$target" in - *-*-linux* ) - cat > conftest.c <<EOF -#include <pthread.h> -void *tf (void *arg) { (void) arg; return NULL; } -int main (void) { pthread_t th; pthread_create (&th, NULL, tf, NULL); return 0; } -EOF - if $CC $CFLAGS -pthread -o conftest conftest.c > /dev/null 2>&1; then - symver=`readelf -s conftest 2> /dev/null | sed -n '/UND pthread_create@/{s/^.*@//;s/ .*$//;p;q}'` - fi - rm -f conftest conftest.c - ;; -esac -if test -n "$symver"; then - AC_DEFINE_UNQUOTED(GC_PTHREAD_SYM_VERSION, "$symver", [symbol version of pthread_create]) -fi - - if test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then toolexecdir='$(exec_prefix)/$(target_noncanonical)' |