Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Anyone using GCC 4.6.x?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
kosik
n00b
n00b


Joined: 09 Nov 2007
Posts: 20
Location: 127.0.0.1

PostPosted: Sun Nov 06, 2011 9:18 am    Post subject: Reply with quote

I've been using 4.6.1 since just a few days after the ebuild was there. I have less trouble compiling or running stuff than ever before.

Yesterday I switched to 4.6.2 (which mostly was a bugfix release according to gcc.gnu.org) and as the ChangeLog stated, that -flto was usable for things like gcc itself or Firefox, I started to recompile several libs and important stuff. I see a lot of packages failing (pixman, xorg-server, ...) but much stuff works and doesn't make trouble (ffmpeg, vlc, mplayer, libpng, ...).

I'm using

Code:
LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,-s -Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,combreloc -Wl,-z,noexecstack -Wl,--check-sections -Wl,--hash-style=gnu
CPPFLAGS=-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize
CXXFLAGS=-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize
CFLAGS=-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize


to compile a 32bit install on a 64bit i7.

Regards,
Marc
Back to top
View user's profile Send private message
golagoda
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jun 2011
Posts: 105
Location: Australia

PostPosted: Sun Nov 06, 2011 1:02 pm    Post subject: Reply with quote

kosik wrote:
I've been using 4.6.1 since just a few days after the ebuild was there. I have less trouble compiling or running stuff than ever before.

Yesterday I switched to 4.6.2 (which mostly was a bugfix release according to gcc.gnu.org) and as the ChangeLog stated, that -flto was usable for things like gcc itself or Firefox, I started to recompile several libs and important stuff. I see a lot of packages failing (pixman, xorg-server, ...) but much stuff works and doesn't make trouble (ffmpeg, vlc, mplayer, libpng, ...).

I'm using

Code:
LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,-s -Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,combreloc -Wl,-z,noexecstack -Wl,--check-sections -Wl,--hash-style=gnu
CPPFLAGS=-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize
CXXFLAGS=-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize
CFLAGS=-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize


to compile a 32bit install on a 64bit i7.

Regards,
Marc

Why do you put '-mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2' in even though you already use march=corei7 and mtune=corei7? They already do that don't they?
Back to top
View user's profile Send private message
kosik
n00b
n00b


Joined: 09 Nov 2007
Posts: 20
Location: 127.0.0.1

PostPosted: Sun Nov 06, 2011 1:29 pm    Post subject: Reply with quote

golagoda wrote:
kosik wrote:
I've been using 4.6.1 since just a few days after the ebuild was there. I have less trouble compiling or running stuff than ever before.

Yesterday I switched to 4.6.2 (which mostly was a bugfix release according to gcc.gnu.org) and as the ChangeLog stated, that -flto was usable for things like gcc itself or Firefox, I started to recompile several libs and important stuff. I see a lot of packages failing (pixman, xorg-server, ...) but much stuff works and doesn't make trouble (ffmpeg, vlc, mplayer, libpng, ...).

I'm using

Code:
LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,-s -Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,combreloc -Wl,-z,noexecstack -Wl,--check-sections -Wl,--hash-style=gnu
CPPFLAGS=-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize
CXXFLAGS=-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize
CFLAGS=-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize


to compile a 32bit install on a 64bit i7.

Regards,
Marc

Why do you put '-mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2' in even though you already use march=corei7 and mtune=corei7? They already do that don't they?


I've just done that for completeness and 'ease'. Some packages like ie. media-plugins/caps-plugins or dev-lang/ocaml sometimes don't like some of these mmx flags and it's easier to comment them out once they're in the make.conf. I, moreover, generate the 'basic' basic flags by using

Code:
gcc -march=native -E -v - </dev/null 2>&1 | grep c1


and dynamically append the other stuff by mixing variables. It actually looks like this:
Code:

     11 __GCC_CURRENT="-march=corei7 -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune        =corei7"
     12 __GCC_COMMON="-funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization -ftracer -flto"
     13
     14  CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 ${__GCC_COMMON} -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math -ftree-vectorize"
     15 #CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 ${__GCC_COMMON} -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both -ffast-math"
     16 #CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 ${__GCC_COMMON} -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both             -ftree-vectorize"
     17 #CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 ${__GCC_COMMON} -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays -mfpmath=both"
     18 #CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 ${__GCC_COMMON} -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays                           -ftree-vectorize"
     19 #CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 ${__GCC_COMMON} -fomit-frame-pointer -finline-functions -fprefetch-loop-arrays"
     20 #CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 ${__GCC_COMMON} -fomit-frame-pointer -finline-functions                        -mfpmath=both             -ftree-vectorize"
     21 #CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 ${__GCC_COMMON} -fomit-frame-pointer -finline-functions                        -mfpmath=both"
     22 #CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 ${__GCC_COMMON}"
     23 #CFLAGS="${__GCC_CURRENT} -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 "
     24 #CFLAGS="${__GCC_CURRENT} -m32 -O2"
     25 #CFLAGS="-m32 -O2"


