]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Work around a ppc clang inlining bug
authorStan Shebs <stanshebs@google.com>
Tue, 25 Sep 2018 14:48:20 +0000 (07:48 -0700)
committerFangrui Song <i@maskray.me>
Sat, 28 Aug 2021 00:23:12 +0000 (17:23 -0700)
sysdeps/pthread/aio_misc.c
sysdeps/unix/sysv/linux/aio_misc.h

index fb13d6210b7564de71eb16a3cbce342b612f106c..8d4a25894c6e095b00fa33d6a3e1926d736a11dd 100644 (file)
@@ -27,6 +27,9 @@
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/time.h>
+#if defined __clang__ && defined __powerpc64__
+#define UGLY_INLINE_HACK
+#endif
 #include <aio_misc.h>
 
 #ifndef aio_create_helper_thread
index 0d8aa455167cfa5ac0fa15b930c0336e212c2aa0..f463c8fca781a769a490901a4fe4f5b1cce3e3a4 100644 (file)
@@ -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)
 {