Subject: I can't cross compile kernel

From: Diablero <[email-masked]>
Date: Tue, 25 Jul 2000 00:01:08 +0200

I have recompiled binutils and gcc lik it's explained in
http://foobazco.org/~wesolows/mips-cross.html. 

I have tried to cross-compile kernel but I always had the same errors.
(last kernel from cvs - oss.sgi.com)
make menuconfig ARCH=mips
make dep MAKE="make -j3" CROSS_COMPILE=mips-linux-
make boot MAKE="make -j3" CROSS_COMPILE=mips-linux-

mips-linux-gcc -D__KERNEL__ -I/goinfre/mips/kernel/linux-cvs/include -Wall
-Wstrict-prototypes -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic
-mcpu=r4600 -mips2 -Wa,--trap -pipe -fno-strict-aliasing  -c -o init/main.o
init/main.c
in file included from
/goinfre/mips/kernel/linux-cvs/include/linux/coda_fs_i.h:14,
                 from
		 /goinfre/mips/kernel/linux-cvs/include/linux/fs.h:281,
[...]
                 from
		 /goinfre/mips/kernel/linux-cvs/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/goinfre/mips/kernel/linux-cvs/include/linux/coda.h:259: parse error before
`u_quad_t'
/goinfre/mips/kernel/linux-cvs/include/linux/coda.h:259: warning: no
semicolon at end of struct or union
[...]
/goinfre/mips/kernel/linux-cvs/include/linux/udf_fs_sb.h:21: warning:
ignoring pragma: 1
/goinfre/mips/kernel/linux-cvs/include/linux/udf_fs_sb.h:76: warning:
ignoring pragma: ;
{standard input}: Assembler messages:
{standard input}:50: Warning: No .cprestore pseudo-op used in PIC code
{standard input}:98: Warning: No .cprestore pseudo-op used in PIC code
{standard input}:108: Warning: No .cprestore pseudo-op used in PIC code
{standard input}:167: Warning: Macro instruction expanded into multiple
instructions
{standard input}:167: Warning: No .cprestore pseudo-op used in PIC code
[...]

-- 
Thomas Poindessous
EpX asso GNU/Linux de l'Epita
[email-masked] && http://www.epita.fr/~epx

---

From: Keith M Wesolowski <[email-masked]>
Date: Mon, 24 Jul 2000 15:47:24 -0700

> (last kernel from cvs - oss.sgi.com)

A few questions: what compiler version? What binutils version? Could
you please send me your .config? This doesn't happen for me with gcc,
binutils, and linux current CVS. If you are compiling with current CVS
gcc, you will need some of my patches as well, though they don't
address this problem.

Also, I now recommend that people wanting to build a cross-compiler by
a recipe use my make-cross script instead of typing everything
manually. It's available on oss.sgi.com. It's hackerware, but so are
cross-compilers.

-- 
Keith M Wesolowski			[email-masked]
University of Nevada			http://www.chem.unr.edu
Chemistry Department Systems and Network Administrator

---

From: Diablero <[email-masked]>
Date: Tue, 25 Jul 2000 01:16:04 +0200

> gcc, you will need some of my patches as well, though they don't

I use binutils 2.10 and gcc 2.95.2
I attach my .config

---

From: Keith M Wesolowski <[email-masked]>
Date: Tue, 25 Jul 2000 09:11:08 -0700

> I use binutils 2.10 and gcc 2.95.2

With a current toolchain, I can't duplicate your problem. There is a
bug in the sonic.c driver that causes compilation to abort (it's not
been softnetted) but I don't see the error you do. At a glance, it
looks like the problem is with the definition of u_quad_t. You might
try running the file in question through the preprocessor to see
what's going on.