Re: problems while cross-compiling the glibc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chen Ken <chenken <at> mprc.pku.edu.cn> writes:

> 
> Hello, everyone:
> 
> I am cross compiling the glibc for arm-linux on my x86 machine.
> I used the binutils-2.13.1, gcc-3.2.1, glibc-2.3.1, and I use the
> head files from linux-2.4.17. I copied from it the include/asm-arm
> to my  ${prefix}/arm-linux/include/asm and the include/linux to
> ${prefix}/arm-linux/include/linux   directory.
> When I compiled the glibc, the machine reported that
> 
> ../sysdeps/unix/syscall.S: Assembler messages:
> ../sysdeps/unix/syscall.S:28: Error: cannot represent SWI relocation in this
> object file format
> 
> I got to know from the internet that somebody had got the same error
> in the past. But his reason was that he use the asm-sparc64 as his asm.
> When he used the correct asm-arm directory, it was ok. But I do not know
> what is the matter with my compiling process. Please give me some advice
> if you can.
> 
> Sincerely,
> Chen Ken
> Microprocessor Research & Development Center, Peking University
> Tel: +86(010)62765828  ext. 872
> chenken <at> mprc.pku.edu.cn
> 
> 

Hi Chen,
i presume it is a bit late, but for all other people that are googling for a 
solutions. The problem is in the unistd.h in your include/asm directory. It 
undefines a few contants including __NR_syscall which is called in this file. 
SWI can only take constants, but since __NR_syscall is not defined it takes an 
error or null. remove the undefs from the unistd.h and it should compile.

with regards,
Michel van der Breggen





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux