GNOME Bugzilla – Bug 345473
MMX burn function doesn't compile under gcc 4.1.1
Last modified: 2008-01-15 13:08:50 UTC
With gcc 4.1.1-5 on Debian, gimp 2.2.11 stopped being able to build on i386 with MMX code enabled: cc -DHAVE_CONFIG_H -I. -I/build/buildd/gimp-2.2.11/./app/composite -I../.. -I/build/buildd/gimp-2.2.11/. -I/build/buildd/gimp-2.2.11/./app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Composite\" -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -mmmx -g -Wall -O2 -c -o libcompositemmx_a-gimp-composite-mmx.o `test -f 'gimp-composite-mmx.c' || echo '/build/buildd/gimp-2.2.11/./app/composite/'`gimp-composite-mmx.c /build/buildd/gimp-2.2.11/./app/composite/gimp-composite-mmx.c:927: warning: 'mmx_op_overlay' defined but not used /build/buildd/gimp-2.2.11/./app/composite/gimp-composite-mmx.c: In function 'gimp_composite_burn_rgba8_rgba8_rgba8_mmx': /build/buildd/gimp-2.2.11/./app/composite/gimp-composite-mmx.c:157: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' make[4]: *** [libcompositemmx_a-gimp-composite-mmx.o] Error 1 make[4]: Leaving directory `/build/buildd/gimp-2.2.11/build/app/composite' make[3]: *** [all-recursive] Error 1 The fix, which seems to work for me, is to remove the MMX/SSE burn functions and backport the more efficient generic version from CVS HEAD. I'm attaching the patch I'm currently using in the Debian gimp 2.2.11 packages, but I doubt this is totally correct since it's patching generated code.
Created attachment 67737 [details] [review] patch against 2.2.11
Ok, I've applied your patch and ran 'make regenerate' in the app/composite directory in order to regenerate the generated code. 2006-06-22 Sven Neumann <sven@gimp.org> * app/composite/gimp-composite-generic.c * app/composite/gimp-composite-mmx-installer.c * app/composite/gimp-composite-mmx-test.c * app/composite/gimp-composite-mmx.[ch] * app/composite/gimp-composite-sse-installer.c * app/composite/gimp-composite-sse-test.c * app/composite/gimp-composite-sse.[ch]: backported changes to burn compositing function from the HEAD branch because the MMX/SSE code broke compilation on GCC 4.1 (bug #345473).