aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog87
-rw-r--r--Makeconfig121
-rw-r--r--Makefile14
-rw-r--r--Makerules56
-rw-r--r--Rules4
-rw-r--r--config.make.in2
-rwxr-xr-xconfigure232
-rw-r--r--configure.in207
-rw-r--r--csu/Makefile7
-rw-r--r--hurd/Depend9
-rw-r--r--libidn/Makefile6
-rw-r--r--libidn/configure3
-rw-r--r--libidn/configure.in3
-rw-r--r--math/Makefile2
-rw-r--r--nptl/ChangeLog30
-rw-r--r--nptl/Makeconfig6
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/configure9
-rw-r--r--nptl/sysdeps/pthread/Makefile4
-rw-r--r--nptl/sysdeps/pthread/Subdirs1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/alpha/clone.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/clone.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/vfork.S19
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/clone2.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/clone.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sleep.c12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/clone.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S16
-rwxr-xr-xscripts/gen-sorted.awk113
-rw-r--r--stdlib/Makefile3
-rw-r--r--stdlib/gen-mpn-copy35
-rw-r--r--sysdeps/gnu/Makefile11
-rw-r--r--sysdeps/mach/Subdirs10
-rw-r--r--sysdeps/unix/Makefile7
41 files changed, 795 insertions, 361 deletions
diff --git a/ChangeLog b/ChangeLog
index dfdfbb7586..0bf0b80578 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,88 @@
+2006-02-27 Roland McGrath <roland@redhat.com>
+
+ * 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.
+
2006-02-27 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/linkat.c (linkat): Allow flags to be set
@@ -6,6 +91,8 @@
2006-02-26 Roland McGrath <roland@redhat.com>
+ * bare: Directory removed, saved in ports repository.
+
* sysdeps/unix/common/Makefile: File removed.
* sysdeps/unix/common/glue-ctype.c: File removed.
* sysdeps/unix/common/configure.in: File removed.
diff --git a/Makeconfig b/Makeconfig
index 64ab926666..a0638f8343 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -99,7 +99,20 @@ binfmt-subdir = aout
endif
# Complete path to sysdep dirs.
-export full_config_sysdirs := $(addprefix $(..),$(config-sysdirs))
+# `configure' writes a definition of `config-sysdirs' in `config.make'.
+sysdirs := $(foreach D,$(config-sysdirs),$(firstword $(filter /%,$D) $(..)$D))
+
+# Add-ons that contribute sysdeps trees get added to the include list
+# after sysdeps/generic. This makes #include <sysdeps/...> work right
+# to find specific add-on files without assuming the add-on directory name.
+# It also means that headers can go into an add-on's base directory
+# instead of the add-on needing a sysdeps/generic of its own.
++sysdep_dirs := $(sysdirs) $(foreach add-on,$(sysdeps-add-ons),\
+ $(firstword $(filter /%,$(add-on)) \
+ $(..)$(add-on)))
+ifdef objdir
++sysdep_dirs := $(objdir) $(+sysdep_dirs)
+endif
# Run config.status to update config.make and config.h. We don't show the
# dependence of config.h to Make, because it is only touched when it
@@ -113,16 +126,16 @@ $(common-objpfx)config.make: $(common-objpfx)config.status \
# Find all the add-on and sysdeps configure fragments, to make sure we
# re-run configure when any of them changes.
$(common-objpfx)config.status: $(..)version.h $(..)configure \
- $(foreach dir,$(full_config_sysdirs),\
- $(wildcard \
- $(dir)/Implies) \
+ $(foreach dir,$(sysdirs),\
+ $(wildcard $(dir)/Implies) \
$(patsubst %.in,%,\
$(firstword $(wildcard \
$(addprefix $(dir)/,configure configure.in))))) \
$(patsubst %.in,%,\
- $(foreach dir,$(add-ons),\
+ $(foreach add-on,$(add-ons),\
$(firstword $(wildcard \
- $(addprefix $(..)$(dir)/,configure configure.in)))))
+ $(addprefix $(firstword $(filter /%,$(add-on)) $(..)$(add-on))/,\
+ configure configure.in)))))
@cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \
echo The GNU C library has not been configured. >&2; \
echo Run \`configure\' to configure it before building. >&2; \
@@ -632,11 +645,10 @@ endif # $(+cflags) == ""
# include files (including ones given in angle brackets) in the parent
# library source directory, in the include directory, and in the
# current directory.
-# `+sysdep-includes' will be defined by Makerules.
-+includes = -I$(..)include \
- $(patsubst %/,-I%,$(objpfx)) $(+sysdep-includes) \
- $(patsubst %/,-I%,$(..)) $(libio-include) $(includes) -I. \
- $(sysincludes)
++sysdep-includes = $(addprefix -I,$(+sysdep_dirs))
++includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
+ $(+sysdep-includes) \
+ $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
# Since libio has several internal header files, we use a -I instead
# of many little headers in the include directory.
@@ -753,12 +765,10 @@ endif
move-if-change = $(SHELL) $(..)scripts/move-if-change
--include $(common-objpfx)sysd-dirs
-
-ifeq ($(sysd-dirs-done),t)
-include $(common-objpfx)sysd-sorted
subdirs = $(sorted-subdirs)
-endif
+subdir-srcdirs = $(foreach dir,$(subdirs),\
+ $(firstword $($(dir)-srcdir) $(..)$(dir)))
ifeq (yes, $(build-shared))
@@ -789,9 +799,8 @@ ifndef avoid-generated
# This lets add-ons give more-specific matches that override defaults
# in the top-level file.
$(common-objpfx)shlib-versions.v.i: \
- $(wildcard $(patsubst %, $(..)%/shlib-versions,$(add-ons) \
- $(config-sysdirs) \
- $(subdirs))) \
+ $(wildcard $(+sysdep_dirs:=/shlib-versions) \
+ $(subdir-srcdirs:=/shlib-versions)) \
$(..)shlib-versions
soversions-default-setname = $(patsubst %, %,\
@@ -891,81 +900,39 @@ endif
# These are the subdirectories containing the library source. The order
# is more or less arbitrary. The sorting step will take care of the
-# dependencies. Only the $(binfmt-subdir) should always be kept at the
-# end of the list.
+# dependencies.
all-subdirs = csu assert ctype locale intl catgets math setjmp signal \
- stdlib stdio-common libio malloc string wcsmbs time dirent \
+ stdlib stdio-common libio malloc string wcsmbs time dirent \
grp pwd posix io termios resource misc socket sysvipc gmon \
gnulib iconv iconvdata wctype manual shadow po argp \
- crypt $(add-ons) nss localedata timezone rt conform debug \
- $(sysdep-subdirs) $(dlfcn) $(binfmt-subdir)
-all-subdirs := $(filter-out $(sysdep-inhibit-subdirs),$(all-subdirs))
-
-# The mach and hurd subdirectories have many generated header files which
-# much of the rest of the library depends on, so it is best to build them
-# first (and mach before hurd, at that). The before-compile additions in
-# sysdeps/{mach,hurd}/Makefile should make it reliably work for these files
-# not to exist when making in other directories, but it will be slower that
-# way with more somewhat expensive `make' invocations.
-subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
- $(filter-out mach hurd,$(subdirs))
+ crypt nss localedata timezone rt conform debug \
+ $(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
ifndef avoid-generated
-all-Subdirs-files = $(wildcard $(config-sysdirs:%=$(..)%/Subdirs))
-$(common-objpfx)sysd-dirs: $(common-objpfx)config.make $(all-Subdirs-files)
- $(AWK) 'BEGIN { subdirs = ""; inhibit = "" }; \
- /^#/ { next }; \
- /^[^-]/ { subdirs = subdirs " " $$0 }; \
- /^-/ { inhibit = inhibit " " substr($$0, 2) }; \
- END { printf "sysdep-subdirs =%s\n", subdirs; \
- printf "sysdep-inhibit-subdirs =%s\n", inhibit; \
- print "sysd-dirs-done = t" }' \
- $(patsubst $<,/dev/null,$^) > $@-tmp
- mv -f $@-tmp $@
-
-all-Depend-files = $(wildcard $(..)*/Depend)
-$(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk $(all-Depend-files) \
- $(common-objpfx)sysd-dirs $(..)Makeconfig
- { { dirs='$(patsubst $(..)%/Depend,%,$(filter %/Depend,$^))'; \
- for d in $$dirs; do \
- while read on; do \
- echo "depend $$d $$on"; \
- done < $(..)$$d/Depend; \
- done; \
- for f in $(all-subdirs); do \
- echo $$f; \
- done; \
- } | $(AWK) -f $< && \
- echo sysd-sorted-done = t; \
- } > $@-tmp
+all-Depend-files := $(wildcard $(foreach dir,$(all-subdirs),\
+ $(firstword $($(dir)-srcdir) \
+ $(..)$(dir))/Depend))
+$(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk \
+ $(common-objpfx)config.make $(..)Makeconfig \
+ $(wildcard $(sysdirs:=/Subdirs)) \
+ $(all-Depend-files)
+ $(AWK) -f $< \
+ -v subdirs='$(all-subdirs)' \
+ -v srcpfx='$(..)' \
+ $(filter %/Subdirs %/Depend,$^) > $@-tmp
mv -f $@-tmp $@
$(all-Depend-files): ;
endif
# Let sysdeps/ subdirs contain a Makeconfig fragment for us to include here.
-sysdep-makeconfigs := $(wildcard $(patsubst %,$(..)%/Makeconfig,\
- $(config-sysdirs) $(add-ons)))
-
+sysdep-makeconfigs := $(wildcard $(+sysdep_dirs:=/Makeconfig))
ifneq (,$(sysdep-makeconfigs))
-Makeconfig-doing-sysdep := $(sysdep-makeconfigs)
-# Before each one, include ourselves again to do the bit below that
-# will set `Makeconfig-add-on' in an add-on's Makeconfig fragment.
-include $(foreach M,$(sysdep-makeconfigs),$(..)Makeconfig $M)
+include $(sysdep-makeconfigs)
endif
endif # Makeconfig not yet included
-# The whole body above didn't run when we are included as a subroutine
-# of ourselves in the sysdep-makeconfigs include line. This bit runs.
-ifneq (,$(Makeconfig-doing-sysdep))
-sysdep-Makeconfig := $(firstword $(Makeconfig-doing-sysdep))
-Makeconfig-doing-sysdep := $(filter-out $(sysdep-Makeconfig),\
- $(Makeconfig-doing-sysdep))
-Makeconfig-add-on := $(filter $(add-ons),$(patsubst $(..)%/Makeconfig,%,\
- $(sysdep-Makeconfig)))
-endif
-
# Local Variables:
# mode: makefile
# End:
diff --git a/Makefile b/Makefile
index 8a7fbf307f..8db0ff51f4 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,7 @@ endef
configure: configure.in aclocal.m4; $(autoconf-it)
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
+%/preconfigure: %/preconfigure.in aclocal.m4; $(autoconf-it)
endif # $(AUTOCONF) = no
@@ -202,7 +203,13 @@ all-subdirs-targets := $(foreach dir,$(subdirs),\
# The action for each of those is to cd into the directory and make the
# target there.
$(all-subdirs-targets):
- $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
+ $(MAKE) $(PARALLELMFLAGS) $(subdir-target-args) $(@F)
+
+define subdir-target-args
+subdir=$(@D)$(if $($(@D)-srcdir),\
+-C $($(@D)-srcdir) ..=`pwd`/,\
+-C $(@D) ..=../)
+endef
.PHONY: $(+subdir_targets) $(all-subdirs-targets)
@@ -353,17 +360,16 @@ files-for-dist := README FAQ INSTALL NOTES configure
tag-of-stem = glibc-$(subst .,_,$*)
# Add-ons in the main repository but distributed in their own tar files.
-dist-separate = libidn linuxthreads
+dist-separate = libidn
# Directories in each add-on.
dist-separate-libidn = libidn
-dist-separate-linuxthreads = linuxthreads linuxthreads_db
glibc-%.tar $(dist-separate:%=glibc-%-%.tar): $(files-for-dist) \
$(foreach D,$(dist-separate),\
$D/configure)
@rm -fr glibc-$*
- $(MAKE) -q `find sysdeps $(addsuffix /sysdeps,$(add-ons)) \
+ $(MAKE) -q `find sysdeps $(addsuffix /sysdeps,$(sysdeps-add-ons)) \
-name configure`
cvs $(CVSOPTS) -Q export -d glibc-$* -r $(tag-of-stem) libc
# Touch all the configure scripts going into the tarball since cvs export
diff --git a/Makerules b/Makerules
index a96a03eee4..13d9248479 100644
--- a/Makerules
+++ b/Makerules
@@ -56,22 +56,6 @@ ifndef +included-Makeconfig
include $(..)Makeconfig
endif
-# `configure' writes a definition of `config-sysdirs' in `config.make'.
-sysdirs = $(strip $(full_config_sysdirs))
-
-+sysdir_pfx = $(common-objpfx)
-
-export sysdirs := $(sysdirs)
-
-+sysdep_dirs := $(full_config_sysdirs)
-ifdef objdir
-+sysdep_dirs := $(objdir) $(+sysdep_dirs)
-endif
-
-# Add -I switches to get the right sysdep directories.
-# `+includes' in Makeconfig references $(+sysdep-includes).
-+sysdep-includes := $(addprefix -I,$(+sysdep_dirs))
-
# This variable is used in ``include $(o-iterator)'' after defining
# $(o-iterator-doit) to produce some desired rule using $o for the object
# suffix, and setting $(object-suffixes-left) to $(object-suffixes); a copy
@@ -94,7 +78,7 @@ vpath %.x $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
# being included individually by a subdir makefile (hurd/Makefile needs this).
in-Makerules := yes
-sysdep-makefiles := $(wildcard $(full_config_sysdirs:=/Makefile))
+sysdep-makefiles := $(wildcard $(sysdirs:=/Makefile))
ifneq (,$(sysdep-makefiles))
include $(sysdep-makefiles)
endif
@@ -229,20 +213,22 @@ endef
close-check-inhibit-asm = ;; esac ;
endif
--include $(+sysdir_pfx)sysd-rules
+-include $(common-objpfx)sysd-rules
ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
# The value of $(+sysdep_dirs) the sysd-rules was computed for
# differs from the one we are using now. So force a rebuild of sysd-rules.
sysd-rules-force = FORCE
FORCE: