NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: 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
> One problem here is that it makes it so far. It should have failed
> earlier because includes are not found. Now we build cross-gcc with
> empty sysroot, so it picks host includes. I think it's a bug.
In the example above main.c contained just 'return 0;' without includes.
But you are right, the following looks strange.
0 ~>cat main.c
#include <stdio.h>
int main ()
{
puts ("Hello World!");
return 0;
}
0 ~>/srv/obj-sparc64/tooldir.NetBSD-5.99.56-amd64/bin/sparc64--netbsd-gcc -c
-o main.o main.c
0 ~>
--
Best regards, Aleksey Cheusov.
Home |
Main Index |
Thread Index |
Old Index