diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/gnu-flags | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/config/gnu-flags b/config/gnu-flags index e24e1db..228ae1b 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -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" |