<br><br><div><span class="gmail_quote">2008/2/6, Duncan <<a href="mailto:1i5t5.duncan@..." target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">1i5t5.duncan@...</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Beso <<a href="mailto:givemesugarr@..." target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">givemesugarr@...</a>> posted<br><a href="mailto:d257c3560802060159q3a5b0334gd40b5d8b25aa348f@..." target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">d257c3560802060159q3a5b0334gd40b5d8b25aa348f@...</a>, excerpted<br>
below, on Wed, 06 Feb 2008 09:59:29 +0000:<br><br>>> CFLAGS="-march=athlon64 -O2 -pipe"<br>><br>><br>> i suggest this flags instead of yours usually they're a little more<br>> processor based and are not experimental ones as usually they say about<br>
> them:<br>> CFLAGS="-Os -march=k8 -mno-tls-direct-seg-refs -mmmx -msse3 -pipe<br>> -fomit-frame-pointer"<br><br>-fomit-frame-pointer is the default for -O and above on amd64/x86_64, as<br>it doesn't interfere with debugging here as it does on 32-bit x86, so<br>
omitting it saves on complexity without changing the compiled result. Of<br>course, it's still useful for 32-bit, but there's only a very few<br>programs that portage compiles as 32-bit on amd64 anyway (and even there,<br>
CFLAGS aren't really used except for sandbox, because gcc does its own<br>bootstrapping and glibc is considered critical enough it basically sets<br>its own very strict CFLAGS in the ebuild).</blockquote><div><br>i tend to always add it since i don't want to always look at what the arch would do later.<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">-Os I used to use, for reasons explained in detail in a post to the list<br>some time ago but briefly, cache size restrictions tend to matter more<br>
than pure cycle optimization on modern processors, so -Os generally made<br>more sense to me than -O2. However, with gcc-4.2, several optmizations<br>that used to be in -Os only, made it into -O2, and -O2 now includes a<br>
couple of cache optimizers that raw size optimization misses, so it's not<br>as critical, now. Given that -O2 tends to be the recommended for Gentoo<br>and more widely tested than -Os, I've therefore switched back to it.</blockquote>
<div><br>i tend to think that Os should be gentoo's default, since it adds some options for cache and disk occupation and since i've always been good with it.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-mmmx is included in the default for -march=k8, so that should be<br>superfluous. However, -msse3 is NOT included, as the original amd chips<br>didn't have it. Newer amd CPUs DO include sse3 (look for pni in the<br>
flags line(s) of /proc/cpuinfo), so unlike -mmmx it's worth specifying<br>-msse3 if your CPU has it.</blockquote><div><br>when i've added it it wasn't included by default. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What about -mno-tls-direct-seg-refs? Why do you use that? The gcc<br>manpage doesn't have enough info to convince me it's useful, and in fact,<br>implies the reverse, since it defaults glibc folks to using it, which<br>
implies a reason for that default. I'd therefore love to see a<br>discussion of the flag with enough information to justify a better<br>informed decision, as yours presumably is given your depth of knowledge<br>and activity on this list.</blockquote>
<div><br>this should help with virtualizazion apps. xen won't work well without it with large system memory. without xen or other virt apps this shouldn't influence much on the packages.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
FWIW, here's my CFLAGS. CXXFLAGS are similar, minus -combine (mentioned<br>below) and -freorder-blocks-and-partition (for similar reasons).<br>-combine and -ftree-vectorize still cause occasional problems, which I<br>
avoid on a case by case basis as I encounter them, with an appropriate<br>entry in /etc/portage/env/<cat>/<pkg>, but in general, these flags have<br>worked well for me for some time. I can explain why I use each one if<br>
anyone wants to know.<br><br>CFLAGS="-march=k8 -msse3 -O2 -pipe -frename-registers -fweb -ftree-<br>vectorize -freorder-blocks-and-partition -combine -fgcse-sm -fgcse-las -<br>fgcse-after-reload -fmerge-all-constants"<br>
<br>>> CXXFLAGS="-march=athlon64 -O2 -pipe"<br>><br>> this is the same and is faster to write and to have it updated.<br>> CXXFLAGS="${CFLAGS}"<br><br>The exception would be if your CFLAGS include things like -combine, which<br>
doesn't work so well on C++ so shouldn't be in CXXFLAGS. (For -combine<br>specifically, gcc ignores it in such cases, but spits a warning, which<br>various configure scripts interpret as a problem causing them to screwup,<br>
so it's best to leave it out of CXXFLAGS entirely.)<br><br>> also add:<br>> LDFLAGS="-Wl,--as-needed,-O1 -Wl,--enable-new-dtags -Wl,--sort-common<br>> -s"<br><br>Could you point me to documentation on LDFLAGS in general, or at least<br>
--enable-new-dtags and --sort-common? I use --as-needed already<br>( documentation at <a href="http://www.gentoo.org/proj/en/qa/asneeded.xml" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.gentoo.org/proj/en/qa/asneeded.xml</a> ), as<br>
well as -z,now (security thing as mentioned in portage's QA warnings if<br>
you have them enabled for setuid/setgid applications, but I find it<br>useful in general, and no, it doesn't simply counteract --as-needed), but<br>have yet to find a resource even close to as helpful for LDFLAGS in<br>
general as "man gcc" is for CFLAGS, so I'm left asking about them one at<br>a time as I see them, and I've not seen those yet. Again, a discussion<br>with enough info to make an informed decision would be invaluable! I<br>
don't even know what the options are at this point, and that's<br>frustrating!</blockquote><div><br><span class="postbody">--sort-common is to prevent gaps between symbols due to alignment constraints, presumably increasing efficiency layout.
<br>here's an interesting topic on ldflags: <a href="http://forums.gentoo.org/viewtopic-t-67777.html">http://forums.gentoo.org/viewtopic-t-67777.html</a><br><br></span><span class="postbody">--enable-new-dtags should be default for current binutils but it was there from my 3 years old make.conf so it is still there. adding it again shouldn't do harm.</span><br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">>> FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch<br>
>> sandbox sfperms strict unmerge-orphans userfetch"<br>
><br>> if you experience collision problems add collision-protect to the<br>> features. you should have some better protection between packages and<br>> should avoid packages from writing files owned by other packages. this<br>
> could provoke some more emerge errors than before because there are<br>> quite some packages that overwrite files<br><br>Agreed. It's worth mentioning COLLISION_IGNORE, which you can set in<br>make.conf to avoid specific known collisions, especially if they are<br>
known to be "safe", that is, something like icons or the like (using an<br>example from the recent KDE4-svn overlay work, upstream was changing them<br>fast enough to make it not worth filing bugs with Gentoo over), that it<br>
really doesn't matter if a couple of packages are fighting over.<br>Differing config files, OTOH, you probably want to know about!</blockquote><div><br>that's why i don't have it set. i only have set this:<br>
FEATURES="parallel-fetch ccache -strict -sandbox buildpkg"<br>i use -strict since i have a quite high live ebuilds use that sometimes require manual handling, and i've disabled sandbox since it pisses me off with some xorg ebuilds and ati-drivers. i've now switched to paludis which is faster or resolving deps for world and is more able to handle external overlays directly. though, it lacks pkging and for some packages i still use portage.<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">>> MAKEOPTS="-j3"<br>><br>><br>> set MAKEOPTS="-j3" to MAKEOPTS="-j5 -s ". if you experience compile<br>
> problem decrease the j number to 1.<br><br>Note that there are occasional parallel make issues with -jX, where X>1<br>or not existent (-j by itself indicates unlimited jobs). These don't<br>occur frequently at -j2 as it's so heavily used by Gentooers everywhere<br>
so those occurring there tend to have been eliminated already. However,<br>as the number of jobs increase, so does the likelihood of running into<br>parallel make issues. make errors indicating file or directory not found<br>
are the classic example, so any time you see one of those, try<br>MAKEOPTS=-j1 emerge <whatever> and you'll likely find it gone. If so,<br>file a bug with [parallel make] as well as the package name in the<br>
subject line (assuming there's not yet one filed), and help get it fixed!<br>
=8^)<br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">FWIW, I run MAKEOPTS="-j20 -l12" (up to 20 jobs, but don't start any more<br>
if the load is above 12) here. Dual-dual-core Opteron 290s, 8 gig RAM,<br>PORTAGE_TMPDIR pointing at a tmpfs so all those temp files don't hit<br>
disk. With PORTAGE_NICENESS=19, and with kernel 2.6.24's new per-user<br>scheduling turned on (and with Hz=300, voluntary preemption, so it's not<br>a special real-time kernel or anything by any stretch), I can still<br>
listen to streaming audio and even run a moderately sized visualization<br>window (amarok with the scrolling voice-print analyzer going in its own<br>window) without audio pause or undue jerkiness (there's a bit, but under<br>
a load of 3 per core and no real-time preemption, one might expect that)<br>of the visualization. If I'm feeling adventurous and don't have<br>anything else critical going on, I'll occasionally try -j by itself, just<br>
to see how high I can run the load average. A 400-500 load average is<br>doable with kernel compiles, for instance, and nicely entertaining! =8^)<br>It still amazes me how well the system copes with even that, and it was<br>
even more amazing back with dual-single-cores (242s)!</blockquote><div><br>yep, i'll try out it someday. for the moment i'm planning a disk change, mine has already 2 years and its overall health is starting to be heard when writing or reading data from the disk. i've got an external bigger disk that i'll partition with tmpfs for paludis and portage. the only thing that i still don't know is:<br>
1. can i put on more than one different tmpfs?!<br>2. if i put one tmpfs and symlink there what i do want to use on tmpfs is better?!<br></div><br></div>-- <br>dott. ing. beso
|