mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r5304] Purpose:
Configure cleanup Description: Fine-tune the gcc version checks a bit more... Platforms tested: FreeBSD 4.5 (sleipnir) with gcc 2.95.3 and gcc 3.1 (prerelease) and Solaris 2.6 (baldric) with gcc 2.8.1
This commit is contained in:
parent
2491fa05d4
commit
80de8bccb9
@ -123,7 +123,7 @@ esac
|
||||
case "$cc_vendor-$cc_version" in
|
||||
gcc*|egcs*|pgcc*)
|
||||
# General
|
||||
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 -Wno-long-long"
|
||||
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"
|
||||
@ -149,7 +149,7 @@ case "$cc_vendor-$cc_version" in
|
||||
cc_flags_set=yes
|
||||
;;
|
||||
|
||||
gcc-2.8.*)
|
||||
gcc-2.8*)
|
||||
# General
|
||||
CFLAGS="$CFLAGS $ARCH -Wsign-compare"
|
||||
|
||||
@ -160,17 +160,21 @@ case "$cc_vendor-$cc_version" in
|
||||
cc_flags_set=yes
|
||||
;;
|
||||
|
||||
gcc-2.95.*)
|
||||
# No changes from default GCC flags...
|
||||
gcc-2.95*)
|
||||
# Append some extra warning flags that only gcc3+ know about
|
||||
CFLAGS="$CFLAGS -Wno-long-long"
|
||||
|
||||
# Flags are set
|
||||
cc_flags_set=yes
|
||||
;;
|
||||
|
||||
gcc-3.*)
|
||||
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"
|
||||
|
||||
@ -178,6 +182,23 @@ case "$cc_vendor-$cc_version" in
|
||||
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
|
||||
;;
|
||||
|
||||
egcs-2.*|pgcc-2.*)
|
||||
# General
|
||||
CFLAGS="$CFLAGS $ARCH -Wsign-compare"
|
||||
|
Loading…
Reference in New Issue
Block a user