summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-03-04 18:45:58 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-03-04 18:45:58 (GMT)
commitb92ef0f7d0e158bdcfc5d1687bfdea6619bde78f (patch)
tree3c9cbacde4402e0fe2a4a402ab81a8914cb8a6b5
parentc0ecc467e0def62a60c2a228a4eb09fdadade2b0 (diff)
downloadhdf5-b92ef0f7d0e158bdcfc5d1687bfdea6619bde78f.zip
hdf5-b92ef0f7d0e158bdcfc5d1687bfdea6619bde78f.tar.gz
hdf5-b92ef0f7d0e158bdcfc5d1687bfdea6619bde78f.tar.bz2
[svn-r1999] Correctly detect gcc 2.95.x and Pentium Pro|Pentium II|etc. processors.
-rw-r--r--config/gnu-flags60
1 files changed, 48 insertions, 12 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index e34c375..99c9419 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -75,17 +75,53 @@ EOF
fi
# Architecture-specific flags
-case "$host_cpu" in
- i686)
- ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
- ;;
+case "$host_os-$host_cpu" in
+ # FreeBSD sets the information from "hostname -m" to the general machine
+ # architecture, not the specific CPU for the machine, so even our
+ # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD
+ # machine, use the "sysctl" command to get the CPU hardware model.
+ freebsd*)
+ host_cpu_model=`sysctl -n hw.model`
+ case "$host_cpu_model" in
+ # Hmm.. this might not catch Celerons, but it won't hurt them either...
+ *Pro*|*II*)
+ # 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"}
+ ;;
+ gcc-*|egcs-*|pgcc-*)
+ ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ *-i686)
+ case "$cc_vendor-$cc_version" in
+ gcc-2.95*)
+ ARCH=${ARCH:="-march=i686 -malign-double"}
+ ;;
+ gcc-*|egcs-*|pgcc-*)
+ ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
+ ;;
+ esac
+ ;;
+esac
+
+# Host-specific flags
+case "`hostname`" in
+ hawkwind.ncsa.uiuc.edu)
+ ARCH="$ARCH -pipe"
+ ;;
esac
# Compiler flags
case "$cc_vendor-$cc_version" in
gcc-2.7*)
# General
- CFLAGS="$CFLAGS -ansi"
+ CFLAGS="$CFLAGS $ARCH -ansi"
# Production
PROC_CFLAGS="-O3 $NOFP -finline-functions -Wno-shadow"
@@ -105,10 +141,10 @@ case "$cc_vendor-$cc_version" in
gcc-2.8.*)
# General
- CFLAGS="$CFLAGS -Wsign-compare"
+ CFLAGS="$CFLAGS $ARCH -Wsign-compare"
# Production
- PROD_CFLAGS="$ARCH -O3 $NOFP -finline-functions -fschedule-insns2 -Wno-shadow"
+ PROD_CFLAGS="-O3 $NOFP -finline-functions -fschedule-insns2 -Wno-shadow"
PROD_CPPFLAGS=
# Debug
@@ -123,12 +159,12 @@ case "$cc_vendor-$cc_version" in
cc_flags_set=yes
;;
- gcc-2.95)
+ gcc-2.95*)
# General
- CFLAGS="$CFLAGS -Wsign-compare"
+ CFLAGS="$CFLAGS $ARCH -Wsign-compare"
# Production
- PROD_CFLAGS="$ARCH -O6 $NOFP -Wno-shadow"
+ PROD_CFLAGS="-O6 $NOFP -Wno-shadow"
PROD_CPPFLAGS=
# Debug
@@ -145,10 +181,10 @@ case "$cc_vendor-$cc_version" in
egcs-2.*|pgcc-2.*)
# General
- CFLAGS="$CFLAGS -Wsign-compare"
+ CFLAGS="$CFLAGS $ARCH -Wsign-compare"
# Production
- PROD_CFLAGS="$ARCH -O6 $NOFP -Wno-shadow"
+ PROD_CFLAGS="-O6 $NOFP -Wno-shadow"
PROD_CPPFLAGS=
# Debug