From d2c3a3cede1da5fa7e45a3c8478b22de79dd53c8 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 29 Oct 2008 12:17:44 +0000 Subject: [PATCH] Fix a problem on some distros that have buggy versions of gcc (e.g., https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/284401). Ensure to test for -Wno-long-* in combination with other CFLAGS that we added, not just individually. This commit was SVN r19838. --- config/ompi_setup_cc.m4 | 3 ++- config/ompi_setup_cxx.m4 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/ompi_setup_cc.m4 b/config/ompi_setup_cc.m4 index 5ff2e60e82..dcf8956714 100644 --- a/config/ompi_setup_cc.m4 +++ b/config/ompi_setup_cc.m4 @@ -11,6 +11,7 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -127,7 +128,7 @@ AC_DEFUN([OMPI_SETUP_CC],[ # # Actually, this is not real fix, as GCC will pass on any -Wno- flag, # have fun with the warning: -Wno-britney - CFLAGS="$CFLAGS -Wno-long-double -Wstrict-prototypes" + CFLAGS="$CFLAGS $add -Wno-long-double -Wstrict-prototypes" AC_CACHE_CHECK([if $CC supports -Wno-long-double], [ompi_cv_cc_wno_long_double], diff --git a/config/ompi_setup_cxx.m4 b/config/ompi_setup_cxx.m4 index 42fcb6b3ab..eeb4fd423a 100644 --- a/config/ompi_setup_cxx.m4 +++ b/config/ompi_setup_cxx.m4 @@ -13,6 +13,7 @@ dnl All rights reserved. dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights dnl reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -58,7 +59,7 @@ AC_DEFUN([OMPI_SETUP_CXX],[ # see if -Wno-long-double works... AC_LANG_PUSH(C++) CXXFLAGS_orig="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -Wno-long-double -fstrict-prototype" + CXXFLAGS="$CXXFLAGS $add -Wno-long-double -fstrict-prototype" AC_CACHE_CHECK([if $CXX supports -Wno-long-double], [ompi_cv_cxx_wno_long_double], [AC_TRY_COMPILE([], [],