View previous topic :: View next topic |
Author |
Message |
Belliash Advocate
Joined: 24 Nov 2004 Posts: 2503 Location: Wroclaw, Poland
|
Posted: Tue Nov 21, 2006 1:26 pm Post subject: |
|
|
vipernicus wrote: | 4) -march=athlon64 uses -mfpmath=sse by default |
Are you sure about that?
Is there any list whre can i find which flags are enabled by -march=athlon64?
BTW What is better, --hash-style or -Bdirect? _________________ Asio Software Technologies
Belliash IT Weblog |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Tue Nov 21, 2006 2:15 pm Post subject: |
|
|
Morpheouss wrote: | vipernicus wrote: | 4) -march=athlon64 uses -mfpmath=sse by default |
Are you sure about that?
Is there any list whre can i find which flags are enabled by -march=athlon64?
BTW What is better, --hash-style or -Bdirect? |
http://gcc.gnu.org wrote: | k8, opteron, athlon64, athlon-fx
AMD K8 core based CPUs with x86-64 instruction set support. (This supersets MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW! and 64-bit instruction set extensions.)
-mfpmath=unit
`sse'
This is the default choice for the x86-64 compiler. |
They are two completely different things.
Decent article on the history of the two sets of patches.
http://lwn.net/Articles/192082/
--hash-style=gnu + prelink is equivalent to -hashvals + -Bdirect
The first of the two above is thought to be a better implementation than the second. --hash-style=gnu is actually a rewrite of -hashvals.
Check out cruzki's flags for some nice ultra optimized, but relatively stable CFLAGS. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Last edited by vipernicus on Tue Nov 21, 2006 2:27 pm; edited 1 time in total |
|
Back to top |
|
|
Belliash Advocate
Joined: 24 Nov 2004 Posts: 2503 Location: Wroclaw, Poland
|
Posted: Tue Nov 21, 2006 2:21 pm Post subject: |
|
|
i won't use prelink, ... it sucks...
What's better --as-needed -Bdirect or --as-needed --hash-style=both?
and why? _________________ Asio Software Technologies
Belliash IT Weblog |
|
Back to top |
|
|
f0rk Apprentice
Joined: 15 Nov 2004 Posts: 273 Location: Moscow
|
Posted: Tue Nov 21, 2006 2:26 pm Post subject: |
|
|
@Morpheouss
1) May be... But I also tried to emerge firefox with gcc 4.3.
SEG FAULT!
gcc-4.1.1-r2 with PIE patch is my default compiler again.
2) No. I didn't.
May be we should wait any RC versions?
@vipernicus:
What about CONRAD's flags? |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Tue Nov 21, 2006 2:33 pm Post subject: |
|
|
Morpheouss wrote: | i won't use prelink, ... it sucks...
What's better --as-needed -Bdirect or --as-needed --hash-style=both?
and why? |
Prelink is better than -Bdirect. And if it didn't break a certain model, it could preload dlopen as well. -Bdirect breaks this model, and that is why it is faster. If prelink broke the model, it would provide even more gains than -Bdirect. The latest versions of prelink support --hash-style=gnu.
Good references:
http://www.kdedevelopers.org/node/1661
http://www.kdedevelopers.org/node/1650#comment-4090
f0rk wrote: | What about CONRAD's flags? |
Heh, I actually gave those CFLAGS to cheater, and I was using them for a while, just playing around. Big size reductions, but I had some random instability. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Last edited by vipernicus on Tue Nov 21, 2006 2:46 pm; edited 2 times in total |
|
Back to top |
|
|
Belliash Advocate
Joined: 24 Nov 2004 Posts: 2503 Location: Wroclaw, Poland
|
|
Back to top |
|
|
f0rk Apprentice
Joined: 15 Nov 2004 Posts: 273 Location: Moscow
|
Posted: Tue Nov 21, 2006 3:16 pm Post subject: |
|
|
Ok, when I will have a lot of free time I 'll emerge it and test it... |
|
Back to top |
|
|
Conan Guru
Joined: 02 Nov 2004 Posts: 360
|
Posted: Tue Nov 21, 2006 3:41 pm Post subject: |
|
|
Morpheouss wrote: | f0rk: Could you try GCC 4.2.0?
I'll try 4.3.0... maybe it's pc-orinted problem? flag-oriented? or ... |
And people like you are why gentoo gets a bad name. |
|
Back to top |
|
|
Belliash Advocate
Joined: 24 Nov 2004 Posts: 2503 Location: Wroclaw, Poland
|
|
Back to top |
|
|
Conan Guru
Joined: 02 Nov 2004 Posts: 360
|
Posted: Tue Nov 21, 2006 3:56 pm Post subject: |
|
|
If you play with fire you are going to get burned.
... especially if you are playing with fire while naked.
p.s. only one of us has bad "enhlish" here and I don't believe it is me. |
|
Back to top |
|
|
Belliash Advocate
Joined: 24 Nov 2004 Posts: 2503 Location: Wroclaw, Poland
|
|
Back to top |
|
|
cruzki Tux's lil' helper
Joined: 13 Dec 2005 Posts: 137
|
Posted: Tue Nov 21, 2006 5:22 pm Post subject: |
|
|
please don't flame this post, until now it has been very interesting post about cflags and gcc options |
|
Back to top |
|
|
Belliash Advocate
Joined: 24 Nov 2004 Posts: 2503 Location: Wroclaw, Poland
|
Posted: Tue Nov 21, 2006 5:24 pm Post subject: |
|
|
cruzki wrote: | please don't flame this post, until now it has been very interesting post about cflags and gcc options |
a little OT _________________ Asio Software Technologies
Belliash IT Weblog |
|
Back to top |
|
|
nirax Guru
Joined: 06 Jul 2004 Posts: 319 Location: Germany, old Europe
|
Posted: Tue Nov 21, 2006 6:10 pm Post subject: |
|
|
vipernicus wrote: |
My recommendations:
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -fno-ident"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,now -Wl,--hash-style=gnu"
And in many situations -Os might be better than -O2. |
AFAIS -fomit-frame-pointer is already covered by -O2
Code: |
-fomit-frame-pointer
Don't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also makes an extra register available in many functions. It also makes debugging impossible on some machines.
On some machines, such as the VAX, this flag has no effect, because the standard calling sequence automatically handles the frame pointer and nothing is saved by pretending it doesn't exist. The machine-description macro FRAME_POINTER_REQUIRED controls whether a target machine supports this flag. See Register Usage.
Enabled at levels -O, -O2, -O3, -Os.
|
and last time i checked --as-needed had still issues _________________ quot licet iovi non licet bovi |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Tue Nov 21, 2006 6:58 pm Post subject: |
|
|
nirax wrote: | AFAIS -fomit-frame-pointer is already covered by -O2
Code: |
-fomit-frame-pointer
Don't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also makes an extra register available in many functions. It also makes debugging impossible on some machines.
On some machines, such as the VAX, this flag has no effect, because the standard calling sequence automatically handles the frame pointer and nothing is saved by pretending it doesn't exist. The machine-description macro FRAME_POINTER_REQUIRED controls whether a target machine supports this flag. See Register Usage.
Enabled at levels -O, -O2, -O3, -Os.
|
and last time i checked --as-needed had still issues |
Hmm, I thought it was only enabled with -O2 on arch's where it doesn't make debugging impossible? In x86's case it should be disabled for that reason.
Problems with --as-needed are being fixed constantly. Presently with ~x86 I no longer have any build failures.
There is a Gentoo Linux Document on it, and also a Bug Tracker where most of the issues have been worked out. I will agree that conceptually, there could be issues, and that this flag is experimental. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
nirax Guru
Joined: 06 Jul 2004 Posts: 319 Location: Germany, old Europe
|
Posted: Tue Nov 21, 2006 7:46 pm Post subject: |
|
|
Quote: | Hmm, I thought it was only enabled with -O2 on arch's where it doesn't make debugging impossible? In x86's case it should be disabled for that reason. |
you are perfectly right. _________________ quot licet iovi non licet bovi |
|
Back to top |
|
|
zxy Veteran
Joined: 06 Jan 2006 Posts: 1160 Location: in bed in front of the computer
|
Posted: Fri Nov 24, 2006 1:49 am Post subject: |
|
|
I can't get it to compile with any of the use flag settings. Code: | sys-devel/gcc-4.3.0_alpha20061111 |
Code: | (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r3, 2.6.18-no2 x86_64) |
_________________ Nature does not hurry, yet everything is accomplished.
Lao Tzu
Last edited by zxy on Mon Nov 27, 2006 9:52 pm; edited 1 time in total |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sat Nov 25, 2006 10:53 pm Post subject: |
|
|
vipernicus, thanks for your wise and informed comments. You just about managed to prevent this thread from veering off the rails into the paddy fields and killing a bunch of ricers.
You corrected a couple of misconceptions I had about certain flags.
Thanks.
nirax, just coincidence? _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
cruzki Tux's lil' helper
Joined: 13 Dec 2005 Posts: 137
|
Posted: Sat Nov 25, 2006 11:53 pm Post subject: |
|
|
now i'm in the process of recompiling world with gcc-4.2. Until now thera are 3 packages that don't compile: arts, eix and perl. and I had issues with mkvtoolnix and amarok (they show me this error
mkvmerge: /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/"something" )
Tomorrow more |
|
Back to top |
|
|
Belliash Advocate
Joined: 24 Nov 2004 Posts: 2503 Location: Wroclaw, Poland
|
Posted: Sun Nov 26, 2006 12:20 pm Post subject: |
|
|
i've heard GCC 4.2.0 is just a little bit faster than 4.1.1 and it's not remunerative to use it...
I also heared that GCC 4.3.0 is much mure faster, but theres too much troubles to use it as main compiler... (eg glibc won't compile)...
So i think we have to wait for GCC 4.3.0 _________________ Asio Software Technologies
Belliash IT Weblog |
|
Back to top |
|
|
Inventore1 n00b
Joined: 24 Mar 2005 Posts: 24 Location: Rovereto (TN)
|
Posted: Mon Nov 27, 2006 4:32 pm Post subject: |
|
|
i'm trying to install a fresh gentoo using gcc 4.3 and, for now the only packages that have failed to compile are sys-libs/timezone-data and net-misc/rsync. _________________ Inventore1 |
|
Back to top |
|
|
Belliash Advocate
Joined: 24 Nov 2004 Posts: 2503 Location: Wroclaw, Poland
|
Posted: Mon Nov 27, 2006 4:34 pm Post subject: |
|
|
Inventore1 wrote: | i'm trying to install a fresh gentoo using gcc 4.3 and, for now the only packages that have failed to compile are sys-libs/timezone-data and net-misc/rsync. |
I have also tried to compile fresh installation, ... and it was unable to build glibc 2.5 _________________ Asio Software Technologies
Belliash IT Weblog |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
|
Back to top |
|
|
energyman76b Advocate
Joined: 26 Mar 2003 Posts: 2048 Location: Germany
|
Posted: Tue Nov 28, 2006 12:29 am Post subject: |
|
|
Morpheouss wrote: | @vipernicus:
4) -mfpmath=sse,387 slows down on alder AMD CPUs. AMD's SSE implementation was terrible... I know, that, i had Athlon XP t-bird. But it speeds up on Intel's CPUS and on K8. 387 is old, and slow FPU. This flag forces it to use newer and better SSE... If some package cannot use SSE, then it uses 387.
|
sse,387 is the second most stupid thing you can do on the AMD64 platform. mfpmath=sse is default and 387 is slow. Even the manpage from gcc tells you not to use that flag. It hurts, it really really hurts. Don't do it and remove mfpmath altogether. All apps use sse on the amd64, because that is the floating point engine of the amd64. It can not not use sse. If it can't go with it, it is broken, and won't run anyway. So remove that stupid flag. It is almost as worse as ffast-math. Everytime somebody uses ffast-math a part of his soul dies. _________________ Study finds stunning lack of racial, gender, and economic diversity among middle-class white males
I identify as a dirty penismensch. |
|
Back to top |
|
|
piwacet Guru
Joined: 30 Dec 2004 Posts: 486
|
Posted: Tue Nov 28, 2006 2:31 am Post subject: |
|
|
Didn't 4.2 recently branch from mainline? Would there be that much difference yet? |
|
Back to top |
|
|
|