]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/uclibc/lib/contrib/uclibc/libpthread/nptl/sysdeps/pthread/Makefile.in
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libpthread / nptl / sysdeps / pthread / Makefile.in
index fc0c6ac3ef4a1c61972be3fa6f12dcfec7c09bb4..add3a8e5ff4c607b5b8c220db246ca5499095fa0 100644 (file)
@@ -33,19 +33,12 @@ libpthread_pthread_CSRC = \
        pthread_spin_init.c \
        pthread_spin_unlock.c \
        pt-longjmp.c \
-       pt-sigaction.c \
-       pt-sigfillset.c \
-       pt-sigprocmask.c \
        tpp.c
 CFLAGS-pthread = $(SSP_ALL_CFLAGS) -DNOT_IN_libc -DIS_IN_libpthread
 CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE
 CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE
 CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE
 CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE
-CFLAGS-pt-sigaction.c = -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
-                       -I$(top_srcdir)libc/signal
-CFLAGS-pt-sigfillset.c = -I$(top_srcdir)libc/signal
-CFLAGS-pt-sigprocmask.c = -I$(top_srcdir)libc/sysdeps/linux/common
 CFLAGS-unwind-forcedunwind.c = -fexceptions -fasynchronous-unwind-tables
 
 CFLAGS-OMIT-librt-cancellation.c = -DIS_IN_libpthread
@@ -55,55 +48,59 @@ CFLAGS-librt-cancellation.c = -DIS_IN_librt                         \
 CFLAGS-rt-unwind-resume.c = -DIS_IN_librt                              \
                            -fexceptions -fasynchronous-unwind-tables
 
-libpthread-so-y += $(patsubst %,$(libpthread_pthread_OUT)/%.oS, \
-       pt-sigaction pt-sigprocmask unwind-forcedunwind)
-
-CFLAGS-OMIT-sigaction.c = $(CFLAGS-pthread)
-CFLAGS-sigaction.c = -I$(top_srcdir)libc/signal
-libc-y += $(libpthread_pthread_OUT)/sigaction.o
+libpthread-so-y += $(patsubst %,$(libpthread_pthread_OUT)/%.oS, unwind-forcedunwind)
 
 librt-pt-routines-y = librt-cancellation.c
 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
+#ASFLAGS += $(PICFLAG) -I$(top_srcdir)include -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
+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
+
+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) | $(top_builddir)include/bits/uClibc_config.h
        $(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: $(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)/crtn.S: $(libpthread_pthread_OUT)/pt-initfini.s
-       $(do_sed) -e '1,/@HEADER_ENDS/p' \
+$(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' $< > $@
-endif
-# It would have been easier to just add dummy files that include the real
-# impl, but ok.
-# Special rules needed since we do objdir->objdir compilation for these 3.
-# First symlink them, then build them. Rob would freak out on these. Sheesh! ;)
-pthread-lc-fwd = sigaction sigfillset sigprocmask
-$(patsubst %,$(libpthread_pthread_OUT)/pt-%.c,$(pthread-lc-fwd)): | $(libpthread_pthread_OUT)
-       $(do_ln) $(call rel_srcdir)$(patsubst pt-%,$(libpthread_pthread_DIR)/%,$(@F)) $@
-$(patsubst %,$(libpthread_pthread_OUT)/pt-%.oS,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.oS: $(libpthread_pthread_OUT)/pt-%.c
-       $(compile.c)
-$(patsubst %,$(libpthread_pthread_OUT)/pt-%.o,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.o: $(libpthread_pthread_OUT)/pt-%.c
-       $(compile.c)
-ifeq ($(DOPIC),y)
-$(patsubst %,$(libpthread_pthread_OUT)/pt-%.os,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.os: $(libpthread_pthread_OUT)/pt-%.c
-       $(compile.c)
+               -e '/@TRAILER_BEGINS/,$$p' $< > $@.tmp
+       $(Q)mv $@.tmp $@
+$(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' \
+               -e '/@TRAILER_BEGINS/,$$p' $< > $@.tmp
+       $(Q)mv $@.tmp $@
 endif
 
 objclean-y += CLEAN_libpthread/nptl/sysdeps/pthread
 
 CLEAN_libpthread/nptl/sysdeps/pthread:
        $(do_rm) $(addprefix $(libpthread_pthread_OUT)/*., o os oS s S) \
-               $(libpthread_pthread_OUT)/defs.h \
-               $(addprefix $(libpthread_pthread_DIR)/,pt-sigaction.c \
-                       pt-sigfillset.c pt-sigprocmask.c)
+               $(libpthread_pthread_OUT)/defs.h