diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2014-09-10 22:18:55 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2014-09-16 22:42:00 +0200 |
commit | 143b7505a2cc505e94bde9b82cad4f695d15433d (patch) | |
tree | 1a3c0715880519cb6c9f0446189a97f338e5ec74 /libpthread/nptl/sysdeps | |
parent | 62d3a427afdea136c82bb599a18a593d9b32c533 (diff) |
nptl: rephrase *.sym handling
Avoids circular dependency warning from make by generating the .h
directly from the .sym files, elimination intermediate files.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libpthread/nptl/sysdeps')
-rw-r--r-- | libpthread/nptl/sysdeps/Makefile.commonarch | 18 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch | 29 |
2 files changed, 14 insertions, 33 deletions
diff --git a/libpthread/nptl/sysdeps/Makefile.commonarch b/libpthread/nptl/sysdeps/Makefile.commonarch index 8f5d61dcd..a5952a67b 100644 --- a/libpthread/nptl/sysdeps/Makefile.commonarch +++ b/libpthread/nptl/sysdeps/Makefile.commonarch @@ -40,15 +40,12 @@ librt_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(librt_arch_CSRC)) librt_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(librt_arch_SSRC)) librt_arch_OBJS = $(librt_arch_COBJ) $(librt_arch_SOBJ) -CFLAGS-gen_tcb-offsets.c = -S -$(libpthread_arch_OUT)/gen_tcb-offsets.c: $(libpthread_arch_DIR)/tcb-offsets.sym | $(libpthread_arch_OUT) - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - -$(libpthread_arch_OUT)/gen_tcb-offsets.s: $(libpthread_arch_OUT)/gen_tcb-offsets.c | headers - $(compile.c) -libpthread-generated-y += $(libpthread_arch_OUT)/gen_tcb-offsets.s -$(libpthread_arch_OUT)/tcb-offsets.h: $(libpthread_arch_OUT)/gen_tcb-offsets.s - $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@ +$(libpthread_arch_OUT)/tcb-offsets.h: $(top_srcdir)extra/scripts/gen-as-const.awk | headers +$(libpthread_arch_OUT)/tcb-offsets.h: $(libpthread_arch_DIR)/tcb-offsets.sym + @$(disp_gen) + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< \ + | $(CC) $(CFLAGS) -x c - -S -o - \ + | $(SED) $(PTHREAD_GENERATE_MANGLE) > $@ @if test ! -s $@ ; then rm -f $@ ; false ; fi pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(libpthread_arch_OUT)/tcb-offsets.h @@ -59,8 +56,7 @@ headers_clean-y+= HEADERCLEAN_$(subst $(top_builddir),,$(libpthread_arch_OUT)) CLEAN_$(subst $(top_builddir),,$(libpthread_arch_OUT)): $(do_rm) $(addprefix $(libpthread_arch_OUT)/*., o os oS) HEADERCLEAN_$(subst $(top_builddir),,$(libpthread_arch_OUT)): - $(do_rm) $(libpthread_arch_OUT)/tcb-offsets.h \ - $(addprefix $(libpthread_arch_OUT)/gen_tcb-offsets., c h s) + $(do_rm) $(libpthread_arch_OUT)/tcb-offsets.h ifneq ($(TARGET_SUBARCH),) objclean-y += CLEAN_$(subst $(top_builddir),,$(libpthread_subarch_OUT)) CLEAN_$(subst $(top_builddir),,$(libpthread_subarch_OUT)): diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch index 337221432..a63e3fd66 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch @@ -166,29 +166,15 @@ CFLAGS-OMIT-timer_settime.c = -DIS_IN_libpthread #ASFLAGS-write.S = -D_LIBC_REENTRANT #ASFLAGS-waitpid.S = -D_LIBC_REENTRANT -# -# Create header files. -# -CFLAGS-gen_lowlevelbarrier.c = -S -CFLAGS-gen_lowlevelcond.c = -S -CFLAGS-gen_lowlevelrobustlock.c = -S -CFLAGS-gen_lowlevelrwlock.c = -S -CFLAGS-gen_pthread-pi-defines.c = -S -CFLAGS-gen_structsem.c = -S -CFLAGS-gen_unwindbuf.c = -S - PTHREAD_LINUX_SYM := $(notdir $(wildcard $(libpthread_linux_DIR)/*.sym)) -PTHREAD_LINUX_SYM_C := $(addprefix $(libpthread_linux_OUT)/gen_,$(PTHREAD_LINUX_SYM:.sym=.c)) -PTHREAD_LINUX_SYM_S := $(PTHREAD_LINUX_SYM_C:.c=.s) PTHREAD_LINUX_SYM_H := $(addprefix $(libpthread_linux_OUT)/,$(PTHREAD_LINUX_SYM:.sym=.h)) -$(PTHREAD_LINUX_SYM_C): $(libpthread_linux_OUT)/gen_%.c: $(libpthread_linux_DIR)/%.sym | $(libpthread_linux_OUT) - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ -$(PTHREAD_LINUX_SYM_S): $(libpthread_linux_OUT)/gen_%.s: $(libpthread_linux_OUT)/gen_%.c | headers - $(compile.c) -libpthread-generated-y += $(PTHREAD_LINUX_SYM_S) -$(PTHREAD_LINUX_SYM_H): $(libpthread_linux_OUT)/%.h: $(libpthread_linux_OUT)/gen_%.s - $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@ +$(PTHREAD_LINUX_SYM_H): $(top_srcdir)extra/scripts/gen-as-const.awk | headers +$(PTHREAD_LINUX_SYM_H): $(libpthread_linux_OUT)/%.h: $(libpthread_linux_DIR)/%.sym + @$(disp_gen) + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< \ + | $(CC) $(CFLAGS) -x c - -S -o - \ + | $(SED) $(PTHREAD_GENERATE_MANGLE) > $@ @if test ! -s $@ ; then rm -f $@ ; false ; fi pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(PTHREAD_LINUX_SYM_H) @@ -200,8 +186,7 @@ $(ALL_HEADERS_BITS_PTHREAD): $(top_builddir)include/bits/%: | $(top_builddir)inc $(do_ln) $(call rel_srcdir)$(libpthread_linux_DIR)/bits/$(@F) $@ HEADERCLEAN_libpthread/nptl/sysdeps/unix/sysv/linux: - $(do_rm) $(PTHREAD_LINUX_SYM_C) $(PTHREAD_LINUX_SYM_S) \ - $(PTHREAD_LINUX_SYM_H) + $(do_rm) $(PTHREAD_LINUX_SYM_H) CLEAN_libpthread/nptl/sysdeps/unix/sysv/linux: $(do_rm) $(addprefix $(libpthread_linux_OUT)/*., o os oS) |