--- config.make.in | 1 + libpthread/Makefile | 14 +++++++++++++- libpthread/include/libc-symbols.h | 1 + libpthread/sysdeps/generic/pt-atfork.c | 2 ++ libpthread/sysdeps/generic/pt-getcpuclockid.c | 1 + libpthread/sysdeps/generic/pt-getschedparam.c | 2 ++ libpthread/sysdeps/generic/pt-key-create.c | 2 ++ libpthread/sysdeps/generic/pt-key-delete.c | 2 ++ libpthread/sysdeps/generic/pt-mutex-getprioceiling.c | 2 ++ libpthread/sysdeps/generic/pt-mutex-setprioceiling.c | 2 ++ libpthread/sysdeps/generic/pt-mutexattr-getprioceiling.c | 2 ++ libpthread/sysdeps/generic/pt-mutexattr-setprioceiling.c | 2 ++ libpthread/sysdeps/generic/pt-setschedparam.c | 2 ++ libpthread/sysdeps/generic/pt-setschedprio.c | 2 ++ 14 files changed, 36 insertions(+), 1 deletion(-) --- a/config.make.in +++ b/config.make.in @@ -44,6 +44,7 @@ RANLIB = @RANLIB@ MIG = @MIG@ MIGCOM = $(MIG) -cc cat - /dev/null AWK = @AWK@ +OBJDUMP = objdump # Compilation flags. Append these to the definitions already made by # the specific Makefile. --- a/libpthread/Makefile +++ b/libpthread/Makefile @@ -186,7 +186,7 @@ CPPFLAGS += \ -imacros $(srcdir)/not-in-libc.h -install: install-headers $(libdir)/libpthread2.a $(libdir)/libpthread2_pic.a +install: install-headers $(libdir)/libpthread2.a $(libdir)/libpthread2_pic.a install-stubs-pthread install-headers: $(addprefix $(includedir)/, $(sysdeps_headers)) # XXX: If $(libdir)/libpthread2.a is installed and @@ -205,6 +205,18 @@ $(libdir)/libpthread2_pic.a: $(libdir)/l mv $< $@ $(INSTALL_DATA) $(srcdir)/libpthread_pic.a $< +install-stubs-pthread: stubs-pthread.h + mkdir -p $(includedir)/gnu + $(INSTALL_DATA) $< $(includedir)/gnu/stubs-pthread.h + +stubs-pthread.h: $(OBJS) + $(OBJDUMP) -h $^ | \ + $(AWK) '/\.gnu\.glibc-stub\./ { \ + sub(/\.gnu\.glibc-stub\./, "", $$2); \ + stubs[$$2] = 1; } \ + END { for (s in stubs) print "#define __stub_" s }' > $@T + mv -f $@T $@ + .PHONY: $(addprefix $(includedir)/, $(sysdeps_headers)) $(addprefix $(includedir)/, $(sysdeps_headers)): --- a/libpthread/include/libc-symbols.h +++ b/libpthread/include/libc-symbols.h @@ -252,6 +252,7 @@ /* A canned warning for sysdeps/stub functions. */ #define stub_warning(name) \ + __make_section_unallocated (".gnu.glibc-stub." #name) \ link_warning (name, \ "warning: " #name " is not implemented and will always fail") --- a/libpthread/sysdeps/generic/pt-atfork.c +++ b/libpthread/sysdeps/generic/pt-atfork.c @@ -27,3 +27,5 @@ pthread_atfork (void (*prepare) (void), { return ENOSYS; } + +stub_warning (pthread_atfork) --- a/libpthread/sysdeps/generic/pt-getcpuclockid.c +++ b/libpthread/sysdeps/generic/pt-getcpuclockid.c @@ -30,5 +30,6 @@ pthread_getcpuclockid (pthread_t thread, return 0; #else return ENOSYS; +stub_warning (pthread_getcpuclockid) #endif } --- a/libpthread/sysdeps/generic/pt-getschedparam.c +++ b/libpthread/sysdeps/generic/pt-getschedparam.c @@ -26,3 +26,5 @@ pthread_getschedparam (pthread_t thread, { return ENOSYS; } + +stub_warning (pthread_getschedparam) --- a/libpthread/sysdeps/generic/pt-key-create.c +++ b/libpthread/sysdeps/generic/pt-key-create.c @@ -25,3 +25,5 @@ pthread_key_create (pthread_key_t *key, { return ENOSYS; } + +stub_warning (pthread_key_create) --- a/libpthread/sysdeps/generic/pt-key-delete.c +++ b/libpthread/sysdeps/generic/pt-key-delete.c @@ -25,3 +25,5 @@ pthread_key_delete (pthread_key_t key) { return ENOSYS; } + +stub_warning (pthread_key_delete) --- a/libpthread/sysdeps/generic/pt-mutex-getprioceiling.c +++ b/libpthread/sysdeps/generic/pt-mutex-getprioceiling.c @@ -26,3 +26,5 @@ pthread_mutex_getprioceiling (const pthr { return ENOSYS; } + +stub_warning (pthread_mutex_getprioceiling) --- a/libpthread/sysdeps/generic/pt-mutex-setprioceiling.c +++ b/libpthread/sysdeps/generic/pt-mutex-setprioceiling.c @@ -26,3 +26,5 @@ pthread_mutex_setprioceiling (pthread_mu { return ENOSYS; } + +stub_warning (pthread_mutex_setprioceiling) --- a/libpthread/sysdeps/generic/pt-mutexattr-getprioceiling.c +++ b/libpthread/sysdeps/generic/pt-mutexattr-getprioceiling.c @@ -26,3 +26,5 @@ pthread_mutexattr_getprioceiling (const { return ENOSYS; } + +stub_warning (pthread_mutexattr_getprioceiling) --- a/libpthread/sysdeps/generic/pt-mutexattr-setprioceiling.c +++ b/libpthread/sysdeps/generic/pt-mutexattr-setprioceiling.c @@ -26,3 +26,5 @@ pthread_mutexattr_setprioceiling (pthrea { return ENOSYS; } + +stub_warning (pthread_mutexattr_setprioceiling) --- a/libpthread/sysdeps/generic/pt-setschedparam.c +++ b/libpthread/sysdeps/generic/pt-setschedparam.c @@ -26,3 +26,5 @@ pthread_setschedparam (pthread_t thread, { return ENOSYS; } + +stub_warning (pthread_setschedparam) --- a/libpthread/sysdeps/generic/pt-setschedprio.c +++ b/libpthread/sysdeps/generic/pt-setschedprio.c @@ -25,3 +25,5 @@ pthread_setschedprio (pthread_t thread, { return ENOSYS; } + +stub_warning (pthread_setschedprio)