mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
[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)
This commit is contained in:
parent
71abf6c00e
commit
d7b92c34eb
@ -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
|
||||
|
@ -356,13 +356,6 @@ EOF
|
||||
done
|
||||
rm maketest
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Turn on warning flags for gcc.
|
||||
dnl
|
||||
if test "X$GCC" = "Xyes"; then
|
||||
CFLAGS="$CFLAGS -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"
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Production flags? Save the value in $CONFIG_MODE so we have it for
|
||||
dnl the record.
|
||||
|
Loading…
x
Reference in New Issue
Block a user