cross-kompilacja na sparca64, problem
sparky w pld-linux.org
sparky w pld-linux.org
Pią, 27 Paź 2006, 22:19:12 CEST
On Fri, Oct 27, 2006 at 09:33:28PM +0200, sparky w pld-linux.org wrote:
> pomyslalem ze skodo jackass sie bawi to mu zrobie busyboxa na sparca,
> wiec sprobowalem do skompilowac pod 64-bity
>
> zrobilem crosssparc64-uClibc, podbilem crosssparc64-gcc do 4.1.1 a mimo
> to kazde linkowanie konczy sie mniej wiecej tak:
>
linkowanie dynamicznej biblioteki uclibc:
sparc64-pld-linux-ld -shared --warn-common --warn-once -z combreloc -z relro -z defs -s -init __uClibc_init -soname=libc.so.0 -o lib/libuClibc-0.9.29.so --whole-archive libc/libc_so.a --no-whole-archive ./lib/interp.os ./lib/ld-uClibc.so.0 ./lib/uclibc_nonshared.a /usr/lib/gcc/sparc64-pld-linux/4.1.1/libgcc.a
libc/libc_so.a(clone.os): In function `clone':
libc/sysdeps/linux/sparc/clone.S:(.text+0x38): relocation truncated to fit: R_SPARC_GOT13 against symbol `__syscall_error' defined in .text section in libc/libc_so.a(__syscall_error.os)
libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
_fpmaxtostr.c:(.text+0xbc): undefined reference to `_Qp_fne'
_fpmaxtostr.c:(.text+0xf0): undefined reference to `_Qp_feq'
_fpmaxtostr.c:(.text+0x138): undefined reference to `_Qp_div'
_fpmaxtostr.c:(.text+0x15c): undefined reference to `_Qp_flt'
_fpmaxtostr.c:(.text+0x208): undefined reference to `_Qp_mul'
_fpmaxtostr.c:(.text+0x3b0): undefined reference to `_Qp_fge'
_fpmaxtostr.c:(.text+0x490): undefined reference to `_Qp_qtoux'
_fpmaxtostr.c:(.text+0x4a0): undefined reference to `_Qp_uxtoq'
_fpmaxtostr.c:(.text+0x4d0): undefined reference to `_Qp_sub'
libc/libc_so.a(vfprintf.os): In function `vfprintf':
vfprintf.c:(.text+0x474): undefined reference to `_Qp_dtoq'
libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':
__psfs_do_numeric.c:(.text+0x600): undefined reference to `_Qp_qtod'
__psfs_do_numeric.c:(.text+0x614): undefined reference to `_Qp_qtos'
libc/libc_so.a(strtof.os): In function `strtof':
strtof.c:(.text+0x38): undefined reference to `_Qp_stoq'
libc/libc_so.a(__strtofpmax.os): In function `__strtofpmax':
__strtofpmax.c:(.text+0x110): undefined reference to `_Qp_itoq'
__strtofpmax.c:(.text+0x138): undefined reference to `_Qp_add'
natomiast hello world sie kompiluje i swiadek zeznaje ze dziala:
$ cat hworld.c
#include <stdio.h>
int main() {
printf("Hello world !\n");
}
$ sparc64-uclibc-gcc -static hworld.c -Os -o hello_world.sparc64
$ sparc64-uclibc-strip -s hello_world.sparc64
$ ls -lah hello_world.sparc64
-rwx------ 1 sparky users 14K Oct 27 20:04 hello_world.sparc64
$ file hello_world.sparc64
hello_world.sparc64: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), statically linked, stripped
--
____ Sparky{PI] -- Przemyslaw _ ___ _ _ ........... LANG...Pl..Ca..Es..En
/____) ___ ___ _ _ || Iskra | | _ \| | | : WWW........ppcrcd.pld-linux.org
\____\| -_)'___| ||^'||//\\// < | _/| | | : JID......sparky<at>jabberes.org
(____/|| (_-_|_|| ||\\ || |_ |_| |_| _| : Mail....sparky<at>pld-linux.org
Więcej informacji o liście dyskusyjnej pld-devel-pl