1
1

- Get --coverage to work with new gcov and cleanup the generated files.

- Use regexp to check for optimizations in flags.

This commit was SVN r13211.
Этот коммит содержится в:
Rainer Keller 2007-01-19 14:28:52 +00:00
родитель 1452de3034
Коммит 31e12cbe71
3 изменённых файлов: 51 добавлений и 38 удалений

Просмотреть файл

@ -6,7 +6,7 @@ dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights
dnl reserved.
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
@ -33,38 +33,13 @@ co_arg="$1"
co_found=0
for co_word in $co_arg; do
case $co_word in
-g) co_found=1 ;;
-g1) co_found=1 ;;
-g2) co_found=1 ;;
-g3) co_found=1 ;;
+K0) co_found=1 ;;
+K1) co_found=1 ;;
+K2) co_found=1 ;;
+K3) co_found=1 ;;
+K4) co_found=1 ;;
+K5) co_found=1 ;;
-O) co_found=1 ;;
-O0) co_found=1 ;;
-O1) co_found=1 ;;
-O2) co_found=1 ;;
-O3) co_found=1 ;;
-O4) co_found=1 ;;
-O5) co_found=1 ;;
-O6) co_found=1 ;;
-O7) co_found=1 ;;
-O8) co_found=1 ;;
-O9) co_found=1 ;;
-xO) co_found=1 ;;
-xO0) co_found=1 ;;
-xO1) co_found=1 ;;
-xO2) co_found=1 ;;
-xO3) co_found=1 ;;
-xO4) co_found=1 ;;
-xO5) co_found=1 ;;
-xO6) co_found=1 ;;
-xO7) co_found=1 ;;
-xO8) co_found=1 ;;
-xO9) co_found=1 ;;
-g) co_found=1 ;;
-g[1-3]) co_found=1 ;;
+K[0-5]) co_found=1 ;;
-O) co_found=1 ;;
-O[0-9]) co_found=1 ;;
-xO) co_found=1 ;;
-xO[0-9]) co_found=1 ;;
-fast) co_found=1 ;;
esac
done

Просмотреть файл

@ -24,7 +24,7 @@ ompi_show_subtitle "Configuration options"
#
# Code coverage options
#
AC_MSG_CHECKING([Whether to run code coverage])
AC_MSG_CHECKING([whether to run code coverage])
AC_ARG_ENABLE(coverage,
AC_HELP_STRING([--enable-coverage],
[enable code coverage files to be generated]))
@ -45,6 +45,22 @@ else
fi
#
# Branch Probabilities options
#
AC_MSG_CHECKING([whether to compile with branch probabilities])
AC_ARG_ENABLE(branch-probabilities,
AC_HELP_STRING([--enable-branch-probabilities],
[enable profile arcs and branch probability optimization]))
if test "$enable_branch_probabilities" = "yes"; then
AC_MSG_RESULT([yes])
WANT_BRANCH_PROBABILITIES=1
else
AC_MSG_RESULT([no])
WANT_BRANCH_PROBABILITIES=0
fi
#
# Memory debugging
#

Просмотреть файл

@ -6,7 +6,7 @@ dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2006 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights
dnl reserved.
dnl Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2006 The Regents of the University of California.
dnl All rights reserved.
@ -73,10 +73,12 @@ AC_DEFUN([OMPI_SETUP_CC],[
if test "$ompi_cv_cc_coverage" = "yes" ; then
OMPI_COVERAGE_FLAGS="--coverage"
CLEANFILES="*.gcda *.gcno *.gcov ${CLEANFILES}"
CLEANFILES="*.gcno ${CLEANFILES}"
CONFIG_CLEAN_FILES="*.gcda *.gcov ${CONFIG_CLEAN_FILES}"
else
OMPI_COVERAGE_FLAGS="-ftest-coverage -fprofile-arcs"
CLEANFILES="*.bb *.bbg *.da *.*.gcov ${CLEANFILES}"
CLEANFILES="*.bb *.bbg ${CLEANFILES}"
CONFIG_CLEAN_FILES="*.da *.*.gcov ${CONFIG_CLEAN_FILES}"
fi
CFLAGS="$CFLAGS_orig $OMPI_COVERAGE_FLAGS"
LDFLAGS="$LDFLAGS_orig $OMPI_COVERAGE_FLAGS"
@ -193,7 +195,7 @@ AC_DEFUN([OMPI_SETUP_CC],[
[ompi_cv_cc_restrict_cflags="yes"],
[ompi_cv_cc_restrict_cflags="no"])])
if test "$ompi_cv_cc_restrict_cflags" = "yes" ; then
add=" $RESTRICT_CFLAGS"
add="$RESTRICT_CFLAGS"
fi
CFLAGS="${CFLAGS_orig}${add}"
@ -261,6 +263,26 @@ AC_DEFUN([OMPI_SETUP_CC],[
OMPI_CHECK_OPTFLAGS(["$CFLAGS"])
AC_MSG_RESULT([$co_result])
CFLAGS="$co_result"
CFLAGS_WITHOUT_OPTFLAGS=""
for co_word in $CFLAGS ; do
co_found=0
case $co_word in
+K[0-5]) co_found=1 ;;
-O) co_found=1 ;;
-O[0-9]) co_found=1 ;;
-xO) co_found=1 ;;
-xO[0-9]) co_found=1 ;;
-fast) co_found=1 ;;
esac
if test "$co_found" = "0" ; then
CFLAGS_WITHOUT_OPTFLAGS="$CFLAGS_WITHOUT_OPTFLAGS $co_word"
fi
done
unset co_found co_word
AC_SUBST([CFLAGS_WITHOUT_OPTFLAGS])
])