summaryrefslogtreecommitdiffstats
path: root/config/gnu-flags
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-05-08 00:04:50 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-05-08 00:04:50 (GMT)
commit4a72a04048b88c49a4bea654b5256aa6eaac2663 (patch)
tree55e5baeecb4617f00c0cbf54129c9ad9b06956d3 /config/gnu-flags
parentee5b6b12af650a74b559575cda88f7e6480b8c98 (diff)
downloadhdf5-4a72a04048b88c49a4bea654b5256aa6eaac2663.zip
hdf5-4a72a04048b88c49a4bea654b5256aa6eaac2663.tar.gz
hdf5-4a72a04048b88c49a4bea654b5256aa6eaac2663.tar.bz2
[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)
Diffstat (limited to 'config/gnu-flags')
-rw-r--r--config/gnu-flags17
1 files changed, 16 insertions, 1 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index e3a9173..9ad36b2 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -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"}