about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-09 17:43:42 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:10 -0300
commit68cbe438b55b250c651f69d731e5cf08f03a11cd (patch)
tree7a589db9f8f2c4410968e3b699578d0937f0ae2f
parentfe8a949c64da3f4315692e3c07ddf9b495f51547 (diff)
downloadglibc-68cbe438b55b250c651f69d731e5cf08f03a11cd.tar.gz
glibc-68cbe438b55b250c651f69d731e5cf08f03a11cd.tar.xz
glibc-68cbe438b55b250c651f69d731e5cf08f03a11cd.zip
Fix inhibit_stack_protector for clang
-rw-r--r--include/libc-symbols.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4367aa6740..0635e0dff7 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -365,8 +365,13 @@ for linking")
 /* Used to disable stack protection in sensitive places, like ifunc
    resolvers and early static TLS init.  */
 #ifdef HAVE_CC_NO_STACK_PROTECTOR
-# define inhibit_stack_protector \
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
     __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
 #else
 # define inhibit_stack_protector
 #endif