You are not logged in.
Pages: 1
how would I optimize the build with makepkg? I was told that there was the -O3 option for gcc, but how can this be used in a pkgbuild?
What do these optimization flags gain me anyways?
Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.
Offline
You can add that option to the CCFLAGS in makepkg.conf. But I do not recommend that.
Offline
why don't you recommend it?
Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.
Offline
how would I optimize the build with makepkg? I was told that there was the -O3 option for gcc, but how can this be used in a pkgbuild?
Probably in /etc/makepkg.conf, by changing the CFLAGS/CXXFLAGS variables. You can also override any of those variables by defining your own in ~/.makepkg.conf (~ is your home directory).
What do these optimization flags gain me anyways?
There is a great optimization guide in Gentoo's documentation that explains the most common GCC flags.
Last edited by foutrelis (2009-04-20 16:16:18)
Offline
why don't you recommend it?
-O3 sometimes causes problems, and IMHO the speed gain is not worth it.
Offline
-03:
- Produces larger binaries that use more memory, more CPU cache misses.
- More likely to break programs.
- Takes more time to compile.
- Insignificant gain, if any.
Last edited by Wintervenom (2009-04-20 18:44:00)
Offline
are there any optimization options that are worth using?
Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.
Offline
would it be better if only -march was used and not -mtune as well?
Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.
Offline
-march=native -O2 -pipe is fine for just about everyone. It will automatically choose the best optimizations for the processor you have in your machine.
Last edited by Wintervenom (2009-04-20 20:57:50)
Offline
I have this
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.
Offline
So you'd want:
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="$CFLAGS"
Offline
So you'd want:
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="$CFLAGS"
Is it better to leave everything to autodetection instead of setting explicitly the optimal settings for your processor model? - the ones given in here i mean
Last edited by Xi0N (2009-04-20 22:02:50)
Offline
Or you can add LDFLAGS with makepkg-git as such:
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
LDFLAGS="-Wl,-O1,--as-needed,--hash-style=gnu"
Arch Linux + sway
Debian Testing + GNOME/sway
NetBSD 64-bit + Xfce
Offline
You can just add the LDFLAGS to you CFLAGS line so you dont need makepkg-git. LDFLAGS improve things imo more than playing around with CFLAGS.
I myself use only -march=native -Os -pipe -fomit-frame-pointer -Wl,O1,--as-needed,--hash-style=gnu,--sort-common -s
hash-style=gnu is there because by default it's hash-style=both which I dont need. Even when the gnu hash style was considered unstable I never had any problems with it.
Offline
I have a serious question
Do the optimization strings in makepkg.conf influence when building with cmake? because I don't see any strings with "-march=native....".
For example when building kde.
ArchLinux x86-64 KDE 4.3 Beta
Offline
Yes, they should. Try cmake VERBOSE=1 this should give you much more output.
Offline
oh, thank you
I set -DCMAKE_VERBOSE_MAKEFILE=ON, and I can see them now! (lines i mean)
ArchLinux x86-64 KDE 4.3 Beta
Offline
Or you can add LDFLAGS with makepkg-git as such:
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
LDFLAGS="-Wl,-O1,--as-needed,--hash-style=gnu"
LDFLAGS=" " works just fine with recent makepkg, when added to makepkg.conf
Proud ex-maintainer of firefox-pgo
Offline
Pages: 1