View previous topic :: View next topic |
Author |
Message |
txykumat Tux's lil' helper
Joined: 24 Nov 2014 Posts: 104
|
Posted: Tue Jan 27, 2015 6:14 pm Post subject: what does emerge -e world do? |
|
|
If I changed CFLAGS, do I have to rebuild everything/programs/binaries in my system because the binary files compiled under different CFLAGS are incompatible ? i.e., issue a command like...
I saw Intel suggestions about optimization here:
https://software.intel.com/en-us/blogs/2012/09/26/gcc-x86-performance-hints
I am going to change my CFLAGS to -m64 -Ofast -flto -march=haswell -funroll-loops
This is my current make.conf file
Code: | # These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-march=core-avx2 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="-systemd X kde opengl qt4 qt3support hal dbus udev udisks policykit alsa bindist mmx sse sse2"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
MAKEOPTS="-j5"
GRUB_PLATFORMS="efi-64"
VIDEO_CARDS="intel i965"
INPUT_DEVICES="genevdev"
GENTOO_MIRRORS="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
|
Last time when I was having compilation problem I did emerge -e world and it compiled about 400 stuff. After that I noticed /usr/src/liux was none-existing kernel dir |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54232 Location: 56N 3W
|
Posted: Tue Jan 27, 2015 6:45 pm Post subject: |
|
|
txykumat,
rebuilds all the packages listed in your world file and all the packages they depend on ... and so on.
Changing CFLAGS does not make packages incompatible, so there is no need to rebuild anything when you change them, unless you want to.
-flto is a bad idea on <=gcc-4.9.2 It breaks a lot of packages. gcc-4.92 isn't perfect either.
You probably don't want -Ofast and -funroll-loops either.
-m64 is also a bad idea on a multilib install.
You want -pipe too, so that RAM is used to pass intermediate files between gcc passes
Whats wrong with -march=native -O2 -pipe ?
Your link says " Quote: | -Ofast" same as "-O3 -ffast-math" | -O3 is known to break things and slow things down. -ffast-math is known to break things too.
The -O3 slowdown arises because -O3 will make the binary code bigger in an attempt to make it execute faster.
Thats OK while it fits in to the CPU cache. When it doesn't, you get cache misses and additional fetches from wuch slower main memory.
The bigger working set size means that task switching will displace more cached data, so you need fewer concurrent processes to cause cache thrashing.
The warning sign at the bottom of the article Quote: | Please note that all numbers in the article are the result of forecast based on certain set of benchmarks. | should have caught your attention.
You need to be aware that being fast at running benchmarks tells you that you are good at running benchmarks. It may say very little about real word performance unless your workload closely resembles te benchmark.
-ffast-math should be set only on applications where it is known to be safe. It can give you incorrect floating point results. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
txykumat Tux's lil' helper
Joined: 24 Nov 2014 Posts: 104
|
Posted: Wed Jan 28, 2015 12:44 am Post subject: |
|
|
Thank you so much for your wisdom and taking time to explain things to a newbie. I was looking into things because people thought that for the laptop I have, I spent way too much time compiling things; now I know it was because of weird CFLAGS and other silly settings that caused it. Until recently I did not know that my MAKEOPTS='-j5" instead of "-j9". I noticed my computer seems to pause and think a lot instead of chugging through the code. I shalt go back to standard CFLAGS and enjoy the good balance of safety and optimization. |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Sat Jan 31, 2015 3:59 am Post subject: |
|
|
NeddySeagoon wrote: | txykumat,
rebuilds all the packages listed in your world file and all the packages they depend on ... and so on. | The semantics of @world changed some time ago such that the world file actually maps to @selected while @world maps to the entire installed set of packages. |
|
Back to top |
|
|
|