summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/Makefile.commonarch
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/Makefile.commonarch')
-rw-r--r--libc/sysdeps/linux/Makefile.commonarch17
1 files changed, 7 insertions, 10 deletions
diff --git a/libc/sysdeps/linux/Makefile.commonarch b/libc/sysdeps/linux/Makefile.commonarch
index 1bf2dc511..a6842d879 100644
--- a/libc/sysdeps/linux/Makefile.commonarch
+++ b/libc/sysdeps/linux/Makefile.commonarch
@@ -47,16 +47,13 @@ HEADERCLEAN_$(subst $(top_builddir),,$(ARCH_OUT)):
$(do_rm) $(ARCH_HEADERS_OUT)
endif
-CFLAGS-ucontext_i.c = -S
-
-$(ARCH_OUT)/ucontext_i.c: $(ARCH_DIR)/ucontext_i.sym
- $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
-
-$(ARCH_OUT)/ucontext_i.s: $(ARCH_OUT)/ucontext_i.c
- $(compile.c)
-
-$(ARCH_OUT)/ucontext_i.h: $(ARCH_OUT)/ucontext_i.s
- $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@
+$(ARCH_OUT)/ucontext_i.h: $(top_srcdir)extra/scripts/gen-as-const.awk
+$(ARCH_OUT)/ucontext_i.h: $(ARCH_OUT)/ucontext_i.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_CONTEXT_FUNCS) += $(ARCH_OUT)/ucontext_i.h