summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-02-12 16:29:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-02-12 16:29:15 (GMT)
commitd7b92c34ebdd25b6088cc5a951f21bc0a125bb24 (patch)
treed03d7e8d1670939ed7cc775e7fcbd8ae1a146832 /config
parent71abf6c00eaa6aa9dba53112a6f0bf2cd2434e51 (diff)
downloadhdf5-d7b92c34ebdd25b6088cc5a951f21bc0a125bb24.zip
hdf5-d7b92c34ebdd25b6088cc5a951f21bc0a125bb24.tar.gz
hdf5-d7b92c34ebdd25b6088cc5a951f21bc0a125bb24.tar.bz2
[svn-r3400] Purpose:
Code cleaning Description: Moved all gcc compiler flags into the config/gnu-flags file and re-added the warning flags removed during the beta testing. Platforms tested: FreeBSD 4.2 (hawkwind)
Diffstat (limited to 'config')
-rw-r--r--config/gnu-flags51
1 files changed, 14 insertions, 37 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index 1788121..e3a9173 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -119,14 +119,14 @@ case "`hostname`" in
;;
esac
-# Compiler flags
+# Common GCC flags for various situations
case "$cc_vendor-$cc_version" in
- gcc-2.7*)
+ gcc*|egcs*|pgcc*)
# General
- CFLAGS="$CFLAGS $ARCH -ansi"
+ 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 -Wpointer-arith -Wconversion -Wredundant-decls"
# Production
- PROC_CFLAGS="-O3 $NOFP -finline-functions"
+ PROD_CFLAGS="-O2 $NOFP -finline-functions"
PROD_CPPFLAGS=
# Debug
@@ -137,6 +137,14 @@ case "$cc_vendor-$cc_version" in
PROFILE_CFLAGS=-pg
PROFILE_CPPFLAGS=
+ ;;
+esac
+
+# Version specific GCC flags
+case "$cc_vendor-$cc_version" in
+ gcc-2.7*)
+ # No changes from default GCC flags...
+
# Flags are set
cc_flags_set=yes
;;
@@ -146,36 +154,14 @@ case "$cc_vendor-$cc_version" in
CFLAGS="$CFLAGS $ARCH -Wsign-compare"
# Production
- PROD_CFLAGS="-O3 $NOFP -finline-functions -fschedule-insns2"
- PROD_CPPFLAGS=
-
- # Debug
- DEBUG_CFLAGS="-g -fverbose-asm"
- DEBUG_CPPFLAGS=
-
- # Profile
- PROFILE_CFLAGS=-pg
- PROFILE_CPPFLAGS=
+ PROD_CFLAGS="$PROD_CFLAGS -fschedule-insns2"
# Flags are set
cc_flags_set=yes
;;
gcc-2.95*)
- # General
- CFLAGS="$CFLAGS $ARCH -Wsign-compare"
-
- # Production
- PROD_CFLAGS="-O2 $NOFP"
- PROD_CPPFLAGS=
-
- # Debug
- DEBUG_CFLAGS="-g -fverbose-asm"
- DEBUG_CPPFLAGS=
-
- # Profile
- PROFILE_CFLAGS=-pg
- PROFILE_CPPFLAGS=
+ # No changes from default GCC flags...
# Flags are set
cc_flags_set=yes
@@ -187,15 +173,6 @@ case "$cc_vendor-$cc_version" in
# Production
PROD_CFLAGS="-O6 $NOFP"
- PROD_CPPFLAGS=
-
- # Debug
- DEBUG_CFLAGS="-g -fverbose-asm"
- DEBUG_CPPFLAGS=
-
- # Profile
- PROFILE_CFLAGS=-pg
- PROFILE_CPPFLAGS=
# Flags are set
cc_flags_set=yes