summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-09-19 19:38:02 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-09-19 19:38:02 (GMT)
commitbd24d226d67b26dd43910df4e677751e6120f8f5 (patch)
treee4dd8cf84ff9d6b571fd38731a2b7213e37e0923
parent451ddeb9023bbc1652baa0080818abcb6313aa43 (diff)
downloadhdf5-bd24d226d67b26dd43910df4e677751e6120f8f5.zip
hdf5-bd24d226d67b26dd43910df4e677751e6120f8f5.tar.gz
hdf5-bd24d226d67b26dd43910df4e677751e6120f8f5.tar.bz2
[svn-r11439] Purpose:
Bug fix Description: Using the -xarch=v9 flag to specify 64-bit compilation breaks C++ shared libraries. Disable shared C++ libraries if this flag is used. Solution: Instead of trying to disable compilers which recognize the -xarch flag, grep for it in CXX, CXXFLAGS, etc. Platforms tested: modi4, shanti, sleipnir Misc. update: Update to RELEASE and build instructions will be forthcoming once shared Fortran/C++ libraries are regularly passing the Daily Tests.
-rwxr-xr-xconfigure6
-rw-r--r--configure.in16
2 files changed, 10 insertions, 12 deletions
diff --git a/configure b/configure
index 2d97886..0b77b03 100755
--- a/configure
+++ b/configure
@@ -5882,9 +5882,9 @@ fi
if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
H5_CXX_SHARED="yes"
- if (${CXX} -V 2>&1 | grep 'Sun WorkShop') > /dev/null; then
- echo " warning: shared libraries are not supported for Sun WorkShop C++!"
- echo " disabling shared Fortran libraries"
+ if (echo dummy ${CXX} ${CXXLD} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} | grep 'xarch') > /dev/null; then
+ echo " warning: -xarch flag detected"
+ echo " disabling shared C++ libraries"
H5_CXX_SHARED="no"
fi
diff --git a/configure.in b/configure.in
index 21efe50..5415c8d 100644
--- a/configure.in
+++ b/configure.in
@@ -562,18 +562,16 @@ fi
AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
dnl ----------------------------------------------------------------------
-dnl Sun WorkShop C++ seems to have trouble with shared libraries in 64-bit
-dnl mode. This may be related libtool's historical inability to handle the
-dnl -xarch=v9 flag, or the fact that our tests pass this flag as part of
-dnl the CXX variable rather than as a CXXFLAG.
-dnl Avoid the problem by turning off C++ shared libraries when this
-dnl compiler is involved.
+dnl Shared C++ libraries seem not to work on some platforms (modi4, shanti)
+dnl when the -xarch=v9 flag is used to enable 64-bit mode.
+dnl Try to detect the -xarch=v9 flag and disable C++ shared libraries if it's
+dnl being used.
if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
H5_CXX_SHARED="yes"
- if (${CXX} -V 2>&1 | grep 'Sun WorkShop') > /dev/null; then
- echo " warning: shared libraries are not supported for Sun WorkShop C++!"
- echo " disabling shared Fortran libraries"
+ if (echo dummy ${CXX} ${CXXLD} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} | grep 'xarch') > /dev/null; then
+ echo " warning: -xarch flag detected"
+ echo " disabling shared C++ libraries"
H5_CXX_SHARED="no"
fi