diff -Nru libpng-1.2.5/pnggccrd.c libpng-1.2.5-new/pnggccrd.c --- libpng-1.2.5/pnggccrd.c 2002-10-03 13:32:28.000000000 +0200 +++ libpng-1.2.5-new/pnggccrd.c 2003-10-14 11:00:29.000000000 +0300 @@ -4522,15 +4522,13 @@ "andl $0x00000007, %%edx \n\t" // calc bytes over mult of 8 "subl %%edx, %%eax \n\t" // drop over bytes from length "movl %%eax, _MMXLength \n\t" - : "=a" (dummy_value_a), // 0 // output regs (dummy) "=D" (dummy_value_D) // 1 : "0" (bpp), // eax // input regs "1" (row) // edi - : "%ebx", "%ecx", "%edx" // clobber list - , "%esi" + : "%esi", "%ecx", "%edx" // clobber list #if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ , "%mm0", "%mm1", "%mm2", "%mm3" @@ -5034,7 +5032,10 @@ "1" (prev_row), // esi "2" (row) // edi - : "%eax", "%ebx", "%ecx" // clobber list (no input regs!) + : "%eax", "%ecx" // clobber list (no input regs!) +#ifndef __PIC__ + , "%ebx" +#endif #if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ , "%mm0", "%mm1", "%mm2", "%mm3" diff -Nru libpng-1.2.5/scripts/makefile.gcmmx libpng-1.2.5-new/scripts/makefile.gcmmx --- libpng-1.2.5/scripts/makefile.gcmmx 2002-10-03 13:32:34.000000000 +0200 +++ libpng-1.2.5-new/scripts/makefile.gcmmx 2003-10-14 09:11:59.000000000 +0300 @@ -28,8 +28,8 @@ # Where the zlib library and include files are located. #ZLIBLIB=/usr/local/lib #ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib +ZLIBLIB=/usr/lib +ZLIBINC=/usr/include ALIGN= # for i386: @@ -43,13 +43,13 @@ # Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety ### for generic gcc: -CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \ - -O3 $(ALIGN) -funroll-loops \ - -fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5 +#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \ +# -O3 $(ALIGN) -funroll-loops \ +# -fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5 ### for gcc 2.95.2 on 686: -#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \ -# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \ -# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer +CFLAGS+=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \ + -malign-double -ffast-math -fstrict-aliasing \ + $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer ### for gcc 2.7.2.3 on 486 and up: #CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \ # -m486 -malign-double -ffast-math \ @@ -131,7 +131,7 @@ libpng.so.3.$(PNGMIN): $(OBJSDLL) $(CC) -shared -Wl,-soname,libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) \ + -L$(ZLIBLIB) -lz -lm -o libpng.so.3.$(PNGMIN) \ $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so