Declare pthread_atfork as weak to avoid a fatal error with LLVM 13
authorjca <jca@openbsd.org>
Fri, 17 Dec 2021 12:03:16 +0000 (12:03 +0000)
committerjca <jca@openbsd.org>
Fri, 17 Dec 2021 12:03:16 +0000 (12:03 +0000)
commit0b9027416dbe2d075117c785c315d9663c8d8c6f
tree825d2339a46a607b890e8bd089934536b83aa548
parent09d06b208c65b557bece1d0cd8dc85d82b462db0
Declare pthread_atfork as weak to avoid a fatal error with LLVM 13

Fixes behavior with current clang, which marks the symbol as GLOBAL
instead of WEAK.  LLVM change: https://reviews.llvm.org/D90108
base-gcc is unaffected.  Keep asm(".weak") for gcc3 until a cleanup can
be tested there.

Initial diff from mortimer@, input and ok kettenis@, ok guenther@
lib/csu/crtbeginS.c