1 |
nightmorph 07/07/29 06:58:08 |
2 |
|
3 |
Modified: gcc-optimization.xml |
4 |
Log: |
5 |
changed Os stuff and backtraces, bug 186891 |
6 |
|
7 |
Revision Changes Path |
8 |
1.7 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.7&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/gcc-optimization.xml?rev=1.7&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/gcc-optimization.xml?r1=1.6&r2=1.7 |
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.6 |
18 |
retrieving revision 1.7 |
19 |
diff -u -r1.6 -r1.7 |
20 |
--- gcc-optimization.xml 27 Jul 2007 17:34:45 -0000 1.6 |
21 |
+++ gcc-optimization.xml 29 Jul 2007 06:58:08 -0000 1.7 |
22 |
@@ -1,6 +1,6 @@ |
23 |
<?xml version='1.0' encoding='UTF-8'?> |
24 |
|
25 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-optimization.xml,v 1.6 2007/07/27 17:34:45 nightmorph Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-optimization.xml,v 1.7 2007/07/29 06:58:08 nightmorph Exp $ --> |
27 |
|
28 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
29 |
|
30 |
@@ -22,8 +22,8 @@ |
31 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
32 |
<license/> |
33 |
|
34 |
-<version>1.3</version> |
35 |
-<date>2007-07-27</date> |
36 |
+<version>1.4</version> |
37 |
+<date>2007-07-28</date> |
38 |
|
39 |
<chapter> |
40 |
<title>Introduction</title> |
41 |
@@ -271,11 +271,10 @@ |
42 |
</li> |
43 |
<li> |
44 |
<c>-O2</c>: A step up from <c>-O1</c>. This is the <e>recommended</e> level |
45 |
- of optimization unless you have special needs (such as <c>-Os</c>, as will |
46 |
- be explained shortly). <c>-O2</c> will activate a few more flags in addition |
47 |
- to the ones activated by <c>-O1</c>. With <c>-O2</c>, the compiler will |
48 |
- attempt to increase code performance without compromising on size, and |
49 |
- without taking too much compilation time. |
50 |
+ of optimization unless you have special needs. <c>-O2</c> will activate a |
51 |
+ few more flags in addition to the ones activated by <c>-O1</c>. With |
52 |
+ <c>-O2</c>, the compiler will attempt to increase code performance without |
53 |
+ compromising on size, and without taking too much compilation time. |
54 |
</li> |
55 |
<li> |
56 |
<c>-O3</c>: This is the highest level of optimization possible, and also the |
57 |
@@ -292,9 +291,11 @@ |
58 |
</li> |
59 |
<li> |
60 |
<c>-Os</c>: This level will optimize your code for size. It activates all |
61 |
- <c>-O2</c> options that don't increase the size of the generated code. It's |
62 |
- useful for machines that have extremely limited disk storage space and/or |
63 |
- have CPUs with small cache sizes. |
64 |
+ <c>-O2</c> options that don't increase the size of the generated code. It |
65 |
+ can be useful for machines that have extremely limited disk storage space |
66 |
+ and/or have CPUs with small cache sizes. However, it can cause quite a few |
67 |
+ problems, which is why it is filtered out by many of the ebuilds in the |
68 |
+ tree. Using <c>-Os</c> is not recommended. |
69 |
</li> |
70 |
</ul> |
71 |
|
72 |
@@ -302,8 +303,8 @@ |
73 |
As previously mentioned, <c>-O2</c> is the recommended optimization level. If |
74 |
package compilations error out, check to make sure that you aren't using |
75 |
<c>-O3</c>. As a fallback option, try setting your CFLAGS and CXXFLAGS to a |
76 |
-lower optimization level, such as <c>-O1</c> or <c>-Os</c> and recompile the |
77 |
-package. |
78 |
+lower optimization level, such as <c>-O1</c> or even <c>-O0 -g2 -ggdb</c> (for |
79 |
+error reporting and checking for possible problems) and recompile the package. |
80 |
</p> |
81 |
|
82 |
</body> |
83 |
@@ -338,10 +339,11 @@ |
84 |
<p> |
85 |
In particular, it makes troubleshooting applications written in Java much |
86 |
harder, though Java is not the only code affected by using this flag. So while |
87 |
-the flag can help, it can also make debugging harder. If you don't plan to do |
88 |
-much debugging and haven't added any other debugging-related CFLAGS such as |
89 |
-<c>-ggdb</c> (and you aren't installing packages with the <c>debug</c> USE |
90 |
-flag), then try using <c>-fomit-frame-pointer</c>. |
91 |
+the flag can help, it also makes debugging harder; backtraces will be useless. |
92 |
+However, if you don't plan to do much debugging and haven't added any other |
93 |
+debugging-related CFLAGS such as <c>-ggdb</c> (and you aren't installing |
94 |
+packages with the <c>debug</c> USE flag), then try using |
95 |
+<c>-fomit-frame-pointer</c>. |
96 |
</p> |
97 |
|
98 |
<impo> |
99 |
|
100 |
|
101 |
|
102 |
-- |
103 |
gentoo-doc-cvs@g.o mailing list |