From: Stan Shebs Date: Tue, 25 Sep 2018 14:48:20 +0000 (-0700) Subject: Work around a ppc clang inlining bug X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96509a9dcec99892802cdf7ac16f9b5e51ffccde;p=thirdparty%2Fglibc.git Work around a ppc clang inlining bug --- diff --git a/sysdeps/pthread/aio_misc.c b/sysdeps/pthread/aio_misc.c index fb13d6210b7..8d4a25894c6 100644 --- a/sysdeps/pthread/aio_misc.c +++ b/sysdeps/pthread/aio_misc.c @@ -27,6 +27,9 @@ #include #include #include +#if defined __clang__ && defined __powerpc64__ +#define UGLY_INLINE_HACK +#endif #include #ifndef aio_create_helper_thread diff --git a/sysdeps/unix/sysv/linux/aio_misc.h b/sysdeps/unix/sysv/linux/aio_misc.h index 0d8aa455167..f463c8fca78 100644 --- a/sysdeps/unix/sysv/linux/aio_misc.h +++ b/sysdeps/unix/sysv/linux/aio_misc.h @@ -35,7 +35,13 @@ __aio_start_notify_thread (void) INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8); } -extern inline int +extern +/* clang fails to inline properly in one case, and then linking fails + because the function was discarded, so ensure it's kept. */ +#ifndef UGLY_INLINE_HACK +inline +#endif +int __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), void *arg) {