summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorRaúl Porcel <armin76@gentoo.org>2008-07-18 17:55:00 +0000
committerRaúl Porcel <armin76@gentoo.org>2008-07-18 17:55:00 +0000
commitf6c9fde55a112fcda7002abc0fb931eecf7d0cf9 (patch)
tree33e74ef48df5ff4595c816f43d4ce816194be83d /eclass
parentRemove useless edit_makefiles (diff)
downloadgentoo-2-f6c9fde55a112fcda7002abc0fb931eecf7d0cf9.tar.gz
gentoo-2-f6c9fde55a112fcda7002abc0fb931eecf7d0cf9.tar.bz2
gentoo-2-f6c9fde55a112fcda7002abc0fb931eecf7d0cf9.zip
Enable by default mozilla's optimization
Diffstat (limited to 'eclass')
-rw-r--r--eclass/mozcoreconf-2.eclass32
1 files changed, 19 insertions, 13 deletions
diff --git a/eclass/mozcoreconf-2.eclass b/eclass/mozcoreconf-2.eclass
index 985525699895..6e2c65601052 100644
--- a/eclass/mozcoreconf-2.eclass
+++ b/eclass/mozcoreconf-2.eclass
@@ -1,12 +1,14 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mozcoreconf-2.eclass,v 1.5 2008/06/26 18:08:46 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mozcoreconf-2.eclass,v 1.6 2008/07/18 17:55:00 armin76 Exp $
#
# mozcoreconf.eclass : core options for mozilla
# inherit mozconfig-2 if you need USE flags
inherit multilib flag-o-matic
+IUSE="${IUSE} custom-optimization"
+
RDEPEND="x11-libs/libXrender
x11-libs/libXt
x11-libs/libXmu
@@ -75,19 +77,23 @@ mozconfig_init() {
#
####################################
- # Set optimization level based on CFLAGS
- if is-flag -O0; then
- mozconfig_annotate "from CFLAGS" --enable-optimize=-O0
- elif [[ ${ARCH} == hppa ]]; then
- mozconfig_annotate "more than -O0 causes segfaults on hppa" --enable-optimize=-O0
- elif [[ ${ARCH} == ppc ]] && has_version '>=sys-libs/glibc-2.8'; then
- mozconfig_annotate "more than -O1 segfaults on ppc with glibc-2.8" --enable-optimize=-O1
- elif is-flag -O1; then
- mozconfig_annotate "from CFLAGS" --enable-optimize=-O1
- elif is-flag -Os; then
- mozconfig_annotate "from CFLAGS" --enable-optimize=-Os
+ # Set optimization level
+ if use custom-optimization; then
+ # Set optimization level based on CFLAGS
+ if is-flag -O0; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-O0
+ elif [[ ${ARCH} == hppa ]]; then
+ mozconfig_annotate "more than -O0 causes segfaults on hppa" --enable-optimize=-O0
+ elif [[ ${ARCH} == ppc ]] && has_version '>=sys-libs/glibc-2.8'; then
+ mozconfig_annotate "more than -O1 segfaults on ppc with glibc-2.8" --enable-optimize=-O1
+ elif is-flag -O1; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-O1
+ elif is-flag -Os; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-Os
+ fi
else
- mozconfig_annotate "mozilla fallback" --enable-optimize=-O2
+ # Enable Mozilla's default
+ mozconfig_annotate "mozilla default" --enable-optimize
fi
# Now strip optimization from CFLAGS so it doesn't end up in the