Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
what does emerge -e world do?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
txykumat
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2014
Posts: 104

PostPosted: Tue Jan 27, 2015 6:14 pm    Post subject: what does emerge -e world do? Reply with quote

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...
Code:
 emerge -e world

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43186
Location: 56N 3W

PostPosted: Tue Jan 27, 2015 6:45 pm    Post subject: Reply with quote

txykumat,

Code:
emerge -e world
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
View user's profile Send private message
txykumat
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2014
Posts: 104

PostPosted: Wed Jan 28, 2015 12:44 am    Post subject: Reply with quote

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
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9234

PostPosted: Sat Jan 31, 2015 3:59 am    Post subject: Reply with quote

NeddySeagoon wrote:
txykumat,

Code:
emerge -e world
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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum