[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:
Quincey Koziol 2001-02-12 11:29:15 -05:00
parent 71abf6c00e
commit d7b92c34eb
3 changed files with 532 additions and 566 deletions

View File

@ -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

1040
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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.