Page 1 of 1

cross-compiler errors(again)

Posted: Sat Sep 01, 2007 6:37 pm
by Meshounah
I installed cygwin on two computers... and then i followed the gcc cross compiler tutorial but at the end of make all-gcc i get error 2 and i'm really confused :(

Posted: Sat Sep 01, 2007 10:23 pm
by frank
Could you post more information about the error its self? Like maybe a screenshot or something like that.

Posted: Sat Sep 01, 2007 10:24 pm
by Meshounah
EDIT: i saw at the end of the gcc compile that there was a message along the lines of "line: 7889 cmp command not found"

i'm trying to build gcc version 4.2.1

Posted: Sat Sep 01, 2007 10:56 pm
by Meshounah
attached

Posted: Sun Sep 02, 2007 5:09 am
by jnc100
Having just cross compiled gcc 4.2.1 to target i586-elf from cygwin, I can assure you that the commands given in the wiki page do work. I used the recently released binutils 2.18.

In particular, have you 1) cross-compiled binutils? and 2) run the all important 'export PATH=$PATH:$PREFIX/bin' step after compiling (and installing) binutils.

If you follow all the instructions provided in the wiki page exactly you shouldn't have any problems. I.e. don't try compiling within the gcc source directory or anything like that.

Regards,
John.

Posted: Sun Sep 02, 2007 8:42 am
by Meshounah
i got it setup but i have a slight warning:

Posted: Sun Sep 02, 2007 11:35 am
by jnc100
As you're getting warnings from compiling main.c, and you're treating them as errors, main.c doesn't get compiled to main.o. Therefore its not unreasonable that ld can't find main.o.

Regards,
John.

Posted: Sun Sep 02, 2007 12:04 pm
by Meshounah
i know why i get the linking error but i want to solve the warnings

Posted: Sun Sep 02, 2007 12:20 pm
by Candy
Meshounah wrote:i know why i get the linking error but i want to solve the warnings
main is always defined as:

Code: Select all

int main(int, char **);
You fail on three aspects of this definition. If you want to make a different interface, call it differently.

Posted: Sun Sep 02, 2007 12:21 pm
by Meshounah
Candy wrote:
Meshounah wrote:i know why i get the linking error but i want to solve the warnings
main is always defined as:

Code: Select all

int main(int, char **);
You fail on three aspects of this definition. If you want to make a different interface, call it differently.
ok thats what i thought but i was going by the wiki

Posted: Sun Sep 02, 2007 12:34 pm
by Meshounah
ok my osdev nightmares are over(well one nightmare is over 8) )