summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-09-10 23:08:28 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-09-10 23:08:28 +0000
commite7584f37352bfc0b0bc9a894fe4ca72817c16e8e (patch)
tree1771e52e493de3617b3442e8b5286bd416269475
parentb37688077276bd362764b42af655a667502d7410 (diff)
Change optimizations from -O2 to -O1 with Clang/LLVM as -O2 is unsafe.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1167646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/configure.ac15
1 files changed, 9 insertions, 6 deletions
diff --git a/sca-cpp/trunk/configure.ac b/sca-cpp/trunk/configure.ac
index 92805a6f92..7ac5c30e4d 100644
--- a/sca-cpp/trunk/configure.ac
+++ b/sca-cpp/trunk/configure.ac
@@ -56,7 +56,8 @@ if test "${cxxname}" = "clang++"; then
else
cxxtype="gcc"
fi
-cxxflags="${CXXFLAGS}"
+#cxxflags="${CXXFLAGS}"
+cxxflags=""
ldflags="${LDFLAGS}"
defaultlibs="${LIBS}"
@@ -114,19 +115,21 @@ AC_ARG_ENABLE(maintainer-mode, [AS_HELP_STRING([--enable-maintainer-mode], [comp
esac ],
[ AC_MSG_RESULT(no)])
if test "${want_maintainer_mode}" = "true"; then
- cxxflags="${cxxflags} -D_DEBUG -O2 -ggdb -g3 -Werror -Wall -Wextra -Wno-ignored-qualifiers -Wno-strict-aliasing -Winit-self -Wmissing-include-dirs -Wcast-qual -Wcast-align -Wwrite-strings -Wpointer-arith -Waddress -Wredundant-decls -std=c++0x -fmessage-length=0"
+ cxxflags="${cxxflags} -D_DEBUG -ggdb -g3 -Werror -Wall -Wextra -Wno-ignored-qualifiers -Wno-strict-aliasing -Winit-self -Wmissing-include-dirs -Wcast-qual -Wcast-align -Wwrite-strings -Wpointer-arith -Waddress -Wredundant-decls -std=c++0x -fmessage-length=0"
if test "${cxxtype}" = "clang"; then
- cxxflags="${cxxflags} -stdlib=libc++"
+ cxxflags="${cxxflags} -O1 -stdlib=libc++"
else
- cxxflags="${cxxflags} -Wlogical-op -Wconversion"
+ cxxflags="${cxxflags} -O2 -Wlogical-op -Wconversion"
fi
ldflags="${ldflags} -pg"
AM_CONDITIONAL([WANT_MAINTAINER_MODE], true)
AC_DEFINE([WANT_MAINTAINER_MODE], 1, [compile with debugging and compile-time warnings])
else
- cxxflags="${cxxflags} -g -O2 -std=c++0x -fmessage-length=0"
+ cxxflags="${cxxflags} -g -std=c++0x -fmessage-length=0"
if test "${cxxtype}" = "clang"; then
- cxxflags="${cxxflags} -stdlib=libc++"
+ cxxflags="${cxxflags} -O1 -stdlib=libc++"
+ else
+ cxxflags="${cxxflags} -O2"
fi
AM_CONDITIONAL([WANT_MAINTAINER_MODE], false)
fi