Very weird errors compiling freetype-2.1.10 on my BLFS system
When I try to compile freetype, I get the following:
./builds/unix/libtool --mode=compile gcc -pedantic -ansi -I/sources/freetype-2.1.10/objs -I./builds/unix -I/sources/freetype-2.1.10/include -c -Wall -O2 -fomit-frame-pointer -pipe -march=k6-2 -mmmx -m3dnow -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DDARWIN_NO_CARBON -DFT_CONFIG_CONFIG_H="<ftconfig.h>" -I/sources/freetype-2.1.10/src/base -o /sources/freetype-2.1.10/objs/ftbase.lo /sources/freetype-2.1.10/src/base/ftbase.c gcc -pedantic -ansi -I/sources/freetype-2.1.10/objs -I./builds/unix -I/sources/freetype-2.1.10/include -c -Wall -O2 -fomit-frame-pointer -pipe -march=k6-2 -mmmx -m3dnow -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DDARWIN_NO_CARBON "-DFT_CONFIG_CONFIG_H=<ftconfig.h>" -I/sources/freetype-2.1.10/src/base /sources/freetype-2.1.10/src/base/ftbase.c -fPIC -DPIC -o /sources/freetype-2.1.10/objs/.libs/ftbase.o /sources/freetype-2.1.10/src/base/fttrigon.c: In function 'ft_trig_pseudo_rotate': /sources/freetype-2.1.10/src/base/fttrigon.c:206: error: unable to find a register to spill in class 'DREG' /sources/freetype-2.1.10/src/base/fttrigon.c:206: error: this is the insn: (insn:HI 157 156 158 1 (parallel [ (set (reg:SI 0 ax [96]) (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (reg:SI 0 ax [97])) (zero_extend:DI (reg:SI 2 cx [93]))) (const_int 32 [0x20])))) (clobber (scratch:SI)) (clobber (reg:CC 17 flags)) ]) 181 {*umulsi3_highpart_insn} (insn_list:REG_DEP_TRUE 155 (insn_list:REG_DEP_TRUE 156 (nil))) (expr_list:REG_UNUSED (reg:CC 17 flags) (expr_list:REG_UNUSED (scratch:SI) (expr_list:REG_DEAD (reg:SI 2 cx [93]) (expr_list:REG_DEAD (reg:SI 0 ax [97]) (expr_list:REG_UNUSED (reg:CC 17 flags) (expr_list:REG_UNUSED (scratch:SI) (expr_list:REG_EQUAL (udiv:SI (reg:SI 92) (const_int 11796480 [0xb40000])) (nil))))))))) /sources/freetype-2.1.10/src/base/fttrigon.c:206: confused by earlier errors, bailing out make: *** [/sources/freetype-2.1.10/objs/ftbase.lo] Error 1 This is very weird, and doesn't look like any kind of output I've ever seen. I mean, all the compile errors I've had before were due to a missing library or something. I have no idea what's wrong here. |
Okay, I got it working, but I still don't understand what was wrong.
After reading that someone had a similar problem here, http://gcc.gnu.org/ml/gcc-bugs/2004-05/msg01541.html I tried removing the -march=k6-2, -mmmx, and -m3dnow compile flags, and it worked. Then I tried adding back the flags one at a time, and found that using -march=k6-2 caused the problem, but -mmmx and -m3dnow could be used without incident. Could someone explain what the issue was, and why the error happened? |
All times are GMT -5. The time now is 09:52 AM. |