From 774b4724b1771e31f2df99fad83e9a4a04a28ecb Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 2 May 2003 09:31:08 -0500 Subject: [svn-r6792] Purpose: Initial pass for gcc3.3 support Description: Added section for gcc 3.3+ and cleaned up the gcc 3.2+ section a little. Platforms tested: FreeBSD 4.8 (sleipnir) w/gcc 3.3 snapshot Triple check unneeded. --- config/gnu-flags | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/config/gnu-flags b/config/gnu-flags index de5b91c..34f140d 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -191,6 +191,31 @@ case "$cc_vendor-$cc_version" in cc_flags_set=yes ;; + gcc-3.3*) + # 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* case + CFLAGS="$CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" + + # Append warning flags from gcc-3.2* case + CFLAGS="$CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization" + # The "format=2" warning generates too many warnings about valid + # usage in the library. + #CFLAGS="$CFLAGS -Wformat=2" + # The "unreachable code" warning does not appear to be reliable yet... + #CFLAGS="$CFLAGS -Wunreachable-code" + + # Append more extra warning flags that only gcc3.3+ know about + CFLAGS="$CFLAGS -Wendif-labels" + + # Flags are set + cc_flags_set=yes + ;; + gcc-3.2*) # Replace -ansi flag with -std=c99 flag CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`" @@ -202,7 +227,10 @@ case "$cc_vendor-$cc_version" in CFLAGS="$CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" # Append more extra warning flags that only gcc3.2+ know about - CFLAGS="$CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wcomments" + CFLAGS="$CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization" + # The "format=2" warning generates too many warnings about valid + # usage in the library. + #CFLAGS="$CFLAGS -Wformat=2" # The "unreachable code" warning does not appear to be reliable yet... #CFLAGS="$CFLAGS -Wunreachable-code" -- cgit v0.12