Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 398093 - sys-devel/gcc-4.6.2 with -march=bdver1 creates broken media-libs/jpeg
Summary: sys-devel/gcc-4.6.2 with -march=bdver1 creates broken media-libs/jpeg
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Graphics Project
Depends on:
Reported: 2012-01-07 23:00 UTC by Jonathan Isom
Modified: 2013-04-23 06:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

emerge --info (emerge_info,16.48 KB, text/plain)
2012-01-07 23:00 UTC, Jonathan Isom

Note You need to log in before you can comment on or make changes to this bug.
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 <>.  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.