From 55a42d534a0e20b7f549d9997c1da0653c1d70b4 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 26 Feb 2003 14:55:27 -0500 Subject: [svn-r6439] Purpose: Bug fix w/gcc 2.95.x where x<3 Description: -O3 optimization level causes problems for gcc 2.95.2 on eirene Solution: Only enable -O3 if using gcc 2.95.x (where x>=3) or gcc 3 Otherwise, use older setting of -O2 -finline-functions Platforms tested: FreeBSD 4.7 (sleipnir) Linux 2.2 (eirene) --- config/gnu-flags | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/gnu-flags b/config/gnu-flags index b5e9a48..a337f75 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -131,7 +131,14 @@ case "$cc_vendor-$cc_version" in 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="-O3 $NOFP" + case "$cc_vendor-$cc_version" in + gcc-2.95.3|gcc-2.95.4|gcc-3*) + PROD_CFLAGS="-O3 $NOFP" + ;; + *) + PROD_CFLAGS="-O2 $NOFP -finline-functions" + ;; + esac PROD_CPPFLAGS= # Debug -- cgit v0.12