Sandro Posted July 5, 2014 Report Share Posted July 5, 2014 Hello everyone; I was wondering what differences there may be between in make.conf CFLAGS="-march=native -O2 -pipe -mfpmath=sse" CXXFLAGS="-march=native -O2 -pipe -mfpmath=sse" FFLAGS="-march=native -O2 -pipe -mfpmath=sse" FCFLAGS="-march=native -O2 -pipe -mfpmath=sse" And: CFLAGS="${CFLAGS} -march=native -O2 -pipe -mfpmath=sse" CXXFLAGS="$(CXXFLAGS} -march=native -O2 -pipe -mfpmath=sse" FFLAGS="${FFLAGS} -march=native -O2 -pipe -mfpmath=sse" FCFLAGS="${FCFLAGS} -march=native -O2 -pipe -mfpmath=sse" That is, and please forgive my ignorance, if using eg CFLAGS="xyz" override CFLAGS or their are adding as the default CFLAGS. Because in that case it would be useless to declare CFLAGS = "${CFLAGS} xyz" Please forgive my ignorance. :( I just want to understand "meticulously" and in every detail this system :) Link to comment Share on other sites More sharing options...
Sandro Posted July 5, 2014 Author Report Share Posted July 5, 2014 Ok, it is the same except for LDFLAGS . If there are more information, Thank You. Link to comment Share on other sites More sharing options...
Funtoo Linux BDFL drobbins Posted July 6, 2014 Funtoo Linux BDFL Report Share Posted July 6, 2014 Sure, here's the info. The way the variables in /etc/make.conf are "merged" into the defaults in the profile is a fairly complex process, but... There is really no difference for the *FLAGS, since there is only a very generic default. You want to make sure you use the FOO="${FOO} blah" format when you have lines earlier in the same file that define FOO. If you do not, they you will overwrite your earlier settings. If you use FOO="${FOO} blah", then you will *add* blah to your existing settings you defined earlier in the same file. How variables are handled in /etc/make.conf is interesting -- there are two types of variables. Regular variables, and "incrementals". The incrementals are: "USE", "USE_EXPAND", "USE_EXPAND_HIDDEN", "FEATURES", "ACCEPT_KEYWORDS", "CONFIG_PROTECT_MASK", "CONFIG_PROTECT", "IUSE_IMPLICIT", "PRELINK_PATH", "PRELINK_PATH_MASK", "PROFILE_ONLY_VARIABLES", "USE_EXPAND_IMPLICIT", "USE_EXPAND_UNPREFIXED" The most common incremental is USE. What makes use incremental? "Incremental" means that if you set this in /etc/make.conf: USE="foo" ... then "foo" will be *added* to your existing USE setting. This makes it incremental. To totally wipe your USE, you must do: USE="-* foo" If something is NOT an incremental, then you can wipe the variable by going: FOO="bar" and to preserve existing settings for non-incremental, if there are any, you must do: FOO="${FOO} bar" CFLAGS, etc. are non-incremental, but there are just basic defaults of typically "-O2 -pipe", so generally people just override. -Daniel Link to comment Share on other sites More sharing options...
Sandro Posted July 6, 2014 Author Report Share Posted July 6, 2014 In efect using: CFLAGS="-${CFLAGS} -march=native -O2 -pipe -mfpmath=sse" CXXFLAGS="${CXXFLAGS} -march=native -O2 -pipe -mfpmath=sse" FFLAGS="${FFLAGS} -march=native -O2 -pipe -mfpmath=sse" FCFLAGS="${FCFLAGS} -march=native -O2 -pipe -mfpmath=sse" LDFLAGS="${LDFLAGS} -Wl,--hash-style=gnu" i obtain CFLAGS="--O2 -pipe -march=native -O2 -pipe -mfpmath=sse" CXXFLAGS="-O2 -pipe -march=native -O2 -pipe -mfpmath=sse" FFLAGS=" -march=native -O2 -pipe -mfpmath=sse" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,--hash-style=gnu" Using instead: [code] Ci7Ht ~ # grep FLAGS /etc/make.conf CFLAGS="-march=native -O2 -pipe -mfpmath=sse" CXXFLAGS="-march=native -O2 -pipe -mfpmath=sse" FFLAGS="-march=native -O2 -pipe -mfpmath=sse" FCFLAGS="-march=native -O2 -pipe -mfpmath=sse" LDFLAGS="-Wl,--hash-style=gnu" [/code] then : Ci7Ht ~ # emerge --info|grep FLAGS CFLAGS="-march=native -O2 -pipe -mfpmath=sse" CXXFLAGS="-march=native -O2 -pipe -mfpmath=sse" FFLAGS="-march=native -O2 -pipe -mfpmath=sse" LDFLAGS="-Wl,--hash-style=gnu" [/code] Then it s3eems thata may be use "incremental/append" about LDFLAGS. Cause in other situations informations are "redundant" Thank You Great Daniel !!! :) Link to comment Share on other sites More sharing options...
Recommended Posts