Gentoo Archives: gentoo-doc-cvs

From: "Joshua Saddler (nightmorph)" <nightmorph@g.o>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] gentoo commit in xml/htdocs/doc/en: gcc-optimization.xml
Date: Sun, 19 Jul 2009 02:05:12
Message-Id: E1MSLm0-0002I5-MM@stork.gentoo.org
1 nightmorph 09/07/19 02:05:08
2
3 Modified: gcc-optimization.xml
4 Log:
5 add some information about -march=native
6
7 Revision Changes Path
8 1.16 xml/htdocs/doc/en/gcc-optimization.xml
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/gcc-optimization.xml?rev=1.16&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/gcc-optimization.xml?rev=1.16&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/gcc-optimization.xml?r1=1.15&r2=1.16
13
14 Index: gcc-optimization.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-optimization.xml,v
17 retrieving revision 1.15
18 retrieving revision 1.16
19 diff -u -r1.15 -r1.16
20 --- gcc-optimization.xml 26 Jun 2009 03:33:21 -0000 1.15
21 +++ gcc-optimization.xml 19 Jul 2009 02:05:08 -0000 1.16
22 @@ -1,6 +1,6 @@
23 <?xml version='1.0' encoding='UTF-8'?>
24 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
25 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-optimization.xml,v 1.15 2009/06/26 03:33:21 nightmorph Exp $ -->
26 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-optimization.xml,v 1.16 2009/07/19 02:05:08 nightmorph Exp $ -->
27
28 <guide link="/doc/en/gcc-optimization.xml">
29 <title>Compilation Optimization Guide</title>
30 @@ -19,8 +19,8 @@
31 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
32 <license/>
33
34 -<version>1.10</version>
35 -<date>2009-06-25</date>
36 +<version>1.11</version>
37 +<date>2009-07-18</date>
38
39 <chapter>
40 <title>Introduction</title>
41 @@ -195,6 +195,21 @@
42 CXXFLAGS="${CFLAGS}"
43 </pre>
44
45 +<p>
46 +If you still aren't sure what kind of CPU you have, you may just want to use
47 +<c>-march=native</c>. When this flag is used, GCC will detect your processor and
48 +automatically set appropriate flags for it. <brite>However, this should not be
49 +used if you intend to compile packages for a different CPU!</brite>
50 +</p>
51 +
52 +<p>
53 +So if you're compiling packages on one computer, but intend to run them on a
54 +different computer (such as when using a fast computer to build for an older,
55 +slower machine), then <e>do not</e> use <c>-march=native</c>. "Native" means
56 +that the code produced will run <e>only</e> on that type of CPU. The
57 +applications built with <c>-march=native</c> on an AMD Athlon 64 CPU will not be
58 +able to run on an old VIA C3 CPU.
59 +</p>
60
61 <p>
62 Also available are the <c>-mtune</c> and <c>-mcpu</c> flags. These flags are