projects
/
cacao.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dd5f9fa
)
* configure.ac: New switch for disabling -O2 (--disable-optimizations).
master
author
Stefan Ring
<stefan@complang.tuwien.ac.at>
Wed, 29 Feb 2012 18:02:11 +0000
(19:02 +0100)
committer
Stefan Ring
<stefan@complang.tuwien.ac.at>
Wed, 29 Feb 2012 18:02:11 +0000
(19:02 +0100)
configure.ac
patch
|
blob
|
history
diff --git
a/configure.ac
b/configure.ac
index 1eec8efcf93c6a6adf825cf7afe6c8a9c90fa1d3..7fe231168a3ca119817ff9f5c3336cac8d34be6a 100644
(file)
--- a/
configure.ac
+++ b/
configure.ac
@@
-1,6
+1,6
@@
dnl configure.ac
dnl
dnl configure.ac
dnl
-dnl Copyright (C) 1996-201
0
+dnl Copyright (C) 1996-201
2
dnl CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
dnl
dnl This file is part of CACAO.
dnl CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
dnl
dnl This file is part of CACAO.
@@
-193,20
+193,40
@@
dnl Must be BEFORE *linux*.
esac
esac
+AC_MSG_CHECKING(whether to disable optimizations and build with -g -O0)
+AC_ARG_ENABLE([optimizations],
+ [AS_HELP_STRING(--disable-optimizations,build with -g -O0 [[default=no]])],
+ [case "${enableval}" in
+ no) disable_optimizations=yes;;
+ *) disable_optimizations=no;;
+ esac],
+ [disable_optimizations=no])
+AC_MSG_RESULT(${disable_optimizations})
+
dnl Set optimization and debugging for all architectures and systems.
dnl NOTE: Setting the CFLAGS/CXXFLAGS only works before calling AC_PROG_CC/AC_PROG_CXX.
if test x"$CFLAGS" = "x"; then
dnl Set optimization and debugging for all architectures and systems.
dnl NOTE: Setting the CFLAGS/CXXFLAGS only works before calling AC_PROG_CC/AC_PROG_CXX.
if test x"$CFLAGS" = "x"; then
- OPT_CFLAGS="-g
-O2
"
+ OPT_CFLAGS="-g"
else
OPT_CFLAGS=$CFLAGS
fi
else
OPT_CFLAGS=$CFLAGS
fi
+if test x"${disable_optimizations}" = "xyes"; then
+ OPT_CFLAGS="$OPT_CFLAGS -O0"
+else
+ OPT_CFLAGS="$OPT_CFLAGS -O2"
+fi
OPT_CFLAGS="$OPT_CFLAGS -fno-strict-aliasing"
if test x"$CXXFLAGS" = "x"; then
OPT_CFLAGS="$OPT_CFLAGS -fno-strict-aliasing"
if test x"$CXXFLAGS" = "x"; then
- OPT_CXXFLAGS="-g
-O2
"
+ OPT_CXXFLAGS="-g"
else
OPT_CXXFLAGS=$CXXFLAGS
fi
else
OPT_CXXFLAGS=$CXXFLAGS
fi
+if test x"${disable_optimizations}" = "xyes"; then
+ OPT_CXXFLAGS="$OPT_CXXFLAGS -O0"
+else
+ OPT_CXXFLAGS="$OPT_CXXFLAGS -O2"
+fi
OPT_CXXFLAGS="$OPT_CXXFLAGS -fno-strict-aliasing"
dnl Check for compiler.
OPT_CXXFLAGS="$OPT_CXXFLAGS -fno-strict-aliasing"
dnl Check for compiler.