[PATCH] [nolibc] Disable the GCC stack protector when building sanitizer runtimes.

Peter Collingbourne peter at pcc.me.uk
Tue May 7 09:52:47 PDT 2013


Hi kcc, rnk,

This is the first in a sequence of changes designed to eliminate the
libc dependency in sanitizer_common.  The main motivation for these
changes is to be able to provide an alternative for the current
interceptor-based technique for instrumenting functions in libc.
In this new technique, we compile libc with instrumentation.  This has
the potential advantages of being more accurate than interception and
reducing the amount of custom code required for each libc function.
As a side effect of this, we cannot depend on libc in the sanitizer
runtime due to mutual dependency issues.

This change disables the GCC stack protector, which introduces a libc
dependency and is enabled by default in Ubuntu.

http://llvm-reviews.chandlerc.com/D755

Files:
  CMakeLists.txt

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -126,6 +126,7 @@
   -fno-exceptions
   -fomit-frame-pointer
   -funwind-tables
+  -fno-stack-protector
   -O3
   )
 if(NOT WIN32)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D755.1.patch
Type: text/x-patch
Size: 261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130507/7d853fbf/attachment.bin>


More information about the llvm-commits mailing list