about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-31 05:31:31 +0000
committerRoland McGrath <roland@gnu.org>2002-08-31 05:31:31 +0000
commitcc6d371de3af78fa6440c9f80d441e7c73115f23 (patch)
tree97d90651e03f1e0f6c4bc1bbf8c1bb06a49dce0a
parentc5e341eec9e3528190b76afc68613471d2e3e2b5 (diff)
downloadglibc-cc6d371de3af78fa6440c9f80d441e7c73115f23.tar.gz
glibc-cc6d371de3af78fa6440c9f80d441e7c73115f23.tar.xz
glibc-cc6d371de3af78fa6440c9f80d441e7c73115f23.zip
* Makefile (extra-objs, omit-deps): Add crtn.
	($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
	($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
	($(objpfx)crtn.S): New target.
	($(objpfx)crt%.o): Pattern rule replaces crti.o target.
	(generated): Add crtn.S.

	* sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
	crtn.o pathname too.
-rw-r--r--linuxthreads/ChangeLog12
-rw-r--r--linuxthreads/Makefile15
2 files changed, 22 insertions, 5 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index ec9befe04b..802764b40e 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,15 @@
+2002-08-30  Roland McGrath  <roland@redhat.com>
+
+	* Makefile (extra-objs, omit-deps): Add crtn.
+	($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
+	($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
+	($(objpfx)crtn.S): New target.
+	($(objpfx)crt%.o): Pattern rule replaces crti.o target.
+	(generated): Add crtn.S.
+
+	* sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
+	crtn.o pathname too.
+
 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
 
         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
diff --git a/linuxthreads/Makefile b/linuxthreads/Makefile
index 4f94de373e..b3f66ff9da 100644
--- a/linuxthreads/Makefile
+++ b/linuxthreads/Makefile
@@ -52,8 +52,8 @@ CFLAGS-tst-cancel.c = -fno-inline -fno-inline-functions
 include ../Makeconfig
 
 ifeq ($(build-shared),yes)
-extra-objs += crti.o
-omit-deps += crti
+extra-objs += crti.o crtn.o
+omit-deps += crti crtn
 
 CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions
 endif
@@ -76,8 +76,9 @@ endif
 include ../Rules
 
 extra-B-pthread.so = -B$(common-objpfx)linuxthreads/
-$(objpfx)libpthread.so: $(objpfx)crti.o
+$(objpfx)libpthread.so: $(objpfx)crti.o $(objpfx)crtn.o
 $(objpfx)libpthread.so: +preinit += $(objpfx)crti.o
+$(objpfx)libpthread.so: +postinit += $(objpfx)crtn.o
 
 znodelete-yes = -DHAVE_Z_NODELETE
 CFLAGS-mutex.c += -D__NO_WEAK_PTHREAD_ALIASES
@@ -127,15 +128,19 @@ $(objpfx)crti.S: $(objpfx)pt-initfini.s
 	sed -n -e '1,/@HEADER_ENDS/p' \
 	       -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
 	       -e '/@TRAILER_BEGINS/,$$p' $< > $@
+$(objpfx)crtn.S: $(objpfx)pt-initfini.s
+	sed -n -e '1,/@HEADER_ENDS/p' \
+	       -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
+	       -e '/@TRAILER_BEGINS/,$$p' $< > $@
 
 $(objpfx)defs.h: $(objpfx)pt-initfini.s
 	sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
 		$(AWK) -f ../csu/defs.awk > $@
 
-$(objpfx)crti.o: $(objpfx)crti.S $(objpfx)defs.h
+$(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h
 	$(compile.S) -g0 $(ASFLAGS-.os) -o $@
 
-generated += crti.S defs.h pt-initfini.s
+generated += crti.S crtn.S defs.h pt-initfini.s
 endif
 
 ifeq (yes,$(build-static-nss))