summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-03-01 17:15:44 +0000
committerdim <dim@FreeBSD.org>2011-03-01 17:15:44 +0000
commit475a315a77b3e9b6062ed2f56d92a6145b9d6017 (patch)
tree5ce118b30fbbd4f29be99e73d8238bfc00228202 /lib
parentc45957004206e25c4a408d4eef3a1a086b4b8fd9 (diff)
downloadFreeBSD-src-475a315a77b3e9b6062ed2f56d92a6145b9d6017.zip
FreeBSD-src-475a315a77b3e9b6062ed2f56d92a6145b9d6017.tar.gz
Put in a temporary workaround for ctfmerge hanging on processing
kernel.debug (or possibly other files), when WITH_CTF is active. This is caused by a bug in clang's integrated assembler, causing malloc to sometimes hang during initialization in statically linked executables that use threading, such as the copy of ctfmerge that is built during the bootstrap stage of buildworld. The bug has been submitted upstream: http://llvm.org/bugs/show_bug.cgi?id=9352 Note that you might have to rebuild and install libc first, to get your kernel build to finish, because the ctfmerge binary built during bootstrap is linked with your base system's copy of libc.a, which might already contain a bad copy of malloc.o.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/Makefile.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc
index ee4c4e2..47e3188 100644
--- a/lib/libc/stdlib/Makefile.inc
+++ b/lib/libc/stdlib/Makefile.inc
@@ -51,3 +51,7 @@ MLINKS+=tsearch.3 tdelete.3 tsearch.3 tfind.3 tsearch.3 twalk.3
CFLAGS+= -DMALLOC_PRODUCTION
.endif
+.if ${CC:T:Mclang} == "clang"
+# XXX: Temporary workaround for LLVM PR 9352
+CFLAGS+= ${.IMPSRC:T:Mmalloc.c:C/^.+$/-no-integrated-as/}
+.endif
OpenPOWER on IntegriCloud