Skip to content

Commit 53185e7

Browse files
author
rhc54
committed
Merge pull request #1326 from ggouaillardet/topic/pmix_check_icc_varargs
pmix configury: add missing PMIX_CHECK_ICC_VARARGS function
2 parents 69e3c6f + 15e26da commit 53185e7

File tree

4 files changed

+130
-0
lines changed

4 files changed

+130
-0
lines changed

opal/mca/pmix/pmix112/pmix/config/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# PMIx copyrights:
22
# Copyright (c) 2013-2015 Intel, Inc. All rights reserved
3+
# Copyright (c) 2016 Research Organization for Information Science
4+
# and Technology (RIST). All rights reserved.
35
#
46
#########################
57
#
@@ -31,6 +33,7 @@ EXTRA_DIST += \
3133
config/pmix_check_attributes.m4 \
3234
config/pmix_check_broken_qsort.m4 \
3335
config/pmix_check_compiler_version.m4 \
36+
config/pmix_check_icc.m4 \
3437
config/pmix_check_ident.m4 \
3538
config/pmix_check_munge.m4 \
3639
config/pmix_check_package.m4 \
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
dnl -*- shell-script -*-
2+
dnl
3+
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4+
dnl University Research and Technology
5+
dnl Corporation. All rights reserved.
6+
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
7+
dnl of Tennessee Research Foundation. All rights
8+
dnl reserved.
9+
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10+
dnl University of Stuttgart. All rights reserved.
11+
dnl Copyright (c) 2004-2005 The Regents of the University of California.
12+
dnl All rights reserved.
13+
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
14+
dnl Copyright (c) 2016 Research Organization for Information Science
15+
dnl and Technology (RIST). All rights reserved.
16+
dnl $COPYRIGHT$
17+
dnl
18+
dnl Additional copyrights may follow
19+
dnl
20+
dnl $HEADER$
21+
dnl
22+
23+
AC_DEFUN([PMIX_CHECK_ICC_VARARGS],[
24+
dnl
25+
dnl On EM64T, icc-8.1 before version 8.1.027 segfaulted, since
26+
dnl va_start was miscompiled...
27+
dnl
28+
AC_MSG_CHECKING([whether icc-8.1 for EM64T works with variable arguments])
29+
AC_TRY_RUN([
30+
#include <stdarg.h>
31+
#include <stdio.h>
32+
#include <stdlib.h>
33+
34+
void func (int c, char * f, ...)
35+
{
36+
va_list arglist;
37+
va_start (arglist, f);
38+
/* vprintf (f, arglist); */
39+
va_end (arglist);
40+
}
41+
42+
int main ()
43+
{
44+
FILE *f;
45+
func (4711, "Help %d [%s]\n", 10, "ten");
46+
f=fopen ("conftestval", "w");
47+
if (!f) exit (1);
48+
return 0;
49+
}
50+
51+
],[pmix_ac_icc_varargs=`test -f conftestval`],[pmix_ac_icc_varargs=1],[pmix_ac_icc_varargs=1])
52+
53+
if test "$pmix_ac_icc_varargs" = "1"; then
54+
AC_MSG_WARN([*** Problem running configure test!])
55+
AC_MSG_WARN([*** Your icc-8.1 compiler seems to miscompile va_start!])
56+
AC_MSG_WARN([*** Please upgrade compiler to at least version 8.1.027])
57+
AC_MSG_ERROR([*** Cannot continue.])
58+
fi
59+
60+
AC_MSG_RESULT([yes])
61+
62+
rm -rf conftest*])dnl

opal/mca/pmix/pmix120/pmix/config/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# PMIx copyrights:
22
# Copyright (c) 2013-2015 Intel, Inc. All rights reserved
3+
# Copyright (c) 2016 Research Organization for Information Science
4+
# and Technology (RIST). All rights reserved.
35
#
46
#########################
57
#
@@ -31,6 +33,7 @@ EXTRA_DIST += \
3133
config/pmix_check_attributes.m4 \
3234
config/pmix_check_broken_qsort.m4 \
3335
config/pmix_check_compiler_version.m4 \
36+
config/pmix_check_icc.m4 \
3437
config/pmix_check_ident.m4 \
3538
config/pmix_check_munge.m4 \
3639
config/pmix_check_package.m4 \
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
dnl -*- shell-script -*-
2+
dnl
3+
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4+
dnl University Research and Technology
5+
dnl Corporation. All rights reserved.
6+
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
7+
dnl of Tennessee Research Foundation. All rights
8+
dnl reserved.
9+
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10+
dnl University of Stuttgart. All rights reserved.
11+
dnl Copyright (c) 2004-2005 The Regents of the University of California.
12+
dnl All rights reserved.
13+
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
14+
dnl Copyright (c) 2016 Research Organization for Information Science
15+
dnl and Technology (RIST). All rights reserved.
16+
dnl $COPYRIGHT$
17+
dnl
18+
dnl Additional copyrights may follow
19+
dnl
20+
dnl $HEADER$
21+
dnl
22+
23+
AC_DEFUN([PMIX_CHECK_ICC_VARARGS],[
24+
dnl
25+
dnl On EM64T, icc-8.1 before version 8.1.027 segfaulted, since
26+
dnl va_start was miscompiled...
27+
dnl
28+
AC_MSG_CHECKING([whether icc-8.1 for EM64T works with variable arguments])
29+
AC_TRY_RUN([
30+
#include <stdarg.h>
31+
#include <stdio.h>
32+
#include <stdlib.h>
33+
34+
void func (int c, char * f, ...)
35+
{
36+
va_list arglist;
37+
va_start (arglist, f);
38+
/* vprintf (f, arglist); */
39+
va_end (arglist);
40+
}
41+
42+
int main ()
43+
{
44+
FILE *f;
45+
func (4711, "Help %d [%s]\n", 10, "ten");
46+
f=fopen ("conftestval", "w");
47+
if (!f) exit (1);
48+
return 0;
49+
}
50+
51+
],[pmix_ac_icc_varargs=`test -f conftestval`],[pmix_ac_icc_varargs=1],[pmix_ac_icc_varargs=1])
52+
53+
if test "$pmix_ac_icc_varargs" = "1"; then
54+
AC_MSG_WARN([*** Problem running configure test!])
55+
AC_MSG_WARN([*** Your icc-8.1 compiler seems to miscompile va_start!])
56+
AC_MSG_WARN([*** Please upgrade compiler to at least version 8.1.027])
57+
AC_MSG_ERROR([*** Cannot continue.])
58+
fi
59+
60+
AC_MSG_RESULT([yes])
61+
62+
rm -rf conftest*])dnl

0 commit comments

Comments
 (0)