2009-10-21 03:44:20 +04:00
|
|
|
# -*- shell-script -*-
|
|
|
|
#
|
|
|
|
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
|
|
|
# University Research and Technology
|
|
|
|
# Corporation. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
# of Tennessee Research Foundation. All rights
|
|
|
|
# reserved.
|
|
|
|
# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
|
|
|
# University of Stuttgart. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
# All rights reserved.
|
|
|
|
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
|
2009-10-26 21:41:53 +03:00
|
|
|
# Copyright (c) 2006-2009 Sun Microsystems, Inc. All rights reserved.
|
2009-10-21 03:44:20 +04:00
|
|
|
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
|
|
|
# reserved.
|
|
|
|
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
|
|
|
# $HEADER$
|
|
|
|
#
|
|
|
|
|
2009-10-23 17:00:59 +04:00
|
|
|
AC_DEFUN([ORTE_SETUP_DEBUGGER_FLAGS],[
|
2009-10-21 03:44:20 +04:00
|
|
|
#
|
2009-10-23 17:00:59 +04:00
|
|
|
# Do a final process of the CFLAGS to make a WITHOUT_OPTFLAGS
|
|
|
|
# version. We need this so that we can guarantee to build the
|
|
|
|
# debugger-sensitive files with -g and nothing else.
|
2009-10-21 03:44:20 +04:00
|
|
|
#
|
2009-10-23 17:00:59 +04:00
|
|
|
|
2014-05-07 00:30:37 +04:00
|
|
|
OPAL_STRIP_OPTFLAGS($CFLAGS)
|
2009-10-21 03:44:20 +04:00
|
|
|
CFLAGS_WITHOUT_OPTFLAGS="$s_result"
|
2009-10-23 17:00:59 +04:00
|
|
|
# Tweak the compiler flags passed to orterun for Sun Studio SPARC
|
|
|
|
# https://svn.open-mpi.org/trac/ompi/ticket/1448
|
2014-05-06 19:01:34 +04:00
|
|
|
if test "x$opal_cv_c_compiler_vendor" = "xsun" -a -n "`echo $host | $GREP sparc`"; then
|
2009-10-23 17:00:59 +04:00
|
|
|
DEBUGGER_CFLAGS="-g -xO0"
|
2009-10-21 03:44:20 +04:00
|
|
|
else
|
2009-10-26 21:41:53 +03:00
|
|
|
# Tweak the compiler flags passed for intel
|
|
|
|
# to stop its aggressive inlining of functions
|
2014-05-06 19:01:34 +04:00
|
|
|
if test "x$opal_cv_c_compiler_vendor" = "xintel"; then
|
2009-10-26 21:41:53 +03:00
|
|
|
DEBUGGER_CFLAGS="-g -O0"
|
|
|
|
else
|
|
|
|
DEBUGGER_CFLAGS="-g"
|
|
|
|
fi
|
2009-10-21 03:44:20 +04:00
|
|
|
fi
|
2009-10-23 17:00:59 +04:00
|
|
|
AC_MSG_CHECKING([which of CFLAGS are ok for debugger modules])
|
2009-10-21 03:44:20 +04:00
|
|
|
AC_MSG_RESULT([$CFLAGS_WITHOUT_OPTFLAGS])
|
2009-10-23 17:00:59 +04:00
|
|
|
AC_MSG_CHECKING([for debugger extra CFLAGS])
|
|
|
|
AC_MSG_RESULT([$DEBUGGER_CFLAGS])
|
2009-10-21 03:44:20 +04:00
|
|
|
|
|
|
|
AC_SUBST(CFLAGS_WITHOUT_OPTFLAGS)
|
2009-10-23 17:00:59 +04:00
|
|
|
AC_SUBST(DEBUGGER_CFLAGS)
|
2009-10-21 03:44:20 +04:00
|
|
|
])
|