From e0a3ed4ff95ec2e422c1211b35ddf7bf6fbc0a5a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Feb 2006 07:11:04 +0000 Subject: * Makefile (subdir-target-args): New variable. ($(all-subdirs-targets)): Use it in place of -C option. * Rules: Use $(..) instead of ../ if it's already defined. * Makeconfig (subdir-srcdirs): New variable. * csu/Makefile (all-Banner-files): Use it. * configure.in (--enable-add-ons): Set to "yes" by default. Handle absolute add-on directory names when looking for configure fragments. Also look for sysdeps/*/preconfigure fragments in add-ons. Require add-on configure to set $libc_add_on_canonical, use that in $add_ons_sfx. Substitute add_on_subdirs with computed list of subdir names each add-on configure set in libc_add_on_subdirs. * configure: Regenerated. * Makefile (%/preconfigure: %/preconfigure.in): New pattern rule. * config.make.in (add-on-subdirs): New substituted variable. * Makeconfig (all-subdirs): Include $(add-on-subdirs). Remove $(add-ons), $(sysdep-subdirs). Don't filter out $(sysdep-inhibit-subdirs). ($(common-objpfx)sysd-dirs): Target removed. Don't include it. ($(common-objpfx)sysd-sorted): Rewritten to feed Depend and Subdirs files together to gen-sorted.awk, and $(subdirs) via -v. (subdirs): Remove magic reordering for mach and hurd. * scripts/gen-sorted.awk: Use subdirs from command line. Process Subdirs and Depend files directly. Let Subdirs files use "first dir" and "inhibit dir". Always move elf to the end of the list. * hurd/Depend: New file. * sysdeps/mach/Subdirs: Use "first mach". * Makefile (dist-separate): Remove linuxthreads. (dist-separate-linuxthreads): Variable removed. (glibc-%.tar rule): Use $(sysdeps-add-ons). * Makerules ($(common-objpfx)Versions.v.i): Use $(subdirs), not $(all-subdirs). (sysdep-makefiles): Use $(sysdirs). (sysdirs): Remove export. ($(+sysdir_pfx)sysd-rules): Handle absolute directory names in $(config-sysdirs). (+sysdir_pfx): Variable removed. (sysd-rules): Use $(common-objpfx) in place of it. (sysdirs): Variable moved to ... * Makeconfig (sysdirs): ... here. Handle absolute directory names in $(config-sysdirs). (full_config_sysdirs): Variable removed. * csu/Makefile: Use $(sysdirs) in vpath directive. * math/Makefile (ulps-file): Use $(sysdirs). * sysdeps/gnu/Makefile (errlist-c): Likewise. ($(objpfx)errlist-compat.c): Likewise. * Makeconfig (all-Subdirs-files): Likewise. ($(common-objpfx)config.status): Likewise. * configure.in (sysnames): Handle absolute add-on directory names. (sysdeps_add_ons): New variable, AC_SUBST it. Compute which add-ons contributed sysdeps directories. * configure: Regenerated. * config.make.in (sysdeps-add-ons): New substituted variable. * Makerules (+sysdep_dirs, +sysdep-includes): Variables moved ... * Makeconfig: ... to here. (+sysdep_dirs): Append $(sysdeps-add-ons) here. (+includes): Remove $(objpfx) include, already in $(+sysdep_dirs). Remove $(includes). (sysdep-makeconfigs): Use $(+sysdep_dirs). ($(common-objpfx)shlib-versions.v.i): Likewise. * Makeconfig: Remove hair to set Makeconfig-add-on. * sysdeps/unix/Makefile (sysdirs): Remove export. (asm_CPP): Variable removed. ($(common-objpfx)sysd-syscalls): Pass them directly for the script. * sysdeps/posix/Makefile: New file. * Makerules (L_tmpnam, TMP_MAX, L_ctermid, L_cuserid): Set non-posix values here with ?=. * stdlib/gen-mpn-copy: File removed. * stdlib/Makefile (distribute): Remove it. * configure.in: Don't grok --with-gmp. * configure: Regenerated. * configure.in (libc_cv_idn): Don't check it; libidn/configure does it. * configure: Regenerated. * bare: Directory removed, saved in ports repository. --- nptl/ChangeLog | 30 ++++++++++++++++++++++ nptl/Makeconfig | 6 +---- nptl/Makefile | 2 +- nptl/configure | 9 +++---- nptl/sysdeps/pthread/Makefile | 4 +-- nptl/sysdeps/pthread/Subdirs | 1 + nptl/sysdeps/unix/sysv/linux/alpha/clone.S | 11 ++++++-- nptl/sysdeps/unix/sysv/linux/i386/clone.S | 11 ++++++-- nptl/sysdeps/unix/sysv/linux/i386/vfork.S | 19 +++++++++----- nptl/sysdeps/unix/sysv/linux/ia64/clone2.S | 11 ++++++-- .../unix/sysv/linux/powerpc/powerpc32/clone.S | 12 ++++++--- .../unix/sysv/linux/powerpc/powerpc64/clone.S | 12 ++++++--- nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S | 11 ++++++-- nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S | 11 ++++++-- nptl/sysdeps/unix/sysv/linux/sh/clone.S | 11 ++++++-- nptl/sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h | 2 +- nptl/sysdeps/unix/sysv/linux/sleep.c | 12 +++++++-- nptl/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S | 11 ++++++-- nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S | 11 ++++++-- nptl/sysdeps/unix/sysv/linux/x86_64/clone.S | 11 ++++++-- nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S | 16 +++++++++--- 21 files changed, 173 insertions(+), 51 deletions(-) (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 8881c8d487..b4c320890f 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,33 @@ +2006-02-27 Roland McGrath + + * sysdeps/pthread/Subdirs: List nptl here too. + * configure (libc_add_on_canonical): New variable. + + * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next. + + * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of + self to get main source tree's file. + * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. + * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. + * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise. + * sysdeps/unix/sysv/linux/sh/clone.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise. + + * Makefile: Use $(sysdirs) in vpath directive. + + * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed. + (CPPFLAGS-timer_routines.c): Likewise. + + * Makeconfig (includes): Variable removed. + 2006-02-26 Roland McGrath * sysdeps/generic/pt-raise.c: Moved to ... diff --git a/nptl/Makeconfig b/nptl/Makeconfig index 681d76f61f..54e2f65b01 100644 --- a/nptl/Makeconfig +++ b/nptl/Makeconfig @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002,2003,2005,2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 2002. @@ -28,7 +28,3 @@ static-thread-library = $(common-objpfx)nptl/libpthread.a bounded-thread-library = $(common-objpfx)nptl/libpthread_b.a rpath-dirs += nptl - -ifneq ($(subdir),nptl) -includes += -I$(..)nptl -endif diff --git a/nptl/Makefile b/nptl/Makefile index e484c6ab61..fff33eaf54 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -528,7 +528,7 @@ $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a endif ifeq ($(build-shared),yes) -vpath pt-initfini.c $(full_config_sysdirs) +vpath pt-initfini.c $(sysdirs) $(objpfx)pt-initfini.s: pt-initfini.c $(compile.c) -S $(CFLAGS-pt-initfini.s) -finhibit-size-directive \ diff --git a/nptl/configure b/nptl/configure index 3ad635f48d..1ce3caec6e 100644 --- a/nptl/configure +++ b/nptl/configure @@ -1,6 +1,5 @@ -# This is only to keep the GNU C library configure mechanism happy. # This is a shell script fragment sourced by the main configure script. -# We have nothing we need to add here. -# -# Perhaps some day we will need a real configuration script for different -# kernel versions or so. +# We're obliged to give here the canonical name that will be used to +# as a subdirectory to search for in other add-ons' sysdeps trees. + +libc_add_on_canonical=nptl diff --git a/nptl/sysdeps/pthread/Makefile b/nptl/sysdeps/pthread/Makefile index 207e10fad2..72550d74a7 100644 --- a/nptl/sysdeps/pthread/Makefile +++ b/nptl/sysdeps/pthread/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002,2003,2004,2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 2002. @@ -18,7 +18,6 @@ # 02111-1307 USA. ifeq ($(subdir),csu) -CFLAGS-libc-start.c += -I../nptl routines += unwind-resume shared-only-routines += unwind-resume CFLAGS-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables @@ -31,7 +30,6 @@ endif ifeq ($(subdir),rt) librt-sysdep_routines += timer_routines librt-cancellation rt-unwind-resume librt-shared-only-routines += rt-unwind-resume -CPPFLAGS-timer_routines.c = -I../nptl CFLAGS-librt-cancellation.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-rt-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables diff --git a/nptl/sysdeps/pthread/Subdirs b/nptl/sysdeps/pthread/Subdirs index 4d1f4d876b..36266c1e69 100644 --- a/nptl/sysdeps/pthread/Subdirs +++ b/nptl/sysdeps/pthread/Subdirs @@ -1 +1,2 @@ +nptl nptl_db diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/clone.S b/nptl/sysdeps/unix/sysv/linux/alpha/clone.S index eea1cbeed1..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/alpha/clone.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/i386/clone.S b/nptl/sysdeps/unix/sysv/linux/i386/clone.S index 95c17f18e4..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/clone.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/i386/vfork.S b/nptl/sysdeps/unix/sysv/linux/i386/vfork.S index 52336102c7..37f0842051 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/vfork.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999,2002,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,10 +16,17 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else + +# include /* Save the PID value. */ -#define SAVE_PID \ +# define SAVE_PID \ movl %gs:PID, %edx; \ movl %edx, %eax; \ negl %eax; \ @@ -28,11 +35,11 @@ 1: movl %eax, %gs:PID /* Restore the old PID value in the parent. */ -#define RESTORE_PID \ +# define RESTORE_PID \ testl %eax, %eax; \ je 1f; \ movl %edx, %gs:PID; \ 1: - -#include +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S b/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S index 8664056f27..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S +++ b/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S index e19579e842..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S @@ -1,3 +1,9 @@ -#define RESET_PID -#include -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S index f87adf4737..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S @@ -1,3 +1,9 @@ -#define RESET_PID -#include -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S b/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S index 682f94dae8..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S b/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S index 87ee2e1846..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/sh/clone.S b/nptl/sysdeps/unix/sysv/linux/sh/clone.S index 62a11972d8..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/clone.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h index 8cdcac5560..90be7bd8d0 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h @@ -1,4 +1,4 @@ /* 4 instruction cycles not accessing cache and TLB are needed after trapa instruction to avoid an SH-4 silicon bug. */ #define NEED_SYSCALL_INST_PAD -#include +#include_next diff --git a/nptl/sysdeps/unix/sysv/linux/sleep.c b/nptl/sysdeps/unix/sysv/linux/sleep.c index c56b49b39f..2dce3210ca 100644 --- a/nptl/sysdeps/unix/sysv/linux/sleep.c +++ b/nptl/sysdeps/unix/sysv/linux/sleep.c @@ -1,2 +1,10 @@ -#include -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +/* This defines the CANCELLATION_P macro, which sleep.c checks for. */ +# include +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S index da6197c00d..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S index 410f32017a..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/clone.S b/nptl/sysdeps/unix/sysv/linux/x86_64/clone.S index dfa6adb3e2..675a997e97 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/clone.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/clone.S @@ -1,2 +1,9 @@ -#define RESET_PID -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else +# define RESET_PID +# include_next +#endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S b/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S index f68d40439e..9a9912ca85 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S @@ -16,9 +16,16 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +/* We want an #include_next, but we are the main source file. + So, #include ourselves and in that incarnation we can use #include_next. */ +#ifndef INCLUDED_SELF +# define INCLUDED_SELF +# include +#else -#define SAVE_PID \ +# include + +# define SAVE_PID \ movl %fs:PID, %esi; \ movl $0x80000000, %ecx; \ movl %esi, %edx; \ @@ -26,10 +33,11 @@ cmove %ecx, %edx; \ movl %edx, %fs:PID -#define RESTORE_PID \ +# define RESTORE_PID \ testq %rax, %rax; \ je 1f; \ movl %esi, %fs:PID; \ 1: -#include +# include_next +#endif -- cgit v1.2.3