From c91c3a2b27f5909e190cde4518383864298e82af Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 11 May 2011 22:03:33 +0200 Subject: commentary typo fix use cancellation (with two 'l') uniformly. Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/sysdeps/pthread/pthread_once.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpthread/nptl/sysdeps/pthread') diff --git a/libpthread/nptl/sysdeps/pthread/pthread_once.c b/libpthread/nptl/sysdeps/pthread/pthread_once.c index 57bb6b977..55131091a 100644 --- a/libpthread/nptl/sysdeps/pthread/pthread_once.c +++ b/libpthread/nptl/sysdeps/pthread/pthread_once.c @@ -38,7 +38,7 @@ __pthread_once ( lll_lock (once_lock, LLL_PRIVATE); /* XXX This implementation is not complete. It doesn't take - cancelation and fork into account. */ + cancellation and fork into account. */ if (*once_control == PTHREAD_ONCE_INIT) { init_routine (); -- cgit v1.2.3 From 5c49e11c01b0baf4c2c54259e5ec06274251f0fa Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 31 May 2011 09:45:44 +0200 Subject: NPTL: Fix CTOR_DTOR Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/sysdeps/pthread/Makefile.in | 24 ++++++++++++++++++------ libpthread/nptl/sysdeps/pthread/defs.awk | 24 ------------------------ libpthread/nptl/sysdeps/pthread/pt-initfini.c | 4 ++++ 3 files changed, 22 insertions(+), 30 deletions(-) delete mode 100644 libpthread/nptl/sysdeps/pthread/defs.awk (limited to 'libpthread/nptl/sysdeps/pthread') diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in index fc0c6ac3e..d93b3a55f 100644 --- a/libpthread/nptl/sysdeps/pthread/Makefile.in +++ b/libpthread/nptl/sysdeps/pthread/Makefile.in @@ -67,22 +67,34 @@ librt-pt-shared-only-routines-y = rt-unwind-resume.c ifeq ($(UCLIBC_CTOR_DTOR),y) CFLAGS-OMIT-pt-initfini.c = $(CFLAGS-pthread) -CFLAGS-pt-initfini.c = -S -g0 -fPIC -fno-inline-functions \ +CFLAGS-pt-initfini.c = -S -g0 $(PICFLAG) -fno-inline-functions \ $(call check_gcc,-fno-unit-at-a-time,) \ + $(SSP_DISABLE_FLAGS) \ -finhibit-size-directive \ + -fno-asynchronous-unwind-tables -fno-unwind-tables \ $(patsubst -f%,-fno-%,$(call check_gcc,-fexceptions,)) ASFLAGS-crti.S = -g0 ASFLAGS-crtn.S = -g0 $(libpthread_pthread_OUT)/pt-initfini.s: $(libpthread_pthread_DIR)/pt-initfini.c $(compile.c) - $(do_sed) '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \ - $(do_awk) $(libpthread_pthread_DIR)/defs.awk > $(libpthread_pthread_OUT)/defs.h +$(libpthread_pthread_OUT)/defs.h: $(libpthread_pthread_DIR)/pt-initfini.c + $(do_sed) -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \ + $(AWK) -f $(top_srcdir)extra/scripts/defs.awk > $@.tmp + $(Q)mv $@.tmp $@ -$(libpthread_pthread_OUT)/crti.S $(libpthread_pthread_OUT)/crtn.S: $(libpthread_pthread_OUT)/pt-initfini.s - $(do_sed) -e '1,/@HEADER_ENDS/p' \ +$(libpthread_pthread_OUT)/crti.S: $(libpthread_pthread_OUT)/pt-initfini.s $(libpthread_pthread_OUT)/defs.h + $(do_sed) -n -e '/[ ]*\.file/d' \ + -e '1,/@HEADER_ENDS/p' \ -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \ - -e '/@TRAILER_BEGINS/,$$p' $< > $@ + -e '/@TRAILER_BEGINS/,$$p' $< > $@.tmp + $(Q)mv $@.tmp $@ +$(libpthread_pthread_OUT)/crtn.S: $(libpthread_pthread_OUT)/pt-initfini.s $(libpthread_pthread_OUT)/defs.h + $(do_sed) -n -e '/[ ]*\.file/d' \ + -e '1,/@HEADER_ENDS/p' \ + -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \ + -e '/@TRAILER_BEGINS/,$$p' $< > $@.tmp + $(Q)mv $@.tmp $@ endif # It would have been easier to just add dummy files that include the real # impl, but ok. diff --git a/libpthread/nptl/sysdeps/pthread/defs.awk b/libpthread/nptl/sysdeps/pthread/defs.awk deleted file mode 100644 index d41d57bd7..000000000 --- a/libpthread/nptl/sysdeps/pthread/defs.awk +++ /dev/null @@ -1,24 +0,0 @@ -/^[ ]*\.endp/ { need_endp = 1 } -/^[ ]*\.end/ { need_end = 1 } -/^[ ]*\.align/ { if($2 > max) max = $2; } - -END { - if(need_endp) - { - print "#define END_INIT .endp _init"; - print "#define END_FINI .endp _fini"; - } else if(need_end) - { - print "#define END_INIT .end _init"; - print "#define END_FINI .end _fini"; - } - else - { - print "#define END_INIT"; - print "#define END_FINI"; - } - if(max) - print "#define ALIGN .align", max; - else - print "#define ALIGN"; -} diff --git a/libpthread/nptl/sysdeps/pthread/pt-initfini.c b/libpthread/nptl/sysdeps/pthread/pt-initfini.c index 1f81144d0..ccdce3e22 100644 --- a/libpthread/nptl/sysdeps/pthread/pt-initfini.c +++ b/libpthread/nptl/sysdeps/pthread/pt-initfini.c @@ -44,6 +44,10 @@ /* Embed an #include to pull in the alignment and .end directives. */ __asm__ ("\n#include \"defs.h\""); +__asm__ ("\n#if defined __i686 && defined __ASSEMBLER__"); +__asm__ ("\n#undef __i686"); +__asm__ ("\n#define __i686 __i686"); +__asm__ ("\n#endif"); /* The initial common code ends here. */ __asm__ ("\n/*@HEADER_ENDS*/"); -- cgit v1.2.3 From c97ce776368ec5d9d954fc8653f3e1c11490fc74 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 13 Jun 2011 16:30:55 -0700 Subject: ctor/dtor nptl: Fix init and fini function compilation We need to define the rules for .S files so it gets the include paths some architectures like mips include headers Some architectures e.g. SH have their own version of pt-initfini.c so look for that first before resorting to generic version of pt-initfini.c Signed-off-by: Khem Raj --- libpthread/nptl/sysdeps/pthread/Makefile.in | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'libpthread/nptl/sysdeps/pthread') diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in index d93b3a55f..398eaea12 100644 --- a/libpthread/nptl/sysdeps/pthread/Makefile.in +++ b/libpthread/nptl/sysdeps/pthread/Makefile.in @@ -73,23 +73,37 @@ CFLAGS-pt-initfini.c = -S -g0 $(PICFLAG) -fno-inline-functions \ -finhibit-size-directive \ -fno-asynchronous-unwind-tables -fno-unwind-tables \ $(patsubst -f%,-fno-%,$(call check_gcc,-fexceptions,)) -ASFLAGS-crti.S = -g0 -ASFLAGS-crtn.S = -g0 -$(libpthread_pthread_OUT)/pt-initfini.s: $(libpthread_pthread_DIR)/pt-initfini.c +#ASFLAGS += $(PICFLAG) -I$(top_srcdir)include -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) +ifneq ($(wildcard $(libpthread_DIR)/sysdeps/linux/$(TARGET_ARCH)/pt-initfini.c),) +PTHREAD_INITFINI := $(libpthread_DIR)/sysdeps/linux/$(TARGET_ARCH)/pt-initfini.c +else +PTHREAD_INITFINI := $(libpthread_pthread_DIR)/pt-initfini.c +endif + +ASFLAGS-pt-crti.S = $(PICFLAG) +ASFLAGS-pt-crtn.S = $(PICFLAG) + +$(libpthread_pthread_OUT)/pt-crti.o: $(libpthread_pthread_OUT)/pt-crti.S + $(compile.S) + +$(libpthread_pthread_OUT)/pt-crtn.o: $(libpthread_pthread_OUT)/pt-crtn.S + $(compile.S) + +$(libpthread_pthread_OUT)/pt-initfini.s: $(PTHREAD_INITFINI) $(compile.c) -$(libpthread_pthread_OUT)/defs.h: $(libpthread_pthread_DIR)/pt-initfini.c +$(libpthread_pthread_OUT)/defs.h: $(PTHREAD_INITFINI) $(do_sed) -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \ $(AWK) -f $(top_srcdir)extra/scripts/defs.awk > $@.tmp $(Q)mv $@.tmp $@ -$(libpthread_pthread_OUT)/crti.S: $(libpthread_pthread_OUT)/pt-initfini.s $(libpthread_pthread_OUT)/defs.h +$(libpthread_pthread_OUT)/pt-crti.S: $(libpthread_pthread_OUT)/pt-initfini.s $(libpthread_pthread_OUT)/defs.h $(do_sed) -n -e '/[ ]*\.file/d' \ -e '1,/@HEADER_ENDS/p' \ -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \ -e '/@TRAILER_BEGINS/,$$p' $< > $@.tmp $(Q)mv $@.tmp $@ -$(libpthread_pthread_OUT)/crtn.S: $(libpthread_pthread_OUT)/pt-initfini.s $(libpthread_pthread_OUT)/defs.h +$(libpthread_pthread_OUT)/pt-crtn.S: $(libpthread_pthread_OUT)/pt-initfini.s $(libpthread_pthread_OUT)/defs.h $(do_sed) -n -e '/[ ]*\.file/d' \ -e '1,/@HEADER_ENDS/p' \ -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \ -- cgit v1.2.3 From f282ca2286c728c805dff4d57f7c3b3404f1a618 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 13 Jun 2011 17:13:52 -0700 Subject: nptl/pthread: Correct path for machine specific pt-initfini.c Signed-off-by: Khem Raj --- libpthread/nptl/sysdeps/pthread/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpthread/nptl/sysdeps/pthread') diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in index 398eaea12..ca8464227 100644 --- a/libpthread/nptl/sysdeps/pthread/Makefile.in +++ b/libpthread/nptl/sysdeps/pthread/Makefile.in @@ -75,8 +75,8 @@ CFLAGS-pt-initfini.c = -S -g0 $(PICFLAG) -fno-inline-functions \ $(patsubst -f%,-fno-%,$(call check_gcc,-fexceptions,)) #ASFLAGS += $(PICFLAG) -I$(top_srcdir)include -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) -ifneq ($(wildcard $(libpthread_DIR)/sysdeps/linux/$(TARGET_ARCH)/pt-initfini.c),) -PTHREAD_INITFINI := $(libpthread_DIR)/sysdeps/linux/$(TARGET_ARCH)/pt-initfini.c +ifneq ($(wildcard $(libpthread_pthread_DIR)/../unix/sysv/linux/$(TARGET_ARCH)/pt-initfini.c),) +PTHREAD_INITFINI := $(libpthread_pthread_DIR)/../unix/sysv/linux/$(TARGET_ARCH)/pt-initfini.c else PTHREAD_INITFINI := $(libpthread_pthread_DIR)/pt-initfini.c endif -- cgit v1.2.3 From 4cf580dfcc5846b89a4cf688ecca431d5a5e5647 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 14 Jun 2011 17:51:58 +0200 Subject: buildsys: pt-initfini.s depends on uClibc_config.h Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/sysdeps/pthread/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpthread/nptl/sysdeps/pthread') diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in index ca8464227..be5c022b1 100644 --- a/libpthread/nptl/sysdeps/pthread/Makefile.in +++ b/libpthread/nptl/sysdeps/pthread/Makefile.in @@ -90,7 +90,7 @@ $(libpthread_pthread_OUT)/pt-crti.o: $(libpthread_pthread_OUT)/pt-crti.S $(libpthread_pthread_OUT)/pt-crtn.o: $(libpthread_pthread_OUT)/pt-crtn.S $(compile.S) -$(libpthread_pthread_OUT)/pt-initfini.s: $(PTHREAD_INITFINI) +$(libpthread_pthread_OUT)/pt-initfini.s: $(PTHREAD_INITFINI) | $(top_builddir)include/bits/uClibc_config.h $(compile.c) $(libpthread_pthread_OUT)/defs.h: $(PTHREAD_INITFINI) $(do_sed) -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \ -- cgit v1.2.3