OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 7:21 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: GCC is broken
PostPosted: Sun Mar 12, 2017 4:38 pm 
Offline
Member
Member
User avatar

Joined: Fri Feb 17, 2017 4:01 pm
Posts: 640
Location: Ukraine, Bachmut
You should ensure that i686-elf-as binary has been properly built, check its --target-help options for example. from its output it should be clear (hopefully) for what target it has been built. if it shows apple specific things, then you configured your build wrong. if it is for i686-elf, as it was intended for, then your build is OK, and you have some trouble with environment settings. it's easier. unfortunately I barely could help with this, because my working machine is Windows and it's quite easy to set up the environment for cross-compile tools here. I have 3 different gcc builds for aarch64, arm and mips on x86 machine and setting it up was as easy as writing a few of lines in a .cmd file for the particular tool. but it differs from what you have.
So check the output your as first.

_________________
ANT - NT-like OS for x64 and arm64.
efify - UEFI for a couple of boards (mips and arm). suspended due to lost of all the target park boards (russians destroyed our town).


Top
 Profile  
 
 Post subject: Re: GCC is broken
PostPosted: Mon Mar 13, 2017 8:26 am 
Offline

Joined: Wed Feb 15, 2017 8:29 am
Posts: 17
zaval wrote:
You should ensure that i686-elf-as binary has been properly built, check its --target-help options for example. from its output it should be clear (hopefully) for what target it has been built. if it shows apple specific things, then you configured your build wrong. if it is for i686-elf, as it was intended for, then your build is OK, and you have some trouble with environment settings.


I think I found the problem, when I try i686-elf-as --target-help, everything looks good, but when I try i686-elf-gcc --target-help, in the section "Assembler options" it sais "clang: warning: argument unused during compilation: '--target-help'" so, I think that my i686-elf-gcc uses as, located in /usr/bin/as instead of i686-elf-as, and I think that the same thing happens to ld


Top
 Profile  
 
 Post subject: Re: GCC is broken
PostPosted: Mon Mar 13, 2017 8:43 am 
Offline

Joined: Wed Feb 15, 2017 8:29 am
Posts: 17
Ok, the problem was that, so I modified my PATH so that binutils points to /.../binutils/i686-elf/bin where there is i686-elf binutils but without the suffix "i686-elf-" and now everything work properly, so I will search in the configuration options of gcc if there is something to specify that it must uses "i686-elf-ld" and "i686-elf-as" instead of "ld" and "as", and I will rebuild it


Top
 Profile  
 
 Post subject: Re: GCC is broken
PostPosted: Mon Mar 13, 2017 10:46 am 
Offline

Joined: Wed Feb 15, 2017 8:29 am
Posts: 17
I built gcc with --with-as= and --with-ld= options, and all works well now, thank you all for the help


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group