[mpich-commits] [mpi-all-commits] [mpich] MPICH primary repository branch, master, updated. v3.1rc2-11-g0dcb614
Pavan Balaji
balaji at mcs.anl.gov
Mon Nov 25 21:40:01 CST 2013
This patch needs corrections.
What’s the reason to check for GCC directly instead of the compiler features?
Also, there are nesting safe macros for pushing/popping flags.
— Pavan
On Nov 25, 2013, at 9:36 PM, mysql vizuser <noreply at mpich.org> wrote:
> This is an automated email from the git hooks/post-receive script. It was
> generated because a ref change was pushed to the repository containing
> the project "MPICH primary repository".
>
> The branch, master has been updated
> via 0dcb61440ebcec65bc460c22c986b8d26e52a7ce (commit)
> from 3cbe6a0ef79c02fc4cf8c2695789359bec07d6cd (commit)
>
> Those revisions listed above that are new to this repository have
> not appeared on any other notification email; so we list those
> revisions in full, below.
>
> - Log -----------------------------------------------------------------
> http://git.mpich.org/mpich.git/commitdiff/0dcb61440ebcec65bc460c22c986b8d26e52a7ce
>
> commit 0dcb61440ebcec65bc460c22c986b8d26e52a7ce
> Author: Ken Raffenetti <raffenet at mcs.anl.gov>
> Date: Fri Nov 22 10:46:00 2013 -0600
>
> strengthen test for weak alias attribute
>
> Adds the -Werror flag to this test because in cases like icc/osx
> the compiler only throws a warning that it will ignore function
> __attribute__ defs, but in this case we need to know if they actually
> work.
>
> Fixes #1980
>
> Signed-off-by: Antonio J. Pena <apenya at mcs.anl.gov>
>
> diff --git a/confdb/aclocal_cc.m4 b/confdb/aclocal_cc.m4
> index 1e5e87d..f8146e1 100644
> --- a/confdb/aclocal_cc.m4
> +++ b/confdb/aclocal_cc.m4
> @@ -361,8 +361,18 @@ pac_cv_attr_weak_import=yes,pac_cv_attr_weak_import=no)])
> # Check if the alias option for weak attributes is allowed
> AC_CACHE_CHECK([whether __attribute__((weak,alias(...))) allowed],
> pac_cv_attr_weak_alias,[
> +# We add -Werror if it's gcc to force an error exit if the weak attribute
> +# isn't understood
> +if test $GCC = yes ; then
> + save_CFLAGS=$CFLAGS
> + CFLAGS=-Werror
> +fi
> AC_TRY_COMPILE([int foo(int) __attribute__((weak,alias("__foo")));],[int a;],
> -pac_cv_attr_weak_alias=yes,pac_cv_attr_weak_alias=no)])
> +pac_cv_attr_weak_alias=yes,pac_cv_attr_weak_alias=no)
> +# Restore original CFLAGS
> +if test $GCC = yes ; then
> + CFLAGS=$save_CFLAGS
> +fi])
> if test "$pac_cv_attr_weak_alias" = "yes" ; then
> AC_DEFINE(HAVE_WEAK_ATTRIBUTE,1,[Attribute style weak pragma])
> fi
>
> -----------------------------------------------------------------------
>
> Summary of changes:
> confdb/aclocal_cc.m4 | 12 +++++++++++-
> 1 files changed, 11 insertions(+), 1 deletions(-)
>
>
> hooks/post-receive
> --
> MPICH primary repository
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the commits
mailing list