From 6a10970c1f0b221bea877d4da248aa87b9f700ae Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Fri, 7 Nov 2003 18:42:45 +0000 Subject: Close bug #32882 --- eclass/flag-o-matic.eclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'eclass') diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 7bd80f3a4833..0face1ffc19d 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.29 2003/10/31 23:03:40 puggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.30 2003/11/07 18:42:45 azarah Exp $ # # Author Bart Verwilst @@ -172,6 +172,14 @@ strip-flags() { done done + # In case we filtered out all optimization flags fallback to -O2 + if [ "${CFLAGS/-O}" != "${CFLAGS}" -a "${NEW_CFLAGS/-O}" = "${NEW_CFLAGS}" ]; then + NEW_CFLAGS="${NEW_CFLAGS} -O2" + fi + if [ "${CXXFLAGS/-O}" != "${CXXFLAGS}" -a "${NEW_CXXFLAGS/-O}" = "${NEW_CXXFLAGS}" ]; then + NEW_CXXFLAGS="${NEW_CXXFLAGS} -O2" + fi + set +f [ `use debug` ] \ -- cgit v1.2.3-65-gdbad