about summary refs log tree commit diff homepage
path: root/runtime
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2020-11-06 14:13:48 +0000
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2020-11-09 19:39:13 +0000
commitae5ed000ba0f0f232c210ada9e3ab2594f18c7c7 (patch)
tree92ed65600b97573091feda150184c21eb0d4577e /runtime
parent552fb6af769715e5045b23ba4af9be2d698ff8ef (diff)
downloadklee-ae5ed000ba0f0f232c210ada9e3ab2594f18c7c7.tar.gz
Since the runtime now contains fortified libc functions, it is important to compile it with -D_FORTIFY_SOURCE=0 to avoid infinite recursion.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index 52f4e766..9bd1442b 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -64,12 +64,15 @@ set(LIB_BC_FLAGS_32
         )
 
 # Common for all library configurations
-# Setup all compilation flags
+# Since the runtime now contains fortified libc functions, it is
+# important to compile it with -D_FORTIFY_SOURCE=0 to avoid infinite
+# recursion
 set(COMMON_CC_FLAGS
         "-I${CMAKE_SOURCE_DIR}/include"
         "-I${CMAKE_BINARY_DIR}/include"
         -g
         -D_DEBUG
+        -D_FORTIFY_SOURCE=0
         -D_GNU_SOURCE
         -D__STDC_LIMIT_MACROS
         -D__STDC_CONSTANT_MACROS
@@ -111,4 +114,4 @@ add_custom_target(BuildKLEERuntimes
 
 install(DIRECTORY "${KLEE_RUNTIME_DIRECTORY}/"
         DESTINATION "${KLEE_INSTALL_RUNTIME_DIR}"
-        )
\ No newline at end of file
+        )