View previous topic :: View next topic |
Author |
Message |
RobertDavid Apprentice
Joined: 08 Aug 2005 Posts: 271 Location: Czech Republic
|
Posted: Sun Mar 05, 2006 12:32 am Post subject: GLIBC + CFLAG -Os |
|
|
Ãs it possible to compile glibc with -Os optimalization?? I have -Os set up but glibc allways compile -O2... My reason is that I have notebook P3 600 with slow hdd,,
Or what are the best cflags for glibc to have small size (and enough optimized)... _________________ Arch & Fluxbox & 2.6.24-rc-zen!!!!
robertek.brevnov.net |
|
Back to top |
|
|
kfiaciarka Veteran
Joined: 20 May 2005 Posts: 1498 Location: Dobre Miasto, Poland
|
Posted: Sun Mar 12, 2006 4:46 am Post subject: |
|
|
Yes it is possible. My glibc is compliled with -Os flag and works fine. Glibc is essential for gentoo so simple cflags are better |
|
Back to top |
|
|
alex6z Tux's lil' helper
Joined: 20 Jul 2005 Posts: 119
|
Posted: Sun Mar 12, 2006 5:01 am Post subject: |
|
|
glibc will refuse to build with -O0. maybe it's a protection to prevent it from failing. |
|
Back to top |
|
|
Dr.Black.85 n00b
Joined: 19 Dec 2005 Posts: 55 Location: Czech Republic
|
Posted: Sun Mar 12, 2006 12:58 pm Post subject: |
|
|
If you're taling about -O optimization flag, could you tell me if -O3 is stable? Since I will have a new computer will a large hdd so I don't care that much about size.
And btw, would these setting in CFLAGS be correct for an A64 3800+ Manchaster dualcore for x86?
-mcpu=athlon-xp -msse2 -msse3 -O3 -pipe -fomit-frame-pointer
Oops: this one:
-march=athlon-xp -msse2 -msse3 -O3 -pipe -fomit-frame-pointer _________________ How will you notice that you spend too much time programming?
When you're surprised that your document writer isn't marking lines unfinished by semicolon with "cannot find symbol" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54402 Location: 56N 3W
|
Posted: Sun Mar 12, 2006 1:07 pm Post subject: |
|
|
Dr.Black.85,
I have all ~x86 and -O3 all I can say is worksforme.
Most ebuilds that break with -O3 will filter it out, so it won't be used.
You may want to fiddle with your MAKEOPTS="-j2" setting in /etc/make.conf. You may find that higher numbers allow shorter elapsed times for compiles. It sets the numbr of makes that run concurrently. Too high a number will lead to slow downs. Trial and error is harmless. Again, its filtered for things that parallel makes break. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Dr.Black.85 n00b
Joined: 19 Dec 2005 Posts: 55 Location: Czech Republic
|
Posted: Sun Mar 12, 2006 1:13 pm Post subject: |
|
|
NeddySeagoon wrote: | I have all ~x86 and -O3 all I can say is worksforme.
Most ebuilds that break with -O3 will filter it out, so it won't be used. |
So if I understand it correctly -O3 is safe for all x86 tested packages? I plan to use 32bit environment instead of AMD64 because for my use it won't be an advantage at the time.
I guess makeopts="j3" would do the job, but it's only a "guess". _________________ How will you notice that you spend too much time programming?
When you're surprised that your document writer isn't marking lines unfinished by semicolon with "cannot find symbol" |
|
Back to top |
|
|
RobertDavid Apprentice
Joined: 08 Aug 2005 Posts: 271 Location: Czech Republic
|
Posted: Sun Mar 12, 2006 1:54 pm Post subject: |
|
|
kfiaciarka: are you realy know that your glibc compiles -Os???? because I have -Os set up but only some packages compiles Os,
Packages that doesnt compile Os but O2
1) gcc
2) glibc
3) firefox (I just repair that in eclass)
4) maybe libstdc++ (dont remember)
Does -Os break gcc and glibc, when they have set up internaly to compile O2???
I think that glibc is one of the most used packages so on slow HDD and older CPU with less cache is good to have it -Os... _________________ Arch & Fluxbox & 2.6.24-rc-zen!!!!
robertek.brevnov.net |
|
Back to top |
|
|
alex6z Tux's lil' helper
Joined: 20 Jul 2005 Posts: 119
|
Posted: Sun Mar 12, 2006 2:05 pm Post subject: |
|
|
glibc is only a little over 1MB when loaded into memory if I remember right.
b7e0c000-b7f0f000 r-xp 00000000 03:06 712178 /lib/libc-2.3.5.so
b7f0f000-b7f10000 r--p 00102000 03:06 712178 /lib/libc-2.3.5.so
b7f10000-b7f13000 rw-p 00103000 03:06 712178 /lib/libc-2.3.5.so
Looks like the executable portion is about 0x00100000 bytes long. |
|
Back to top |
|
|
thechris Veteran
Joined: 12 Oct 2003 Posts: 1203
|
Posted: Mon Mar 13, 2006 8:58 am Post subject: |
|
|
Dr.Black.85 wrote: | If you're taling about -O optimization flag, could you tell me if -O3 is stable? Since I will have a new computer will a large hdd so I don't care that much about size.
And btw, would these setting in CFLAGS be correct for an A64 3800+ Manchaster dualcore for x86?
-mcpu=athlon-xp -msse2 -msse3 -O3 -pipe -fomit-frame-pointer
Oops: this one:
-march=athlon-xp -msse2 -msse3 -O3 -pipe -fomit-frame-pointer |
there is a -march=k8 that works in either 32bit or 64bit gcc. the compiler will know which one makes sense from your CHOST.
with enough ram, glibc will be read to ram once. if glibc is used often, it'll stay in a page in ram and never see the disk again. if glibc isn't used much, then let it stay on the disk.
as for asking glibc to reside fully in cache, its possible but unlikely. and i'd rather have things aligned so as not to be split across cache lines. _________________ HW problems. It's a VIA thing. |
|
Back to top |
|
|
Dr.Black.85 n00b
Joined: 19 Dec 2005 Posts: 55 Location: Czech Republic
|
Posted: Mon Mar 13, 2006 9:26 am Post subject: |
|
|
thechris wrote: | there is a -march=k8 that works in either 32bit or 64bit gcc. the compiler will know which one makes sense from your CHOST. |
Thanks. So using -march=k8 and CHOST="i686-pc-linux-gnu" would do it. Am I correct? I just want to be absolutetly sure of what I'm going to do today. I'll use the 2006.0x86 minimal CD so I guess that it even won't be possible to install in 64bit _________________ How will you notice that you spend too much time programming?
When you're surprised that your document writer isn't marking lines unfinished by semicolon with "cannot find symbol" |
|
Back to top |
|
|
|