[svn-r4213] Purpose:

Bug fix... (sorta)
Description:
    Added --enable-linux-lfs configure flag to have better control over whether
    the enable large file support on Linux machines.  Also removed the
    -malign-double flag for gcc since it can potentially cause errors which
    are difficult to detect.
Platforms tested:
    Linix 2.2 & 2.4 (eirene and dangermouse)
This commit is contained in:
Quincey Koziol 2001-07-16 11:40:56 -05:00
parent 6e7e3dc8c7
commit 00f62b983a
6 changed files with 645 additions and 603 deletions

View File

@ -90,10 +90,10 @@ case "$host_os-$host_cpu" in
# This check should be kept in sync with the *-i686 check below
case "$cc_vendor-$cc_version" in
gcc-2.95*)
ARCH=${ARCH:="-march=i686 -malign-double"}
ARCH=${ARCH:="-march=i686"}
;;
gcc-*|egcs-*|pgcc-*)
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro"}
;;
esac
;;
@ -103,10 +103,10 @@ case "$host_os-$host_cpu" in
*-i686)
case "$cc_vendor-$cc_version" in
gcc-2.9[56]*)
ARCH=${ARCH:="-march=i686 -malign-double"}
ARCH=${ARCH:="-march=i686"}
;;
gcc-*|egcs-*|pgcc-*)
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro"}
;;
esac
;;

1176
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -441,27 +441,44 @@ dnl result could effect the outcome of the sizeof macros below.
dnl
case "$host_cpu-$host_vendor-$host_os" in
*linux*)
AC_CHECK_FUNCS(getdents64,
dnl Add the large file support flags to the CPPFLAGS macro if
dnl we're on a Linux system which austensibly supports LFS. (We
dnl think it does if it has the ``getdents64'' syscall).
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
if test $cc_vers_all -gt 2095000 -a $cc_vers_all -lt 2096000; then
dnl For GCC compilers 2.95.x, the -malign-double flag plays
dnl havoc with the LFS stuff. Remove it. It apparently works
dnl for 2.96, though, so...
CFLAGS_saved=$CFLAGS
CFLAGS=""
for flag in X $CFLAGS_saved; do
if test "$flag" != "X" -a "$flag" != "-malign-double"; then
CFLAGS="$CFLAGS $flag"
fi
done
fi)
dnl ----------------------------------------------------------------------
dnl Enable large file support on linux? Store the result in the LINUX_LFS
dnl variable for posterity
AC_ARG_ENABLE(linux-lfs,
[ --enable-linux-lfs Enable support for large (64-bit) files on linux. [default=check]])
case "X-$enable_linux_lfs" in
X-yes)
LINUX_LFS=yes
;;
X-no)
LINUX_LFS=no
;;
X-|*)
LINUX_LFS=no
AC_CHECK_FUNCS(getdents64,
dnl Add the large file support flags to the CPPFLAGS macro if
dnl we're on a Linux system which austensibly supports LFS. (We
dnl think it does if it has the ``getdents64'' syscall).
LINUX_LFS=yes
)
;;
esac
AC_MSG_CHECKING(for large file support on linux mode)
if test "X$LINUX_LFS" = "Xyes"; then
AC_MSG_RESULT(enabled)
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
else
AC_MSG_RESULT(disabled)
fi
dnl Add POSIX support on Linux systems, so <features.h> defines
dnl __USE_POSIX, which is required to get the prototype for fdopen
dnl defined correctly in <stdio.h>
CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
dnl Also add BSD support on Linux systems, so <features.h> defines
dnl __USE_BSD, which is required to get the prototype for strdup
dnl defined correctly in <string.h> and snprintf & vsnprintf defined

View File

@ -66,6 +66,8 @@ Configuration
* Changed the default value of $NPROCS from 2 to 3 since 3 processes
have a much bigger chance catching parallel errors than just 2.
* Basic port to Compaq (nee DEC) Alpha OSF 5.
* Added --enable-linux-lfs flag to allow more control over whether to enable
or disable large file support on Linux.
Tools

View File

@ -1965,7 +1965,7 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size
void *buf/*out*/)
{
FUNC_ENTER(H5FDread, FAIL);
H5TRACE6("e","xMtiahx",file,type,dxpl_id,addr,size,buf);
H5TRACE6("e","xMtiazx",file,type,dxpl_id,addr,size,buf);
/* Check args */
if (!file || !file->cls) {
@ -2121,7 +2121,7 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz
const void *buf)
{
FUNC_ENTER(H5FDwrite, FAIL);
H5TRACE6("e","xMtiahx",file,type,dxpl_id,addr,size,buf);
H5TRACE6("e","xMtiazx",file,type,dxpl_id,addr,size,buf);
/* Check args */
if (!file || !file->cls) {

View File

@ -2685,8 +2685,7 @@ H5Pset_cache(hid_t plist_id, int mdc_nelmts,
H5F_access_t *fapl = NULL;
FUNC_ENTER (H5Pset_cache, FAIL);
H5TRACE5("e","iIsIszd",plist_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,
rdcc_w0);
H5TRACE5("e","iIszzd",plist_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0);
/* Check arguments */
if (H5P_FILE_ACCESS!=H5P_get_class (plist_id) ||
@ -2739,7 +2738,7 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts,
H5F_access_t *fapl = NULL;
FUNC_ENTER (H5Pget_cache, FAIL);
H5TRACE5("e","i*Is*Is*z*d",plist_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,
H5TRACE5("e","i*Is*z*z*d",plist_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,
rdcc_w0);
/* Check arguments */
@ -2792,7 +2791,7 @@ H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg)
H5D_xfer_t *plist = NULL;
FUNC_ENTER (H5Pset_buffer, FAIL);
H5TRACE4("e","ihxx",plist_id,size,tconv,bkg);
H5TRACE4("e","izxx",plist_id,size,tconv,bkg);
/* Check arguments */
if (H5P_DATASET_XFER != H5P_get_class (plist_id) ||