mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[svn-r3891] Purpose:
Bug Fix Description: Linux does actually support 64 bit files (those greater than 2GB), you just have to defined a bunch of, seemingly meaningless, macros in order to coax glibc to work with you. 64 bit file support is in the 2.3 and above kernels by default. For lower, well...upgrade or something. The one weird thing, the "-mdouble-align" flag was causing hdf5 to barf when the large file support was compiled in there. It has something to do with the structures and their alignment or something. Very weird. Solution: Added a test to see if we're on a Linux boxen with kernel >2.3 and if so then specify the flags for LFS support. Removed the -mdouble-align flag if we do use LFS support since it causes damage. Platforms tested: Linux (Dangermouse)
This commit is contained in:
parent
ee5b6b12af
commit
4a72a04048
@ -101,9 +101,24 @@ case "$host_os-$host_cpu" in
|
||||
;;
|
||||
|
||||
*-i686)
|
||||
# Large file system support has to be compiled with these flags.
|
||||
LFS_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
|
||||
case "$cc_vendor-$cc_version" in
|
||||
gcc-2.95*)
|
||||
ARCH=${ARCH:="-march=i686 -malign-double"}
|
||||
case "`uname -r`" in
|
||||
# For kernels 2.2 and below, we don't have support
|
||||
# for >2GB files. We care only about >2.3.
|
||||
[2-9].[3-9].*)
|
||||
# The -malign-double flag is bad for our
|
||||
# architecture with large file support. Define
|
||||
# these flags so that we can have large file
|
||||
# support in the library.
|
||||
ARCH=${ARCH:="-march=i686 $LFS_FLAGS"}
|
||||
;;
|
||||
*)
|
||||
ARCH=${ARCH:="-march=i686 -malign-double"}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
gcc-*|egcs-*|pgcc-*)
|
||||
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
|
||||
|
Loading…
Reference in New Issue
Block a user