From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QcWD8-0003iW-6p for garchives@archives.gentoo.org; Fri, 01 Jul 2011 05:24:14 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7F2261C006; Fri, 1 Jul 2011 05:22:51 +0000 (UTC) Received: from qmta06.emeryville.ca.mail.comcast.net (qmta06.emeryville.ca.mail.comcast.net [76.96.30.56]) by pigeon.gentoo.org (Postfix) with ESMTP id 372C61C006 for ; Fri, 1 Jul 2011 05:22:51 +0000 (UTC) Received: from omta01.emeryville.ca.mail.comcast.net ([76.96.30.11]) by qmta06.emeryville.ca.mail.comcast.net with comcast id 2VGH1h0040EPchoA6VNoaa; Fri, 01 Jul 2011 05:22:48 +0000 Received: from ajax ([24.11.47.14]) by omta01.emeryville.ca.mail.comcast.net with comcast id 2VP31h00F0JMh7c8MVP6g3; Fri, 01 Jul 2011 05:23:07 +0000 Date: Fri, 1 Jul 2011 01:22:46 -0400 From: Frank Peters To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] Re: GCC-4.5.2 Has Serious Problems Message-Id: <20110701012246.276ce8e6.frank.peters@comcast.net> In-Reply-To: References: <20110630174530.9bcbcd47.frank.peters@comcast.net> <20110630200424.0d6d49ef.frank.peters@comcast.net> <20110630212321.ad403843.frank.peters@comcast.net> X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; x86_64-unknown-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@lists.gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: 75eabc7fac48ce402ba2f22c43164621 On Thu, 30 Jun 2011 21:36:38 -0700 Mark Knecht wrote: > > I think it's completely appropriate for this list. This distro expects > that we put CFLAG options in make.conf so I need to hear about this > stuff even if I don't have to background to completely understand > what's really causing the problem. > In this case, or in the case of any program where "-fno-strict-aliasing" could make a difference, the maintainer of the program would include the option in the ebuild. The user would not have to worry too much about it. But yes, it is always good to know about the compiler flags. To see exactly what compile flags are being used in your programs, here is a neat method I picked up from somewhere. Just open a terminal and enter the following command: echo 'int main(){return 0;}' > test.c && gcc -v -Q $CFLAGS test.c -o test && rm test.c test In place of $CFLAGS just substitute any option of interest. There will be a flood of output, but just scroll back a few lines to find the "options passed:" and "options enabled:" sections. For example, using "-O2" for $CFLAGS indicates that "-fstrict-aliasing" is used, but it is not used with "-O1." It also shows that with "-O2" the option "-mno-sse4" is used, and so if you want to use SSE4 for certain programs (e.g. video, audio) you will need to specifically enable it. There may be an even slicker way to reveal the flags, but this is the only way I know. Frank Peters