about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorDan Liew <daniel.liew11@imperial.ac.uk>2013-03-18 17:09:59 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2013-08-28 15:38:02 +0100
commitbe2442fe5fb2e1228a0eb1a3a67729a77f710c6b (patch)
tree3a0105ef0d15571321c37aae24700bce8fc3b3bc
parent821b6f6473334eaa6c78205603faf14a2c1aca41 (diff)
downloadklee-be2442fe5fb2e1228a0eb1a3a67729a77f710c6b.tar.gz
Modified the buildmode of bitcode libraries.
The Default is Release+Asserts but if you are building KLEE with debug symbols (for example
"Release+Debug+Asserts" or "Debug+Asserts") then this breaks because KLEE will
look for the bitcode libraries in the wrong place because the
RUNTIME_CONFIGURATION macro is not defined to be what KLEE actually builds as.

This has been tweaked so that when we build the bitcode libraries the Makefile
variable "DEBUG_SYMBOLS" is correctly overridden.
-rw-r--r--Makefile.common1
-rw-r--r--Makefile.config.in1
-rw-r--r--autoconf/configure.ac4
-rwxr-xr-xconfigure9
4 files changed, 15 insertions, 0 deletions
diff --git a/Makefile.common b/Makefile.common
index bf99b1f3..682cca65 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -16,6 +16,7 @@ override ENABLE_OPTIMIZED := $(RUNTIME_ENABLE_OPTIMIZED)
 override DISABLE_ASSERTIONS := $(RUNTIME_DISABLE_ASSERTIONS)
 override ENABLE_PROFILING := $(RUNTIME_ENABLE_PROFILING)
 override ENABLE_COVERAGE := $(RUNTIME_ENABLE_COVERAGE)
+override DEBUG_SYMBOLS := $(RUNTIME_DEBUG_SYMBOLS)
 endif
 
 include $(PROJ_SRC_ROOT)/Makefile.rules
diff --git a/Makefile.config.in b/Makefile.config.in
index c916a456..251c027a 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -34,6 +34,7 @@ HAVE_SELINUX := @HAVE_SELINUX@
 
 RUNTIME_ENABLE_OPTIMIZED := @RUNTIME_ENABLE_OPTIMIZED@
 RUNTIME_DISABLE_ASSERTIONS := @RUNTIME_DISABLE_ASSERTIONS@
+RUNTIME_DEBUG_SYMBOLS := @RUNTIME_DEBUG_SYMBOLS@
 RUNTIME_ENABLE_COVERAGE :=
 RUNTIME_ENABLE_PROFILING :=
 
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 6d846d5d..dfa04e22 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -269,18 +269,22 @@ if test X${with_runtime} = XRelease; then
     AC_MSG_RESULT([Release])
     AC_SUBST(RUNTIME_ENABLE_OPTIMIZED,[[1]])
     AC_SUBST(RUNTIME_DISABLE_ASSERTIONS,[[1]])
+    AC_SUBST(RUNTIME_DEBUG_SYMBOLS,[[]])
 elif test X${with_runtime} = XRelease+Asserts; then
     AC_MSG_RESULT([Release+Asserts])
     AC_SUBST(RUNTIME_ENABLE_OPTIMIZED,[[1]])
     AC_SUBST(RUNTIME_DISABLE_ASSERTIONS,[[0]])
+    AC_SUBST(RUNTIME_DEBUG_SYMBOLS,[[]])
 elif test X${with_runtime} = XDebug; then
    AC_MSG_RESULT([Debug])
    AC_SUBST(RUNTIME_ENABLE_OPTIMIZED,[[0]])
    AC_SUBST(RUNTIME_DISABLE_ASSERTIONS,[[1]])
+   AC_SUBST(RUNTIME_DEBUG_SYMBOLS,[[1]])
 elif test X${with_runtime} = XDebug+Asserts; then
    AC_MSG_RESULT([Debug+Asserts])
    AC_SUBST(RUNTIME_ENABLE_OPTIMIZED,[[0]])
    AC_SUBST(RUNTIME_DISABLE_ASSERTIONS,[[0]])
+   AC_SUBST(RUNTIME_DEBUG_SYMBOLS,[[1]])
 else
    AC_MSG_ERROR([invalid configuration: ${with_runtime}])
 fi
diff --git a/configure b/configure
index eb61b85b..837ddeec 100755
--- a/configure
+++ b/configure
@@ -622,6 +622,7 @@ LDFLAGS
 CFLAGS
 CC
 RUNTIME_CONFIGURATION
+RUNTIME_DEBUG_SYMBOLS
 RUNTIME_DISABLE_ASSERTIONS
 RUNTIME_ENABLE_OPTIMIZED
 ENABLE_POSIX_RUNTIME
@@ -2707,6 +2708,8 @@ $as_echo "Release" >&6; }
 
     RUNTIME_DISABLE_ASSERTIONS=1
 
+    RUNTIME_DEBUG_SYMBOLS=
+
 elif test X${with_runtime} = XRelease+Asserts; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Release+Asserts" >&5
 $as_echo "Release+Asserts" >&6; }
@@ -2714,6 +2717,8 @@ $as_echo "Release+Asserts" >&6; }
 
     RUNTIME_DISABLE_ASSERTIONS=0
 
+    RUNTIME_DEBUG_SYMBOLS=
+
 elif test X${with_runtime} = XDebug; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Debug" >&5
 $as_echo "Debug" >&6; }
@@ -2721,6 +2726,8 @@ $as_echo "Debug" >&6; }
 
    RUNTIME_DISABLE_ASSERTIONS=1
 
+   RUNTIME_DEBUG_SYMBOLS=1
+
 elif test X${with_runtime} = XDebug+Asserts; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Debug+Asserts" >&5
 $as_echo "Debug+Asserts" >&6; }
@@ -2728,6 +2735,8 @@ $as_echo "Debug+Asserts" >&6; }
 
    RUNTIME_DISABLE_ASSERTIONS=0
 
+   RUNTIME_DEBUG_SYMBOLS=1
+
 else
    as_fn_error $? "invalid configuration: ${with_runtime}" "$LINENO" 5
 fi