1
1

After a bunch more back-n-forth with Paul Hargrove, hopefully this

visibility stuff will now be fixed!

This commit was SVN r25944.
Этот коммит содержится в:
Jeff Squyres 2012-02-17 00:09:32 +00:00
родитель a055c5662c
Коммит eb47a97025
4 изменённых файлов: 32 добавлений и 33 удалений

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

@ -44,27 +44,27 @@ AC_DEFUN([OPAL_CHECK_VISIBILITY],[
sun)
# Check using Sun Studio -xldscope=hidden flag
opal_add=-xldscope=hidden
CFLAGS="$CFLAGS_orig $opal_add"
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY $opal_add -errwarn=%all"
;;
*)
# Check using -fvisibility=hidden
opal_add=-fvisibility=hidden
CFLAGS="$CFLAGS_orig $opal_add"
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY $opal_add -Werror"
;;
esac
AC_MSG_CHECKING([if $CC supports $opal_add])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
__attribute__((visibility("default"))) int foo;
]],[[fprintf(stderr, "Hello, world\n");]])],
[],
[AS_IF([test -s conftest.err],
[$GREP -iq visibility conftest.err
# If we find "visibility" in the stderr, then
# assume it doesn't work
AS_IF([test "$?" = "0"], [opal_add=])])
])
], [opal_add=])
AS_IF([test "$opal_add" = ""],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes])])

5
opal/mca/hwloc/hwloc132/README-ompi.txt Обычный файл
Просмотреть файл

@ -0,0 +1,5 @@
Applied the following patches from the upstream hwloc 1.3 branch after
the v1.3.2 release:
https://svn.open-mpi.org/trac/hwloc/changeset/4306
https://svn.open-mpi.org/trac/hwloc/changeset/4309

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

@ -42,7 +42,7 @@ AC_DEFUN([MCA_opal_hwloc_hwloc132_POST_CONFIG],[
AC_DEFUN([MCA_opal_hwloc_hwloc132_CONFIG],[
AC_CONFIG_FILES([opal/mca/hwloc/hwloc132/Makefile])
OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc132_save_CPPFLAGS opal_hwloc_hwloc132_save_LDFLAGS opal_hwloc_hwloc132_save_LIBS opal_hwloc_hwloc132_save_cairo opal_hwloc_hwloc132_save_xml opal_hwloc_hwloc132_basedir opal_hwloc_hwloc132_file opal_hwloc_hwloc132_save_enable_pci])
OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc132_save_CPPFLAGS opal_hwloc_hwloc132_save_LDFLAGS opal_hwloc_hwloc132_save_LIBS opal_hwloc_hwloc132_save_cairo opal_hwloc_hwloc132_save_xml opal_hwloc_hwloc132_basedir opal_hwloc_hwloc132_file opal_hwloc_hwloc132_save_enable_pci opal_hwloc_hwloc132_save_cflags])
# default to this component not providing support
opal_hwloc_hwloc132_basedir=opal/mca/hwloc/hwloc132
@ -76,6 +76,10 @@ AC_DEFUN([MCA_opal_hwloc_hwloc132_CONFIG],[
enable_libxml2=no
enable_xml=yes
# hwloc checks for compiler visibility, and its needs to do
# this without "picky" flags.
opal_hwloc_hwloc132_save_cflags=$CFLAGS
CFLAGS=$OMPI_CFLAGS_BEFORE_PICKY
HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc132/hwloc],
[AC_MSG_CHECKING([whether hwloc configure succeeded])
AC_MSG_RESULT([yes])
@ -88,6 +92,7 @@ AC_DEFUN([MCA_opal_hwloc_hwloc132_CONFIG],[
[AC_MSG_CHECKING([whether hwloc configure succeeded])
AC_MSG_RESULT([no])
opal_hwloc_hwloc132_support=no])
CFLAGS=$opal_hwloc_hwloc132_save_cflags
# Restore some env variables, if necessary
AS_IF([test -n "$opal_hwloc_hwloc132_save_cairo"],

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

@ -13,7 +13,7 @@
# and renamed/modified for hwloc:
# Copyright (c) 2009 inria. All rights reserved.
# Copyright (c) 2009-2010 Université Bordeaux 1
# Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved.
# Copyright © 2010-2012 Cisco Systems, Inc. All rights reserved.
# See COPYING in top-level directory.
#
# Redistribution and use in source and binary forms, with or without
@ -86,41 +86,30 @@ AC_DEFUN([_HWLOC_CHECK_VISIBILITY],[
# Check using Sun Studio -xldscope=hidden flag
hwloc_add=-xldscope=hidden
CFLAGS="$CFLAGS_orig $hwloc_add -errwarn=%all"
AC_MSG_CHECKING([if $CC supports -xldscope])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
__attribute__((visibility("default"))) int foo;
]],[[fprintf(stderr, "Hello, world\n");]])],
[],
[hwloc_add=])
AS_IF([test "$hwloc_add" = ""],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes])])
;;
*)
# Check using -fvisibility=hidden
hwloc_add=-fvisibility=hidden
CFLAGS="$CFLAGS_orig $hwloc_add -Werror"
AC_MSG_CHECKING([if $CC supports -fvisibility])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
__attribute__((visibility("default"))) int foo;
]],[[fprintf(stderr, "Hello, world\n");]])],
[],
[AS_IF([test -s conftest.err],
[$GREP -iq visibility conftest.err
# If we find "visibility" in the stderr, then
# assume it doesn't work
AS_IF([test "$?" = "0"], [hwloc_add=])])
])
AS_IF([test "$hwloc_add" = ""],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes])])
CFLAGS="$CFLAGS_orig $hwloc_add -Werror"
;;
esac
AC_MSG_CHECKING([if $CC supports $hwloc_add])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
__attribute__((visibility("default"))) int foo;
]],[[fprintf(stderr, "Hello, world\n");]])],
[AS_IF([test -s conftest.err],
[$GREP -iq visibility conftest.err
# If we find "visibility" in the stderr, then
# assume it doesn't work
AS_IF([test "$?" = "0"], [hwloc_add=])])
], [hwloc_add=])
AS_IF([test "$hwloc_add" = ""],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes])])
CFLAGS=$CFLAGS_orig
HWLOC_VISIBILITY_CFLAGS=$hwloc_add