_GCC_CURRENT is the output for the current compiler being used (command above). With this, I can easily go down to compilation errors by uncommenting a CFLAGS variable. I've been doing this for years now and it's a solution I'm fine with when it comes to the need to use it. :)
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Wed Nov 09, 2011 1:46 am    Post subject: Reply with quote

Polynomial-C wrote:
So how did you guys running full gcc-4.6 compiled systems manage to get around bug 360513? My system went into a boot-loop after having grub compiled with gcc-4.6.


Y'know, that's the kind of thing we'd like to hear _before_ we unmask it. Thanks for the report. :roll:
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Wed Nov 09, 2011 9:18 am    Post subject: Reply with quote

I never hit that issue, thankfully, then again i keep my cflags simple
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
saellaven
l33t
l33t


Joined: 23 Jul 2006
Posts: 646

PostPosted: Thu Nov 10, 2011 5:28 am    Post subject: Reply with quote

just finished an emerge -e world on 1155 packages with gcc-4.6.2 on mostly stable AMD64. The following 4 packages had problems:

dev-lang/tcl-8.5.9: ICE with graphite flags enabled
dev-games/irrlicht-1.7.2 - patch from gamerlay for 4.6
net-libs/libtorrent-0.12.6 - unmask >=0.12.7

net-libs/xulrunner-1.9.2.20 - fix supposedly in 2.0.1 and awaiting backporting

Code:

CFLAGS="-O2 -march=native -mtune=native -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"

_________________
Ryzen 3700X, Asus Prime X570-Pro, 64 GB DDR4 3200, GeForce GTX 1660 Super
openrc-0.17, ~vanilla-sources, ~nvidia-drivers, ~gcc
Back to top
View user's profile Send private message
Polynomial-C
Retired Dev
Retired Dev


Joined: 01 Jun 2003
Posts: 1432
Location: Germany

PostPosted: Thu Nov 10, 2011 5:19 pm    Post subject: Reply with quote

dirtyepic wrote:
Polynomial-C wrote:
So how did you guys running full gcc-4.6 compiled systems manage to get around bug 360513? My system went into a boot-loop after having grub compiled with gcc-4.6.


Y'know, that's the kind of thing we'd like to hear _before_ we unmask it. Thanks for the report. :roll:

Sorry for not reporting this in the bug. That was by no means intentional. Maybe call me a slacker ;)
_________________
The manual said "Requires Windows10 or better" so I installed GNU/Linux...

my portage overlay

Need a stage1 tarball? (Unofficial builds)
Back to top
View user's profile Send private message
EatMeerkats
Apprentice
Apprentice


Joined: 15 Mar 2006
Posts: 234

PostPosted: Thu Nov 10, 2011 11:58 pm    Post subject: Reply with quote

Is anyone else running a gcc-4.6 compiled compiz? I just tried it, and it had a weird where it sometimes wouldn't give focus to a firefox window. Recompiled with 4.5 and everything seems to be fine now.
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Fri Nov 11, 2011 4:22 am    Post subject: Reply with quote

Polynomial-C wrote:
Sorry for not reporting this in the bug. That was by no means intentional. Maybe call me a slacker ;)


Sorry for being snarky. Can you add your emerge --info and build log to the bug? Did you run grub-install after grub was built w/ 4.6, and if so did you get the "Mismatched or corrupt version" error or did it install but just not boot?
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
rufnut
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 247

PostPosted: Sun Nov 13, 2011 3:45 am    Post subject: Reply with quote

Code:
sys-devel/gcc-4.6.2
with
Code:
media-libs/jpeg-8b


sends my jpeg pictures blotchy. :?:
Back to top
View user's profile Send private message
rufnut
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 247

PostPosted: Sun Nov 13, 2011 4:36 am    Post subject: Reply with quote

rufnut wrote:
Code:
sys-devel/gcc-4.6.2
with
Code:
media-libs/jpeg-8b


sends my jpeg pictures blotchy. :?:



I have since upgraded to libjpeg-turbo thank you to ssuominen :-)

If libjpeg-turbo is the default should they not mask jpeg-8b ?
Back to top
View user's profile Send private message
Polynomial-C
Retired Dev
Retired Dev


Joined: 01 Jun 2003
Posts: 1432
Location: Germany

PostPosted: Tue Nov 22, 2011 8:58 am    Post subject: Reply with quote

dirtyepic wrote:
Polynomial-C wrote:
Sorry for not reporting this in the bug. That was by no means intentional. Maybe call me a slacker ;)


Sorry for being snarky. Can you add your emerge --info and build log to the bug? Did you run grub-install after grub was built w/ 4.6, and if so did you get the "Mismatched or corrupt version" error or did it install but just not boot?


Problem is after I encountered that problem and got the machine finally back to booting I reverted gcc back to 4.5.3 and recompiled the whole machine with it.
Before I do this kind of adventure again I will first give one of my Gentoo-VMs a shot with gcc-4.6. But I will try to reproduce the problem there and will add the needed information to the bug report.
_________________
The manual said "Requires Windows10 or better" so I installed GNU/Linux...

my portage overlay

Need a stage1 tarball? (Unofficial builds)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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