cross-compiler problem

cross-compiler problem

Post by Indukumar Ilangova » Fri, 10 Jan 2003 17:20:08

Hi All,

I tried to build cross compiler on Red Hat Linux
Kernel 2.4.2-2 on an i686.
I use binutils-2.13, gcc-3.2, glibc-2.2.5, glibc-2.2.5-mips-build-gmon.diff,
I followed the instructions from

I installed binutils  without any problems.

While compiling glibc2.2.5 I get the following error.

../sysdeps/unix/syscall.S: Assembler messages:
../sysdeps/unix/syscall.S:28: Error: absolute expression required `li'
make[2]: *** [/home/iilangov/crossGCC/mips/mips-glibc/misc/syscall.o] Error
make[2]: Leaving directory `/home/iilangov/crossGCC/mips/glibc-2.2.5/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/home/iilangov/crossGCC/mips/glibc-2.2.5'
make: *** [all] Error 2

I have "asm/unistd.h" in the include path, still this problem is happening.
Do you guys have any clue ?

Thanks in Advance !

----- Original Message -----

Sent: Saturday, December 28, 2002 12:22 PM
Subject: Re: cross-compiler problem

| > ../sysdeps/unix/syscall.S:28: Error: absolute expression required 'li'
| Looks like you're missing the kernel headers where the syscall numbers
| are defined.  (.../include/asm/unistd.h)
| --
| Alexandre Oliva   Enjoy Guarana', see

| Free Software Evangelist                Professional serial bug killer
| ------
| Want more information?  See the CrossGCC FAQ,
| Want to unsubscribe? Send a note to

Indukumar Ilangovan
HCL-Cisco Offshore development center,
49-50, Nelson Manickam Road, Chennai - 600029 ,  India .
TEL:  +91-44-2374 1939 x 2215 FAX: +91-44-3741038

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at
Please read the FAQ at


1. Cross Compiler Problems

Hello all.
I am haveing some real problems with setting up gcc as a cross
compiler. The host platform is an i686-pc-linux-gnu. The target will
be sh-linux-gnu (linux running on an embedded board based on the
hitachi sh4 processor).  My host platform is also running kernel 2.4
which supports sh4. Here is what I have done.

Installed  010116 snapshot of binutils. No problem here, I configured
with the options: --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--target=sh-linux-gnu. This left me with cross binutilities in

Then, I placed "appropriate" headers in the directory
/usr/local/sh-linux-gnu/include. These headers included:

asm -- a symbolic link to /usr/src/linux/include/asm-sh
linux - a symbolic link to /usr/src/linux/include/linux
(Note, the above links point to kernel 2.4 source files.)

The remaining headers and directories I got out of glibc-2.2.1 and
copied to /usr/local/sh-linux-gnu/include:

/usr/include/endian.h, alloca.h, time.h, features.h, unistd.h, and

I decided on the above files and directories by attempting to build
gcc and noteing where it failed. I then added the header files it
needed until I got no more errors concerning missing files.

I configure gcc with options: --build=i686-pc-linux-gnu
--host=i686-pc-linux-gnu --target=sh-linux-gnu --enable-shared

I then build with the command: make gcc-all LANGUAGES=c

The problem is, I get errors from the assembler about bad assembly
code while xgcc is trying to compile libgcc2.c. I compiled a little
test program with the xgcc program that the build process made. It
doesn't seem to make any valid assembly. That is, neither my native
x86 assembler, nor the sh cross-assembler sitting in
/usr/local/sh-linux-gnu/bin seem to be able to do anything with the
code generated by xgcc. Does anyone have any thoughts on this?

As I understand it, while installing gcc, xgcc is made first. This is
then used to compile the rest of the gcc source. So, shouldn't xgxx be
generating x86 assembly code?

Kai has been helping me through this whole process, yet he doesn't
seem to be having any of these troubles.

Thanks for any help,

2. Using delete previous word at the shell with alt-backspace ?

3. cross compiler problems

4. Need Help!

5. Cross Compiler Problems

6. List of maintainers (draft #3)

7. problem in setup cross-compiler in cygwin.

8. DVD-RAM on FreeBSD and Linux

9. Problems building a cross-compiler

10. problems building cross-compiler host/build in linux for target i686-pc-msdosdjgpp (long)

11. SCO cross-compiler, iBCS, curses -- problems!

12. Problem making a cross-compiler

13. R3000 CROSS-COMPILER ???