From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id BE4CF3857C71; Sat, 28 Aug 2021 00:39:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE4CF3857C71 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] Work around a ppc clang inlining bug X-Act-Checkin: glibc X-Git-Author: Stan Shebs X-Git-Refname: refs/heads/google/grte/v5-2.27/master X-Git-Oldrev: 9b6c937b0041de8b65a6f11db9c5a05efd3fd7c6 X-Git-Newrev: 96509a9dcec99892802cdf7ac16f9b5e51ffccde Message-Id: <20210828003943.BE4CF3857C71@sourceware.org> Date: Sat, 28 Aug 2021 00:39:43 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2021 00:39:43 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=96509a9dcec99892802cdf7ac16f9b5e51ffccde commit 96509a9dcec99892802cdf7ac16f9b5e51ffccde Author: Stan Shebs Date: Tue Sep 25 07:48:20 2018 -0700 Work around a ppc clang inlining bug Diff: --- sysdeps/pthread/aio_misc.c | 3 +++ sysdeps/unix/sysv/linux/aio_misc.h | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sysdeps/pthread/aio_misc.c b/sysdeps/pthread/aio_misc.c index fb13d6210b..8d4a25894c 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 0d8aa45516..f463c8fca7 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) {