[uClibc-cvs] svn commit: branches/uClibc-nptl: include libpthread/nptl libpthread/nptl/ etc...
sjhill at uclibc.org
sjhill at uclibc.org
Wed Aug 17 15:01:23 UTC 2005
Author: sjhill
Date: 2005-08-17 09:01:22 -0600 (Wed, 17 Aug 2005)
New Revision: 11184
Log:
Rename 'fork.c' to be 'fork-nptl.c' because it ends up replacing the object 'libc/sysdeps/linux/common/fork.o' and 'fork' then appears as undefined when applications are linked against uClibc.
Added:
branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/fork-nptl.c
Removed:
branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Subdirs
branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/configure
branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/configure.in
branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/fork.c
Modified:
branches/uClibc-nptl/include/features.h
branches/uClibc-nptl/libpthread/nptl/Makefile
branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Makefile
branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile
branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile
Changeset:
Modified: branches/uClibc-nptl/include/features.h
===================================================================
--- branches/uClibc-nptl/include/features.h 2005-08-17 14:48:11 UTC (rev 11183)
+++ branches/uClibc-nptl/include/features.h 2005-08-17 15:01:22 UTC (rev 11184)
@@ -106,19 +106,6 @@
#undef __FAVOR_BSD
#undef __KERNEL_STRICT_NAMES
-/*
- * NPTL requires this to be defined. Unfortunately, due to complexities
- * in include dependencies, this cannot be defined on a per file basis.
- */
-#define __need_uClibc_config_h
-#include <bits/uClibc_config.h>
-#ifdef __PTHREADS_NATIVE__
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-# endif
-#endif
-#undef __need_uClibc_config_h
-
/* Suppress kernel-name space pollution unless user expressedly asks
for it. */
#ifndef _LOOSE_KERNEL_NAMES
Modified: branches/uClibc-nptl/libpthread/nptl/Makefile
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/Makefile 2005-08-17 14:48:11 UTC (rev 11183)
+++ branches/uClibc-nptl/libpthread/nptl/Makefile 2005-08-17 15:01:22 UTC (rev 11184)
@@ -182,6 +182,13 @@
#
# The rest of this file is uClibc specific.
#
+CFLAGS-pthread_barrier_init.c = -D_GNU_SOURCE
+CFLAGS-pthread_barrier_destroy.c = -D_GNU_SOURCE
+CFLAGS-pthread_barrierattr_init.c = -D_GNU_SOURCE
+CFLAGS-pthread_barrierattr_destroy.c = -D_GNU_SOURCE
+CFLAGS-pthread_barrierattr_getpshared.c = -D_GNU_SOURCE
+CFLAGS-pthread_barrierattr_setpshared.c = -D_GNU_SOURCE
+CFLAGS-sem_open.c = -D_GNU_SOURCE
libpthread-os-routines = pthread_yield
libpthread-misc-routines = pthread_rwlock_rdlock pthread_rwlock_timedrdlock \
Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Makefile
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Makefile 2005-08-17 14:48:11 UTC (rev 11183)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Makefile 2005-08-17 15:01:22 UTC (rev 11184)
@@ -34,6 +34,14 @@
pthread_spin_init.c pthread_spin_unlock.c sigaction.c \
unwind-forcedunwind.c
+#
+# Needed to get pthread types.
+#
+CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE
+CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE
+CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE
+CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE
+
COBJ-LIBP-ST = $(patsubst %.c, %.o, $(CSRC))
COBJ-LIBP-SH = $(patsubst %.c, %.os, $(CSRC))
@@ -49,10 +57,10 @@
$(AR) $(ARFLAGS) $(PTDIR)../$(LIBPTHREAD_SHARED_ARCHIVE) $(COBJ-LIBP-SH)
$(COBJ-LIBP-ST): %.o : %.c
- $(CC) $(CFLAGS-LIBP) -c $< -o $@
+ $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -c $< -o $@
$(COBJ-LIBP-SH): %.os : %.c
- $(CC) $(CFLAGS-LIBP) -DSHARED -c $< -o $@
+ $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -DSHARED -c $< -o $@
clean:
$(RM) *.o *.os *~ core
Deleted: branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Subdirs
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Subdirs 2005-08-17 14:48:11 UTC (rev 11183)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Subdirs 2005-08-17 15:01:22 UTC (rev 11184)
@@ -1 +0,0 @@
-nptl_db
Deleted: branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/configure
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/configure 2005-08-17 14:48:11 UTC (rev 11183)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/configure 2005-08-17 15:01:22 UTC (rev 11184)
@@ -1,159 +0,0 @@
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
-
-if test "x$libc_cv_gcc___thread" != xyes; then
- { { echo "$as_me:$LINENO: error: compiler support for __thread is required" >&5
-echo "$as_me: error: compiler support for __thread is required" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-if test "x${libc_cv_visibility_attribute}" != xyes ||
- test "x${libc_cv_broken_visibility_attribute}" != xno; then
- { { echo "$as_me:$LINENO: error: working compiler support for visibility attribute is required" >&5
-echo "$as_me: error: working compiler support for visibility attribute is required" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-if test "x$libc_cv_asm_cfi_directives" != xyes; then
- case "$base_machine" in
- i386 | x86_64 | powerpc | s390)
- { { echo "$as_me:$LINENO: error: CFI directive support in assembler is required" >&5
-echo "$as_me: error: CFI directive support in assembler is required" >&2;}
- { (exit 1); exit 1; }; } ;;
- *) ;;
- esac
-fi
-
-
-echo "$as_me:$LINENO: checking for forced unwind support" >&5
-echo $ECHO_N "checking for forced unwind support... $ECHO_C" >&6
-if test "${libc_cv_forced_unwind+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <unwind.h>
-int
-main ()
-{
-
-struct _Unwind_Exception exc;
-struct _Unwind_Context *context;
-_Unwind_GetCFA (context)
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- libc_cv_forced_unwind=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-libc_cv_forced_unwind=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-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 = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_FORCED_UNWIND 1
-_ACEOF
-
- old_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -fexceptions"
- echo "$as_me:$LINENO: checking for C cleanup handling" >&5
-echo $ECHO_N "checking for C cleanup handling... $ECHO_C" >&6
-if test "${libc_cv_c_cleanup+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <stdio.h>
-void cl (void *a) { }
-int
-main ()
-{
-
- int a __attribute__ ((cleanup (cl)));
- puts ("test")
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- libc_cv_c_cleanup=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-libc_cv_c_cleanup=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-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; 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;}
- { (exit 1); exit 1; }; }
- fi
-else
- { { echo "$as_me:$LINENO: error: forced unwind support is required" >&5
-echo "$as_me: error: forced unwind support is required" >&2;}
- { (exit 1); exit 1; }; }
-fi
Deleted: branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/configure.in
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/configure.in 2005-08-17 14:48:11 UTC (rev 11183)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/configure.in 2005-08-17 15:01:22 UTC (rev 11184)
@@ -1,49 +0,0 @@
-dnl configure fragment for new libpthread implementation.
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-
-if test "x$libc_cv_gcc___thread" != xyes; then
- AC_MSG_ERROR(compiler support for __thread is required)
-fi
-
-if test "x${libc_cv_visibility_attribute}" != xyes ||
- test "x${libc_cv_broken_visibility_attribute}" != xno; then
- AC_MSG_ERROR(working compiler support for visibility attribute is required)
-fi
-
-if test "x$libc_cv_asm_cfi_directives" != xyes; then
- dnl We need this only for some architectures.
- case "$base_machine" in
- i386 | x86_64 | powerpc | s390)
- AC_MSG_ERROR(CFI directive support in assembler is required) ;;
- *) ;;
- esac
-fi
-
-dnl Iff <unwind.h> is available, make sure it is the right one and it
-dnl contains struct _Unwind_Exception.
-AC_CACHE_CHECK(dnl
-for forced unwind support, libc_cv_forced_unwind, [dnl
-AC_TRY_LINK([#include <unwind.h>], [
-struct _Unwind_Exception exc;
-struct _Unwind_Context *context;
-_Unwind_GetCFA (context)],
-libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)])
-if test $libc_cv_forced_unwind = yes; then
- AC_DEFINE(HAVE_FORCED_UNWIND)
-dnl Check for C cleanup handling.
- old_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -fexceptions"
- AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl
- AC_TRY_LINK([
-#include <stdio.h>
-void cl (void *a) { }], [
- int a __attribute__ ((cleanup (cl)));
- puts ("test")],
-libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
- CFLAGS="$old_CFLAGS"
- if test $libc_cv_c_cleanup = no; then
- AC_MSG_ERROR([the compiler must support C cleanup handling])
- fi
-else
- AC_MSG_ERROR(forced unwind support is required)
-fi
Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile 2005-08-17 14:48:11 UTC (rev 11183)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile 2005-08-17 15:01:22 UTC (rev 11184)
@@ -52,6 +52,11 @@
CSRC-LIBP-ST += rtld-libc-lowlevellock.c
endif
+#
+# Needed to get pthread types.
+#
+CFLAGS-pt-fork.c = -D_GNU_SOURCE
+
COBJ-LIBP-ST = $(patsubst %.c, %.o, $(CSRC-LIBP-ST))
COBJ-LIBP-SH = $(patsubst %.c, %.os, $(CSRC-LIBP-SH))
COBJ-LIBC-ST = $(patsubst %.c, %.o, $(CSRC-LIBC-ST))
@@ -69,16 +74,16 @@
$(AR) $(ARFLAGS) $(PTDIR)../$(LIBPTHREAD_SHARED_ARCHIVE) $(COBJ-LIBP-SH)
$(COBJ-LIBP-ST): %.o : %.c
- $(CC) $(CFLAGS-LIBP) -c $< -o $@
+ $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -c $< -o $@
$(COBJ-LIBP-SH): %.os : %.c
- $(CC) $(CFLAGS-LIBP) -DSHARED -c $< -o $@
+ $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -DSHARED -c $< -o $@
$(COBJ-LIBC-ST): %.o : %.c
- $(CC) $(CFLAGS-LIBC) -c $< -o $@
+ $(CC) $(CFLAGS-$<) $(CFLAGS-LIBC) -c $< -o $@
$(COBJ-LIBC-SH): %.os : %.c
- $(CC) $(CFLAGS-LIBC) -DSHARED -c $< -o $@
+ $(CC) $(CFLAGS-$<) $(CFLAGS-LIBC) -DSHARED -c $< -o $@
objs-pthread-libc: $(COBJ-LIBC-ST) $(COBJ-LIBC-SH)
ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile 2005-08-17 14:48:11 UTC (rev 11183)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile 2005-08-17 15:01:22 UTC (rev 11184)
@@ -27,7 +27,7 @@
CSRC-LIBP-ST = pthread_once.c
CSRC-LIBP-SH = $(CSRC-LIBP-ST)
-CSRC-LIBC-ST = fork.c
+CSRC-LIBC-ST = fork-nptl.c
CSRC-LIBC-SH = $(CSRC-LIBC-ST)
AOBJ-LIBP-ST = $(patsubst %.S, %.o, $(ASRC-LIBP-ST))
@@ -38,7 +38,7 @@
COBJ-LIBC-SH = $(patsubst %.c, %.os, $(CSRC-LIBC-SH))
ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
+CFLAGS-fork-nptl.c = -D__USE_STDIO_FUTEXES__
endif
ar-target all: $(AOBJ-LIBP-ST) $(AOBJ-LIBP-SH) $(COBJ-LIBP-ST) $(COBJ-LIBP-SH)
Copied: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/fork-nptl.c (from rev 11165, branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/fork.c)
Deleted: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/fork.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/fork.c 2005-08-17 14:48:11 UTC (rev 11183)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/fork.c 2005-08-17 15:01:22 UTC (rev 11184)
@@ -1 +0,0 @@
-#include "../i386/fork.c"
More information about the uClibc-cvs
mailing list