summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps/Makefile.commonarch
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2014-09-10 22:18:55 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2014-09-16 22:42:00 +0200
commit143b7505a2cc505e94bde9b82cad4f695d15433d (patch)
tree1a3c0715880519cb6c9f0446189a97f338e5ec74 /libpthread/nptl/sysdeps/Makefile.commonarch
parent62d3a427afdea136c82bb599a18a593d9b32c533 (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/Makefile.commonarch')
-rw-r--r--libpthread/nptl/sysdeps/Makefile.commonarch18
1 files changed, 7 insertions, 11 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)):