aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog36
-rw-r--r--elf/rtld-Rules13
-rw-r--r--include/libc-symbols.h2
-rw-r--r--sysdeps/generic/bp-thunks.h6
-rw-r--r--sysdeps/unix/Makefile8
-rw-r--r--sysdeps/unix/sysv/linux/Makefile1
-rw-r--r--sysdeps/unix/sysv/linux/i386/bp-thunks.h7
7 files changed, 56 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 49c9ea5..c633204 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2003-05-01 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/generic/bp-thunks.h: Protect includes with [!__ASSEMBLER__].
+ * sysdeps/unix/sysv/linux/i386/bp-thunks.h: Likewise.
+
+ * sysdeps/unix/sysv/linux/Makefile ($(objpfx)syscall-%.h):
+ Use $(make-target-directory).
+ * sysdeps/unix/Makefile ($(objpfx)stub-syscalls.c): Likewise.
+
+ * Makerules (compile-mkdep-flags): New variable, pass -MD -MF $@.d.
+ (compile-command.S): Don't use ifndef. Append $(compile-mkdep-flags).
+ (compile-command.s, compile-command.c): Likewise.
+ ($(objpfx)%.d): All such pattern rules removed.
+ ($(+sysdir_pfx)sysd-rules): Don't generate them.
+ ($(common-objpfx)dummy.d): Target removed.
+ (make-dummy-dep): Variable removed.
+ (generate-md5): Likewise.
+ (%.d: %.dt): New pattern rule.
+ (+depfiles): Use $(wildcard) function to get just existing *.d files
+ and .d files for existing *.dt files.
+ (common-clean): Remove all *.d and *.dt files.
+ (before-compile): Add $(objpfx). when it doesn't exist,
+ regardless of $(no_deps).
+ * elf/rtld-Rules ($(objpfx)rtld-%.d): All such pattern rules removed.
+ (rtld-depfiles): Use .os.d instead of .d names.
+ Include existing *.d files and .d files for existing *.dt files.
+
+ * Makerules ($(common-objpfx)%.make): Protect with [! subdir].
+ Use -MD, -MT and -MF flags instead of SUNPRO_DEPENDENCIES variable.
+
+ * sysdeps/unix/Makefile ($(common-objpfx)s-%.d): Remove compat.h hack.
+ Do s-*.d includes only if we have some syscall routines in this subdir.
+
+ * include/libc-symbols.h (libc_freeres_ptr): Use %nobits instead of
+ @nobits. The former is accepted by gas on any ELF platform.
+
2003-05-01 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/semtimedop.c: New file.
diff --git a/elf/rtld-Rules b/elf/rtld-Rules
index 98bb24a..a1515e7 100644
--- a/elf/rtld-Rules
+++ b/elf/rtld-Rules
@@ -1,6 +1,6 @@
# Subroutine makefile for compiling libc modules linked into dynamic linker.
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 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
@@ -81,19 +81,13 @@ else
# The sysd-rules generated makefile already defines pattern rules for rtld-%
# targets built from sysdeps source files.
$(objpfx)rtld-%.os: %.S $(before-compile); $(compile-command.S)
-$(objpfx)rtld-%.d: %.S $(before-compile); $(+make-deps)
$(objpfx)rtld-%.os: %.s $(before-compile); $(compile-command.s)
-$(objpfx)rtld-%.d: %.s $(before-compile); $(+make-deps)
$(objpfx)rtld-%.os: %.c $(before-compile); $(compile-command.c)
-$(objpfx)rtld-%.d: %.c $(before-compile); $(+make-deps)
# The rules for generated source files.
$(objpfx)rtld-%.os: $(objpfx)%.S $(before-compile); $(compile-command.S)
-$(objpfx)rtld-%.d: $(objpfx)%.S $(before-compile); $(+make-deps)
$(objpfx)rtld-%.os: $(objpfx)%.s $(before-compile); $(compile-command.s)
-$(objpfx)rtld-%.d: $(objpfx)%.s $(before-compile); $(+make-deps)
$(objpfx)rtld-%.os: $(objpfx)%.c $(before-compile); $(compile-command.c)
-$(objpfx)rtld-%.d: $(objpfx)%.c $(before-compile); $(+make-deps)
# The command line setting of rtld-modules (see above) tells us
# what we need to build, and that tells us what dependency files we need.
@@ -101,9 +95,12 @@ rtld-all: $(addprefix $(objpfx),$(rtld-modules))
# Figure out the dependency files we need. After respecting the $(omit-deps)
# list as applied to the names without the `rtld-', there may be none left.
-rtld-depfiles := $(patsubst %,$(objpfx)rtld-%.d,\
+rtld-depfiles := $(patsubst %,$(objpfx)rtld-%.os.d,\
$(filter-out $(omit-deps),\
$(rtld-modules:rtld-%.os=%)))
+rtld-depfiles := $(strip $(wildcard $(rtld-depfiles)) \
+ $(patsubst %.dt,%.d,\
+ $(wildcard $(rtld-depfiles:.d=.dt))))
ifdef rtld-depfiles
-include $(rtld-depfiles)
endif
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 79add73..58aff18 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -247,7 +247,7 @@
__attribute__ ((unused, section (".gnu.warning." #symbol __sec_comment))) \
= msg;
# define libc_freeres_ptr(decl) \
- __make_section_unallocated ("__libc_freeres_ptrs, \"aw\", @nobits") \
+ __make_section_unallocated ("__libc_freeres_ptrs, \"aw\", %nobits") \
decl __attribute__ ((section ("__libc_freeres_ptrs" __sec_comment)))
# define __libc_freeres_fn_section \
__attribute__ ((section ("__libc_freeres_fn")))
diff --git a/sysdeps/generic/bp-thunks.h b/sysdeps/generic/bp-thunks.h
index 5d2e40d..85f398f 100644
--- a/sysdeps/generic/bp-thunks.h
+++ b/sysdeps/generic/bp-thunks.h
@@ -1,5 +1,5 @@
/* Bounded-pointer syscall thunk support.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Greg McGary <greg@mcgary.org>
@@ -21,6 +21,8 @@
#ifndef _bpthunks_h_
#define _bpthunks_h_
+#ifndef __ASSEMBLER__
+
/* This header is included by the syscall BP thunks defined in
sysd-syscalls, as created by sysdeps/unix/make-syscalls.sh. It
includes all headers that contain prototype declarations for system
@@ -63,4 +65,6 @@
#include <sys/utsname.h>
#include <sys/wait.h>
+#endif /* Not __ASSEMBLER__. */
+
#endif /* _bpthunks_h_ */
diff --git a/sysdeps/unix/Makefile b/sysdeps/unix/Makefile
index 12a4624..5b326e0 100644
--- a/sysdeps/unix/Makefile
+++ b/sysdeps/unix/Makefile
@@ -293,6 +293,7 @@ ifdef unix-stub-syscalls
sysdep_routines += stub-syscalls
$(objpfx)stub-syscalls.c: $(common-objpfx)sysd-syscalls \
$(..)sysdeps/unix/Makefile
+ $(make-target-directory)
(echo '#include <errno.h>'; \
echo 'long int _no_syscall (void)'; \
echo '{ __set_errno (ENOSYS); return -1L; }'; \
@@ -338,10 +339,10 @@ endif
# The syscall objects depend on s-proto.d or s-proto-cancel.d, which
# are generated to specify dependencies generated syscalls have on
# headers.
-ifdef subdir
-ifndef no_deps
# These deps use file names relative to a subdir, so don't
# include them in the parent directory.
+ifneq (,$(filter $(unix-syscalls),$(routines) $(sysdep_routines) $(aux)))
+ifndef no_deps
-include $(common-objpfx)s-proto.d
-include $(common-objpfx)s-proto-bp.d
-include $(common-objpfx)s-proto-cancel.d
@@ -350,8 +351,7 @@ endif
$(common-objpfx)s-%.d: $(..)sysdeps/unix/s-%.S \
$(wildcard $(+sysdep_dirs:%=%/syscalls.list))
-# Don't try to use compat.h in the db2 subdir
- $(subst -include ./compat.h,,$(+make-deps))
+ $(+make-deps)
common-generated += s-proto.d s-proto-bp.d s-proto-cancel.d
postclean-generated += sysd-syscalls
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index dcffc97..9df9d6a 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -29,6 +29,7 @@ install-others += $(inst_includedir)/bits/syscall.h
# For bi-arch platforms, the CPU/Makefile defines {32,64}bit-predefine and
# we generate a file that uses <bits/wordsize.h>.
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
+ $(make-target-directory)
rm -f $(@:.h=.d)-t
{ \
echo '/* Generated at libc build time from kernel syscall list. */';\
diff --git a/sysdeps/unix/sysv/linux/i386/bp-thunks.h b/sysdeps/unix/sysv/linux/i386/bp-thunks.h
index d46ea8f..59a42dd 100644
--- a/sysdeps/unix/sysv/linux/i386/bp-thunks.h
+++ b/sysdeps/unix/sysv/linux/i386/bp-thunks.h
@@ -1,3 +1,4 @@
-#include <sysdeps/generic/bp-thunks.h>
-
-#include <sys/vm86.h>
+#ifndef __ASSEMBLER__
+# include <sysdeps/generic/bp-thunks.h>
+# include <sys/vm86.h>
+#endif