On Thu, Sep 07, 2006 at 10:32:33AM +0200, Anselm R. Garbe wrote:
> No, because CFLAGS might inherit totally retarded options from
> the host OS with your patch. Also, the -OXXX -march=XXXX options
> don't bring any real benefit. You shouldn't believe the FUD the
> gentoo people want to make you believe. The gcc optimizations
> are kind of a joke compared to other commercial C compilers.
> -Os is optimizing for size and the architecture is implicitely
> given by the compiler. If your userland is already builded for
> the athlon-xp architecture and your compiler toolchain is linked
> as well to athlon-xp architecture, you don't need to set any
> options in gcc. Just compare the binaries with -O3 and -O3
> -march=athlon-xp, I doubt you will see much or any difference in
> your environment. Apart from that, I doubt you will be able to
> measure any difference in resource usage, cpu execution time,
> and what not.
I did a small investigation:
/tmp $ uname -a
OpenBSD mmvi.10kloc.org 3.9 GENERIC#617 i386
/tmp $ gcc -v
Reading specs from
/usr/lib/gcc-lib/i386-unknown-openbsd3.9/3.3.5/specs
Configured with:
Thread model: single
gcc version 3.3.5 (propolice)
/tmp $ for i in dwm.O*; do md5 $i; done
MD5 (dwm.O3) = b28f0ea9c1d9f605816518fb40eeb08c
MD5 (dwm.O3.athlon-xp) = 1c3938a720ca7474654129ed6e61b716
MD5 (dwm.O3.i386) = b28f0ea9c1d9f605816518fb40eeb08c
MD5 (dwm.O3.i686) = 4dc18766728f4116a51533038ce7864d
MD5 (dwm.Os) = a89ccc4fdd1e75b9ed35c4ff028d9bbf
MD5 (dwm.Os.i386) = a89ccc4fdd1e75b9ed35c4ff028d9bbf
MD5 (dwm.Os.i686) = c2cb75100267c9bd8c0a9dd33cca4da8
/tmp $ ls -l dwm.O*
-rwxr-xr-x 1 arg arg 35332 Sep 7 10:39 dwm.O3
-rwxr-xr-x 1 arg arg 39428 Sep 7 10:39 dwm.O3.athlon-xp
-rwxr-xr-x 1 arg arg 35332 Sep 7 10:37 dwm.O3.i386
-rwxr-xr-x 1 arg arg 39428 Sep 7 10:38 dwm.O3.i686
-rwxr-xr-x 1 arg arg 31268 Sep 7 10:36 dwm.Os
-rwxr-xr-x 1 arg arg 31268 Sep 7 10:37 dwm.Os.i386
-rwxr-xr-x 1 arg arg 31268 Sep 7 10:37 dwm.Os.i686
As you see, if the toolchain is configured for i386, an explicit
-march has no effect. Only if the -march is different you get
different results.
Regards,
-- Anselm R. Garbe ><>< www.ebrag.de ><>< GPG key: 0D73F361Received on Thu Sep 07 2006 - 10:47:29 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:31:03 UTC