Browse Source

ssp-local.c: make sure that -fstack-protector is not enabled when compiling file

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger 13 years ago
parent
commit
631049ff3a
1 changed files with 5 additions and 1 deletions
  1. 5 1
      libc/sysdeps/linux/common/ssp-local.c

+ 5 - 1
libc/sysdeps/linux/common/ssp-local.c

@@ -21,6 +21,10 @@
  * copied stack_chk_fail_local.c from glibc and adapted for uClibc
  */
 
+#if defined __SSP__ || defined __SSP_ALL__
+# error "file must not be compiled with stack protection enabled on it. Use -fno-stack-protector"
+#endif
+
 #include <features.h>
 
 /* On some architectures, this helps needless PIC pointer setup
@@ -29,5 +33,5 @@
 void __stack_chk_fail_local (void) attribute_noreturn attribute_hidden;
 void __stack_chk_fail_local (void)
 {
-  __stack_chk_fail ();
+	__stack_chk_fail ();
 }