Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-amd64
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-amd64@g.o
From: Frank Peters <frank.peters@...>
Subject: Re: Re: GCC-4.5.2 Has Serious Problems
Date: Fri, 1 Jul 2011 01:22:46 -0400
On Thu, 30 Jun 2011 21:36:38 -0700
Mark Knecht <markknecht@...> 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



References:
GCC-4.5.2 Has Serious Problems
-- Frank Peters
Re: GCC-4.5.2 Has Serious Problems
-- Nikos Chantziaras
Re: GCC-4.5.2 Has Serious Problems
-- Nikos Chantziaras
Re: Re: GCC-4.5.2 Has Serious Problems
-- Frank Peters
Re: GCC-4.5.2 Has Serious Problems
-- Nikos Chantziaras
Re: GCC-4.5.2 Has Serious Problems
-- Duncan
Re: Re: GCC-4.5.2 Has Serious Problems
-- Frank Peters
Re: Re: GCC-4.5.2 Has Serious Problems
-- Mark Knecht
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Re: GCC-4.5.2 Has Serious Problems
Next by thread:
Re: Re: GCC-4.5.2 Has Serious Problems
Previous by date:
Re: Re: GCC-4.5.2 Has Serious Problems
Next by date:
Re: eix-test-obsolete


Updated Jun 28, 2012

Summary: Archive of the gentoo-amd64 mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.