Richard Fish wrote:

> Gcc is (almost) always built with -O2 on Gentoo, but it does not
> matter anyway.  The CFLAGS that gcc is built with does not effect the
> binaries it generates...only the code and the flags passed to gcc
> during the compilation effect this.  If your model were correct, you
> would need a gcc built with -Os for using -Os, a gcc built with "-Os
> -fweb" for building with "-Os -fweb", "-O3" for building with -O3,
> "-O3 -mmx" for ... and so on.
> 
> Think about this for a second.  What you are claiming here is that the
> output of this bash script can depend upon what CFLAGS bash was built
> with:
> 
> #!/bin/bash
> echo -e "\x48\x65\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21"
> 
> Admittedly a compiler is many orders of magnitude more complex than
> this, but functionally the same.  Only the code and the options passed
> to the compiler can effect its output.  Or to put another way, one
> could write a C compiler in java, C#, python, or even shell script
> that would support the exact same flags as gcc and generate the exact
> same code.  They would almost certainly be much, much slower, but the
> output would be the same.  It is identical in concept to changing the
> flags that _gcc_ is built with...the gcc program itself changes
> (hopefully gets faster), but the output remains the same.

I might be a newbie in terms of this list, but this is completely clear
to *me*.

Thanks anyway,
maybe this helps in getting this to the Howtos, the Wiki, etc.

Stefan
-- 
gentoo-user@gentoo.org mailing list

Reply via email to