cross-compiler errors(again)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

cross-compiler errors(again)

Post 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 :(
chik'n
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Could you post more information about the error its self? Like maybe a screenshot or something like that.
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post 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
chik'n
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post by Meshounah »

attached
Attachments
error
error
errir.GIF (21.02 KiB) Viewed 2015 times
chik'n
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post 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.
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post by Meshounah »

i got it setup but i have a slight warning:
Attachments
errir.GIF
errir.GIF (11.66 KiB) Viewed 1978 times
chik'n
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post 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.
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post by Meshounah »

i know why i get the linking error but i want to solve the warnings
chik'n
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post 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.
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post 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
chik'n
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post by Meshounah »

ok my osdev nightmares are over(well one nightmare is over 8) )
chik'n
Post Reply