Skip to contentSkip to conversation

Kernel compile error.

DISCUSSION Nicu Popovici 3 participants 3 messages Jan 5, 2001 – Jan 6, 2001 MIPS

lore
Share & tools
lore
#0 lore raw

Hello to you all,

I have the folowing cross toolchain ( binutils-2.10.1, egcs-1.0.3a , and glibc-2.0.6) and I can crosscompile some c c++ files on my intel machine and run the executables on the mips. BUT I can not cross compile the kernel for mips. I get the following error

=======================================================================
/crossdev/bin/mips-linux-gcc -D__KERNEL__ -I/home/nicu/JUNGO/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -mno-split-addresses -D__SMP__ -pipe -c -o init/main.o init/main.c /home/nicu/JUNGO/linux/include/asm/io.h: In function `copro_timeout':
/home/nicu/JUNGO/linux/include/asm/io.h:87: asm' operand requires impossible reload /home/nicu/JUNGO/linux/include/asm/io.h:87: asm' operand requires impossible reload
/home/nicu/JUNGO/linux/include/asm/bugs.h: In function `check_fpu':
In file included from init/main.c:34:
/home/nicu/JUNGO/linux/include/asm/bugs.h:137: internal error--insn does not satisfy its constraints:
(insn 244 241 250 (set (reg:SI 66 accum)

        (reg:SI 6 a2)) 170 {movsi_internal2} (insn_list 241

(insn_list:REG_DEP_ANTI 98 (insn_list:REG_DEP_OUTPUT 138 (insn_list:REG_DEP_ANTI 247 (insn_list:REG_DEP_ANTI 150 (nil))))))
(nil))
mips-linux-gcc: Internal compiler error: program cc1 got
fatal signal 6
make: *** [init/main.o] Error 1
[nicu@ares linux]$ {standard input}: Assembler messages:
{standard input}:47: Error: unrecognized opcode `movl
%cr0,$2'
{standard input}:52: Error: unrecognized opcode `movl
$2,%cr0'
{standard input}:100: Error: unrecognized opcode `andl
%esp,$5'
{standard input}:108: Error: unrecognized opcode `outb
accum,$7'
{standard input}:109: Error: unrecognized opcode `outb
%al,$0x80'
{standard input}:114: Error: unrecognized opcode `outb
accum,$7'
=======================================================================

I have to mention that egcs and glibc are tested and I know for sure that this one are good.

Does anyone know something related to this ?

Regards,
Octav

#1 lore raw
Quoted 4 lines · Nicu Popovici

/home/nicu/JUNGO/linux/include/asm/bugs.h:137: internal error--insn does not satisfy its constraints:
(insn 244 241 250 (set (reg:SI 66 accum)

        (reg:SI 6 a2)) 170 {movsi_internal2} (insn_list 241
Quoted 9 lines

(insn_list:REG_DEP_ANTI 98 (insn_list:REG_DEP_OUTPUT 138 (insn_list:REG_DEP_ANTI 247 (insn_list:REG_DEP_ANTI 150 (nil))))))
(nil))
mips-linux-gcc: Internal compiler error: program cc1 got
fatal signal 6
make: *** [init/main.o] Error 1
[nicu@ares linux]$ {standard input}: Assembler messages:
{standard input}:47: Error: unrecognized opcode `movl
%cr0,$2'

You are trying to assemble i386 instructions -- probably your include/asm
symlink is incorrect. Make sure the ARCH make variable is set to "mips", i.e. either run `make ARCH=mips <whatever>' or modify the top-level Makefile (the one from our CVS appears to have ARCH hardcoded to "mips" already).

Signature · 3 lines
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email protected], PGP key available        +
#2 lore raw
Quoted 5 lines · Maciej W. Rozycki

You are trying to assemble i386 instructions -- probably your include/asm
symlink is incorrect. Make sure the ARCH make variable is set to "mips", i.e. either run `make ARCH=mips <whatever>' or modify the top-level Makefile (the one from our CVS appears to have ARCH hardcoded to "mips" already).

The MIPS sources have ARCH hardwired to mips so his problem means he's trying to compile some other source tree - which probably will fail even with your hints.

Ralf