Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 398093

Summary: sys-devel/gcc-4.6.2 with -march=bdver1 creates broken media-libs/jpeg
Product: Gentoo Linux Reporter: Jonathan Isom <jeisom>
Component: [OLD] DevelopmentAssignee: Gentoo Graphics Project <graphics+disabled>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: toolchain
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Jonathan Isom 2012-01-07 23:00:40 UTC
Created attachment 298275 [details]
emerge --info

gcc-4.6.1-r1 and gcc-4.6.2 both with --march=bdver1 creates media-libs/jpeg that corrupts input jpegs and can't save jpegs.  Tested with gimp, firefox, konqueror, and media-gfx/imagemagick(convert input.png output.jpg).  tested with jpeg 7 and 8.


# convert input.png output.jpg
convert: DCT coefficient out of range `Untitled.jpg' @ error/jpeg.c/JPEGErrorHandler/297.
Comment 1 Jonathan Isom 2012-01-18 23:54:21 UTC
this appears to be related to <https://bugs.gentoo.org/show_bug.cgi?id=399251>.  If I set my CFLAGS="-O3 -march=bdver1 -mno-sse4.1 -mno-avx" I get no problem.
Comment 2 Jonathan Isom 2012-04-27 15:47:47 UTC
This appears to be corrected in gcc 4.7.0. I used a modified ebuild from the toolchain overlay for gcc.
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2013-04-23 06:15:19 UTC
You can try 4.6.4, but if that doesn't work then use 4.7.  The 4.6 branch is closed upstream so without a specific patch we can't do much about it.