NetBSD-Users archive

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

NetBSD cross tools



I've built NetBSD using 'build.sh -m sparc64 ... build' command and now
want to compile applications for sparc64 using cross-tools sitting on my
x86_64. Typescript is below.  As far as I can see SYSROOT is not set in
crosscompiler by default and linking fails due to this. Is this normal
behaviour? Is there a way to specify SYSROOT using environment variable?

    0 ~>/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/bin/sparc64--netbsd-gcc 
-o main main.c
    
/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/lib/gcc/sparc64--netbsd/4.5.3/../../../../sparc64--netbsd/bin/ld:
 cannot find crt0.o: No such file or directory
    
/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/lib/gcc/sparc64--netbsd/4.5.3/../../../../sparc64--netbsd/bin/ld:
 cannot find crtbegin.o: No such file or directory
    
/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/lib/gcc/sparc64--netbsd/4.5.3/../../../../sparc64--netbsd/bin/ld:
 cannot find -lgcc
    
/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/lib/gcc/sparc64--netbsd/4.5.3/../../../../sparc64--netbsd/bin/ld:
 cannot find -lgcc_s
    
/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/lib/gcc/sparc64--netbsd/4.5.3/../../../../sparc64--netbsd/bin/ld:
 cannot find -lc
    
/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/lib/gcc/sparc64--netbsd/4.5.3/../../../../sparc64--netbsd/bin/ld:
 cannot find -lgcc
    
/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/lib/gcc/sparc64--netbsd/4.5.3/../../../../sparc64--netbsd/bin/ld:
 cannot find -lgcc_s
    
/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/lib/gcc/sparc64--netbsd/4.5.3/../../../../sparc64--netbsd/bin/ld:
 cannot find -lc
    
/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/lib/gcc/sparc64--netbsd/4.5.3/../../../../sparc64--netbsd/bin/ld:
 cannot find crtend.o: No such file or directory
    collect2: ld returned 1 exit status

    1 ~>/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/bin/sparc64--netbsd-gcc 
-print-sysroot

    0 ~>/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/bin/sparc64--netbsd-gcc 
--sysroot /srv/obj-sparc64/destdir.sparc64 -o main main.c

    0 ~>file main
    main: ELF 64-bit MSB executable, SPARC V9, relaxed memory ordering, version 
1 (SYSV), dynamically linked (uses shared libs), for NetBSD 5.99.56, not 
stripped

    0 ~>

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index