http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46792
Summary: libffi fails building for cris-elf Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libffi AssignedTo: unassig...@gcc.gnu.org ReportedBy: h...@gcc.gnu.org Target: cris-axis-elf When support for CRIS v32 was added to the CRIS port, a "v32" multilib was added to cris-elf. Unfortunately, libffi wasn't updated, resulting in build failure for the whole of gcc without special configure options: libtool: compile: /tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc/xgcc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc/ -nostd\ inc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/v32/newlib/ -isystem /tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/\ v32/newlib/targ-include -isystem /tmp/hpautotest-gcc1/gcc/newlib/libc/include -B/tmp/hpautotest-gcc1/cris-elf/gccobj/cr\ is-elf/v32/libgloss/cris -L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/v32/libgloss/libnosys -L/tmp/hpautotest-gcc1/g\ cc/libgloss/cris -B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/bin/ -B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/lib/ -i\ system /tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/include -isystem /tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/sys-inclu\ de -march=v32 -mbest-lib-options -DHAVE_CONFIG_H -I. -I/tmp/hpautotest-gcc1/gcc/libffi -I. -I/tmp/hpautotest-gcc1/gcc/l\ ibffi/include -Iinclude -I/tmp/hpautotest-gcc1/gcc/libffi/src -I. -I/tmp/hpautotest-gcc1/gcc/libffi/include -Iinclude -\ I/tmp/hpautotest-gcc1/gcc/libffi/src -g -O2 -MT src/cris/sysv.lo -MD -MP -MF src/cris/.deps/sysv.Tpo -c /tmp/hpautotest\ -gcc1/gcc/libffi/src/cris/sysv.S -o src/cris/sysv.o /tmp/hpautotest-gcc1/gcc/libffi/src/cris/sysv.S: Assembler messages: /tmp/hpautotest-gcc1/gcc/libffi/src/cris/sysv.S:51: Error: Unknown opcode: `push' A temporary fix is to disable libffi for cris-elf. (No other action should be necessary: cris-linux doesn't have a v32 multilib and the crisv32-* tuples aren't matched by libffi configure.) The correct fix is not that hard; there's a common assembly-language subset used in other assembly codes, for example newlib+libgloss. E.g. push R -> subq 4,$sp / move.d R,[$sp] (equivalent in function, size and cycles except when condition codes need to be preserved.) I'll fix this the temporary way, then suspend the PR.