From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-144463-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 8057C138495
	for <garchives@archives.gentoo.org>; Mon, 14 Jan 2013 21:53:42 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7BEB021C08C;
	Mon, 14 Jan 2013 21:53:33 +0000 (UTC)
Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com [209.85.214.179])
	(using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E0B6021C066
	for <gentoo-user@lists.gentoo.org>; Mon, 14 Jan 2013 21:53:31 +0000 (UTC)
Received: by mail-ob0-f179.google.com with SMTP id x4so4352141obh.24
        for <gentoo-user@lists.gentoo.org>; Mon, 14 Jan 2013 13:53:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=8lUjjO3t2a6NG+7U2EuJXAN5easakG6iZI26laJA7wg=;
        b=gxkBUR2EuLJcOJ3GmtIb6xPDCowVHjp9vVR8VpNqULTPNqzpyXO0E0juOWrWE0ozxB
         royEwDgrMOcDv+UgvOlKZRh9g3SQlJzrXRZkbf3LVza8EjEO6gjeeu4ZyRsmlc9m2b/q
         yFi4J0McHmciUFdh+gVGIg0jCYAyM8ZsGdgM6FXm4R3sKZRFARWNq/idrEwMbBXpyyck
         jj20MtVdLc9GhxvtgVGabmaKWbvza1wxkYXVZL9Vr945XZ9yocHBDvciE+8DiLWO/ZRw
         PSoCwYhSYnCiSJug6N0HbVIdhkZTX4kBSKsWCNCySbUNbfH51vkFIIPaDjtrc7ydF1jJ
         7Suw==
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.60.169.205 with SMTP id ag13mr53638011oec.40.1358200411030;
 Mon, 14 Jan 2013 13:53:31 -0800 (PST)
Received: by 10.60.20.234 with HTTP; Mon, 14 Jan 2013 13:53:30 -0800 (PST)
In-Reply-To: <CAG2nJkO70K+y3jAUkDHzwQwqG5rOhoVVp9qCpBi1fNdhwgFMzg@mail.gmail.com>
References: <CAC=wYCFNz=MwXpCanqV4wY-YsA+NpfoLs+jLquFt8u1XjaLO-w@mail.gmail.com>
	<CAG2nJkO70K+y3jAUkDHzwQwqG5rOhoVVp9qCpBi1fNdhwgFMzg@mail.gmail.com>
Date: Tue, 15 Jan 2013 08:53:30 +1100
Message-ID: <CAC=wYCHOnLJA9k8P4QWVL5JDbHxvmoz-3-rWS6Bim54FH02B2w@mail.gmail.com>
Subject: Re: [gentoo-user] How reliable is emerge --info output?
From: Adam Carter <adamcarter3@gmail.com>
To: "gentoo-user@lists.gentoo.org" <gentoo-user@lists.gentoo.org>
Content-Type: multipart/alternative; boundary=bcaec5523a6408866104d346ad52
X-Archives-Salt: 1c0d1981-2abc-4c5e-9167-05464f86f9fa
X-Archives-Hash: 436a558c61bb25a1dc571b26a5f6158f

--bcaec5523a6408866104d346ad52
Content-Type: text/plain; charset=ISO-8859-1

>   # Set optimization level
>         if [[ ${ARCH} == hppa ]]; then
>                 mozconfig_annotate "more than -O0 causes a segfault on
> hppa" --enable-optimize=-O0
>         elif [[ ${ARCH} == x86 ]]; then
>                 mozconfig_annotate "less then -O2 causes a segfault on
> x86" --enable-optimize=-O2
>         elif use custom-optimization || [[ ${ARCH} =~ (alpha|ia64) ]]; then
>                 # Set optimization level based on CFLAGS
>                 if is-flag -O0; then
>                         mozconfig_annotate "from CFLAGS"
> --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 -O3; then
>                         mozconfig_annotate "from CFLAGS"
> --enable-optimize=-O3
>                 elif is-flag -O1; then
>                         mozconfig_annotate "from CFLAGS"
> --enable-optimize=-O1
>                 elif is-flag -Os; then
>                         mozconfig_annotate "from CFLAGS"
> --enable-optimize=-Os
>                 else
>                         mozconfig_annotate "Gentoo's default
> optimization" --enable-optimize=-O2
>                 fi
>         else
>                 # Enable Mozilla's default
>                 mozconfig_annotate "mozilla default" --enable-optimize
>         fi
> """
>

And just after that, it appears that if custom-cflags is not set, then it
strips all the -O* flags (if i'm reading the code correctly), which would
explain why there's no -O set for the compiler.....

        # Strip optimization so it does not end up in compile string
        filter-flags '-O*'

        # Strip over-aggressive CFLAGS
        use custom-cflags || strip-flags

--bcaec5523a6408866104d346ad52
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><div class=3D"gmail_quote">=
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">=A0
# Set optimization level<br>
=A0 =A0 =A0 =A0 if [[ ${ARCH} =3D=3D hppa ]]; then<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mozconfig_annotate &quot;more than -O0 caus=
es a segfault on<br>
hppa&quot; --enable-optimize=3D-O0<br>
=A0 =A0 =A0 =A0 elif [[ ${ARCH} =3D=3D x86 ]]; then<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mozconfig_annotate &quot;less then -O2 caus=
es a segfault on<br>
x86&quot; --enable-optimize=3D-O2<br>
=A0 =A0 =A0 =A0 elif use custom-optimization || [[ ${ARCH} =3D~ (alpha|ia64=
) ]]; then<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 # Set optimization level based on CFLAGS<br=
>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if is-flag -O0; then<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mozconfig_annotate &quot;fr=
om CFLAGS&quot; --enable-optimize=3D-O0<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 elif [[ ${ARCH} =3D=3D ppc ]] &amp;&amp; ha=
s_version<br>
&#39;&gt;=3Dsys-libs/glibc-2.8&#39;; then<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mozconfig_annotate &quot;mo=
re than -O1 segfaults on<br>
ppc with glibc-2.8&quot; --enable-optimize=3D-O1<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 elif is-flag -O3; then<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mozconfig_annotate &quot;fr=
om CFLAGS&quot; --enable-optimize=3D-O3<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 elif is-flag -O1; then<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mozconfig_annotate &quot;fr=
om CFLAGS&quot; --enable-optimize=3D-O1<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 elif is-flag -Os; then<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mozconfig_annotate &quot;fr=
om CFLAGS&quot; --enable-optimize=3D-Os<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mozconfig_annotate &quot;Ge=
ntoo&#39;s default<br>
optimization&quot; --enable-optimize=3D-O2<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 fi<br>
=A0 =A0 =A0 =A0 else<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 # Enable Mozilla&#39;s default<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mozconfig_annotate &quot;mozilla default&qu=
ot; --enable-optimize<br>
=A0 =A0 =A0 =A0 fi<br>
&quot;&quot;&quot;<br></blockquote><div><br>And just after that, it appears=
 that if custom-cflags is not set, then it strips all the -O* flags (if i&#=
39;m reading the code correctly), which would explain why there&#39;s no -O=
 set for the compiler.....<br>
<br>=A0=A0=A0=A0=A0=A0=A0 # Strip optimization so it does not end up in com=
pile string<br>=A0=A0=A0=A0=A0=A0=A0 filter-flags &#39;-O*&#39;<br><br>=A0=
=A0=A0=A0=A0=A0=A0 # Strip over-aggressive CFLAGS<br>=A0=A0=A0=A0=A0=A0=A0 =
use custom-cflags || strip-flags<br></div></div></div>
</div>

--bcaec5523a6408866104d346ad52--