summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-05-01 15:23:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-05-01 15:23:29 (GMT)
commitbc2028c55f80da9efd8fb6a2703f4eb99933192c (patch)
tree8c3f53cf512979ed01a15daed3c1ceb4ab8fc79e
parent9f9eb1916c7946ec9db81d0e972d5f31a266f021 (diff)
downloadhdf5-bc2028c55f80da9efd8fb6a2703f4eb99933192c.zip
hdf5-bc2028c55f80da9efd8fb6a2703f4eb99933192c.tar.gz
hdf5-bc2028c55f80da9efd8fb6a2703f4eb99933192c.tar.bz2
[svn-r5311] Purpose:
Configure cleanup Description: Bring over improved gcc warnings etc from development branch Platforms tested: Linux 2.2 (eirene) w/gcc 2.95.2, Solaris 2.6 (baldric) w/gcc 2.8.1, FreeBSD 4.5 (sleipnir) w/gcc 2.95.3, FreeBSD 4.5 (sleipnir) w/gcc 3.1 (pre)
-rw-r--r--config/gnu-flags48
1 files changed, 40 insertions, 8 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index 72d7847..b60ca93 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -89,7 +89,7 @@ case "$host_os-$host_cpu" in
*Pro*|*II*)
# This check should be kept in sync with the *-i686 check below
case "$cc_vendor-$cc_version" in
- gcc-2.95*)
+ gcc-2.95*|gcc-3*)
ARCH=${ARCH:="-march=i686"}
;;
gcc-*|egcs-*|pgcc-*)
@@ -102,7 +102,7 @@ case "$host_os-$host_cpu" in
*-i686)
case "$cc_vendor-$cc_version" in
- gcc-2.9[56]*)
+ gcc-2.9[56]*|gcc-3*)
ARCH=${ARCH:="-march=i686"}
;;
gcc-*|egcs-*|pgcc-*)
@@ -114,7 +114,7 @@ esac
# Host-specific flags
case "`hostname`" in
- hawkwind.ncsa.uiuc.edu)
+ sleipnir.ncsa.uiuc.edu)
ARCH="$ARCH -pipe"
;;
esac
@@ -123,14 +123,14 @@ esac
case "$cc_vendor-$cc_version" in
gcc*|egcs*|pgcc*)
# General
- CFLAGS="$CFLAGS $ARCH -ansi -pedantic -Wchar-subscripts -Wall -W -Wshadow -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline"
+ CFLAGS="$CFLAGS $ARCH -ansi -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline"
# Production
PROD_CFLAGS="-O2 $NOFP -finline-functions"
PROD_CPPFLAGS=
# Debug
- DEBUG_CFLAGS="-g -fverbose-asm -Wpointer-arith -Wconversion -Wredundant-decls"
+ DEBUG_CFLAGS="-g -fverbose-asm"
DEBUG_CPPFLAGS=
# Profile
@@ -148,9 +148,9 @@ case "$cc_vendor-$cc_version" in
cc_flags_set=yes
;;
- gcc-2.8.*)
+ gcc-2.8*)
# General
- CFLAGS="$CFLAGS $ARCH -Wsign-compare"
+ # No changes from default GCC flags...
# Production
PROD_CFLAGS="$PROD_CFLAGS -fschedule-insns2"
@@ -160,7 +160,39 @@ case "$cc_vendor-$cc_version" in
;;
gcc-2.95*)
- # No changes from default GCC flags...
+ # Append some extra warning flags that only gcc2.95+ know about
+ CFLAGS="$CFLAGS -Wno-long-long"
+
+ # Flags are set
+ cc_flags_set=yes
+ ;;
+
+ gcc-3.0*)
+ # Replace -ansi flag with -std=c99 flag
+ CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+
+ # Append warning flags from gcc-2.95.* case
+ CFLAGS="$CFLAGS -Wno-long-long"
+
+ # Append some extra warning flags that only gcc3+ know about
+ CFLAGS="$CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+
+ # Flags are set
+ cc_flags_set=yes
+ ;;
+
+ gcc-3.1*)
+ # Replace -ansi flag with -std=c99 flag
+ CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+
+ # Append warning flags from gcc-2.95* case
+ CFLAGS="$CFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3.0* case
+ CFLAGS="$CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+
+ # Append some extra warning flags that only gcc3.1+ know about
+ # None currently...
# Flags are set
cc_flags_set=yes