summaryrefslogtreecommitdiff
path: root/libpthread/nptl/Makefile.in
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-09-17 23:41:56 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-09-17 23:41:56 +0200
commit2695bf4142b3d7154ef123dcc34d531c155af510 (patch)
treea0f7237e770533b262d22becdb14954b504c65b8 /libpthread/nptl/Makefile.in
parentdef0d92193606e184d356c4d2d1752526573f87c (diff)
parenta9bdc5d28e692c04f51bcea1bb8e87f9c72ad09f (diff)
Merge remote-tracking branch 'origin/upstream'
Diffstat (limited to 'libpthread/nptl/Makefile.in')
-rw-r--r--libpthread/nptl/Makefile.in31
1 files changed, 12 insertions, 19 deletions
diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in
index 000882289..cdf07cf45 100644
--- a/libpthread/nptl/Makefile.in
+++ b/libpthread/nptl/Makefile.in
@@ -92,19 +92,12 @@ $(top_builddir)lib/libpthread.a: $(libpthread-a-y)
$(Q)$(RM) $@
$(do_ar)
-#
-# Create 'pthread-errnos.h' header file.
-#
-CFLAGS-gen_pthread-errnos.c = -S
-
-$(libpthread_OUT)/gen_pthread-errnos.c: $(libpthread_DIR)/pthread-errnos.sym | $(libpthread_OUT)
- $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
-
-$(libpthread_OUT)/gen_pthread-errnos.s: $(libpthread_OUT)/gen_pthread-errnos.c | headers
- $(compile.c)
-libpthread-generated-y += $(libpthread_OUT)/gen_pthread-errnos.s
-$(libpthread_OUT)/pthread-errnos.h: $(libpthread_OUT)/gen_pthread-errnos.s
- $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@
+$(libpthread_OUT)/pthread-errnos.h: $(top_srcdir)extra/scripts/gen-as-const.awk | headers
+$(libpthread_OUT)/pthread-errnos.h: $(libpthread_DIR)/pthread-errnos.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_OUT)/pthread-errnos.h
@@ -132,7 +125,6 @@ headers_clean-y += HEADERCLEAN_libpthread/nptl
HEADERCLEAN_libpthread/nptl:
$(do_rm) $(nptl_headers_bootstrap) \
- $(addprefix $(libpthread_OUT)/gen_pthread-errnos., c s) \
$(libpthread_OUT)/pthread-errnos.h
CLEAN_libpthread/nptl:
@@ -149,7 +141,8 @@ LDFLAGS-libpthread.so += $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so $(
LIBS-libpthread.so := $(LIBS)
-CFLAGS-nptl = -DNOT_IN_libc -DIS_IN_libpthread $(SSP_ALL_CFLAGS)
+CFLAGS-dir_nptl := -DNOT_IN_libc -DIS_IN_libpthread
+CFLAGS-libpthread/nptl := $(CFLAGS-dir_nptl) $(SSP_ALL_CFLAGS)
# Since cancellation handling is in large parts handled using exceptions
# we have to compile some files with exception handling enabled, some
@@ -220,7 +213,7 @@ CFLAGS-pthread_barrierattr_getpshared.c = -D_GNU_SOURCE
CFLAGS-pthread_barrierattr_setpshared.c = -D_GNU_SOURCE
CFLAGS-sem_open.c = -D_GNU_SOURCE
-CFLAGS-OMIT-alloca_cutoff.c = $(CFLAGS-nptl)
-CFLAGS-OMIT-forward.c = $(CFLAGS-nptl)
-CFLAGS-OMIT-libc-lowlevelock.c = $(CFLAGS-nptl)
-CFLAGS-OMIT-libc-cancellation.c = $(CFLAGS-nptl)
+CFLAGS-OMIT-alloca_cutoff.c = $(CFLAGS-dir_nptl)
+CFLAGS-OMIT-forward.c = $(CFLAGS-dir_nptl)
+CFLAGS-OMIT-libc-lowlevelock.c = $(CFLAGS-dir_nptl)
+CFLAGS-OMIT-libc-cancellation.c = $(CFLAGS-dir_nptl)