[PATCH] Fix x86_64 libpthread
Jakub Jelinek
jakub@redhat.com
Tue Apr 30 09:53:00 GMT 2002
Hi!
The recent s390x patch backout reminded me that x86_64 has
/usr/lib64/crti.o in specs like sparc64. Wonder how libpthread works
on x86_64 then (it cannot) because __pthread_initialize_minimal cannot
be called when the standard crti.o is used to link libpthread.so.
gcc 3.2 will hopefully solve all this for good in gcc driver (see Alan
Modra's patch), but till then... This is what sparc64 does too to make
it work.
2002-04-30 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
--- libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile.jj Tue Apr 30 18:54:01 2002
+++ libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile Wed Apr 25 12:39:42 2001
@@ -0,0 +1,9 @@
+ifeq ($(subdir),linuxthreads)
+# gcc -m64 has /usr/lib64/crti.o hardcoded in the specs file, because otherwise
+# it would normally find 32bit crti.o.
+LDFLAGS-pthread.so += -specs=$(objpfx)specs
+before-compile += $(objpfx)specs
+generated += specs
+$(objpfx)specs:
+ $(CC) $(CFLAGS) $(CPPFLAGS) -dumpspecs | sed 's_/usr/lib64/crti.o_crti.o_g' > $@
+endif
Jakub
More information about the Libc-hacker
mailing list