summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/Makefile.commonarch
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2014-09-15 22:13:07 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2014-09-16 22:42:06 +0200
commit41537a770b46f2376e74af58ba4885749339e81e (patch)
treec939e7dd15fc1ae1dc9be19f9bd9cf5dd6f016fd /libc/sysdeps/linux/Makefile.commonarch
parent143b7505a2cc505e94bde9b82cad4f695d15433d (diff)
buildsys: fix IS_IN_lib*
define NOT_IN_libc / IS_IN_libxxx appropriately to fix pthread_once Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/Makefile.commonarch')
-rw-r--r--libc/sysdeps/linux/Makefile.commonarch12
1 files changed, 10 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/Makefile.commonarch b/libc/sysdeps/linux/Makefile.commonarch
index a001a44f1..1bf2dc511 100644
--- a/libc/sysdeps/linux/Makefile.commonarch
+++ b/libc/sysdeps/linux/Makefile.commonarch
@@ -20,8 +20,16 @@ libc-y += $(ARCH_OBJS-y)
libc-nomulti-y += $(ARCH_SOBJ)
objclean-y += CLEAN_$(subst $(top_builddir),,$(ARCH_OUT))
-CFLAGS-crti.S+=$(PICFLAG)
-CFLAGS-crtn.S+=$(PICFLAG)
+CFLAGS-OMIT-crt1.S := -D_LIBC_REENTRANT
+CFLAGS-OMIT-crti.S := -D_LIBC_REENTRANT
+CFLAGS-OMIT-crtn.S := -D_LIBC_REENTRANT
+CFLAGS-OMIT-crtreloc.c := -D_LIBC_REENTRANT
+CFLAGS-crti.S += $(PICFLAG)
+CFLAGS-crtn.S += $(PICFLAG)
+# Due to a "bug" in make these order_only prereqs inherit per-target flags.
+# Attempt to workaround this inconvenient behaviour:
+CFLAGS-OMIT-crt1.S += $(CFLAGS-rtld) -DIN_LIB=%
+CFLAGS-OMIT-crtreloc.c += $(CFLAGS-rtld) -DIN_LIB=%
CLEAN_$(subst $(top_builddir),,$(ARCH_OUT)):
$(do_rm) $(addprefix $(ARCH_OUT)/*., o os oS) $(CTOR_TARGETS) $(CRTS)