]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Work around clang crash by skipping apparently-unneeded asm
authorStan Shebs <stanshebs@google.com>
Tue, 25 Sep 2018 15:04:10 +0000 (08:04 -0700)
committerFangrui Song <i@maskray.me>
Sat, 28 Aug 2021 00:23:13 +0000 (17:23 -0700)
sysdeps/powerpc/powerpc64/backtrace.c

index c0c4b48262cf30d2f30c0dc11b85bc550fcff6ea..b438560792141da73e19575b6619c5a4de97d28e 100644 (file)
@@ -70,8 +70,12 @@ __backtrace (void **array, int size)
   struct layout *current;
   int count;
 
+  /* The following asm causes a clang crash, and does not seem to be
+     needed anyway; clang always saves link register.  */
+#if !defined __clang__
   /* Force gcc to spill LR.  */
   asm volatile ("" : "=l"(current));
+#endif
 
   /* Get the address on top-of-stack.  */
   asm volatile ("ld %0,0(1)" : "=r"(current));