Can't use -lgcc flag with i686-elf-ld

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
NeonLightions
Member
Member
Posts: 102
Joined: Wed Oct 20, 2021 6:00 pm
Location: Paraguay

Can't use -lgcc flag with i686-elf-ld

Post by NeonLightions »

Like the title, can anyone help me solve this issue?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Can't use -lgcc flag with i686-elf-ld

Post by Solar »

Have you possibly built a cross-compiler (judging from 'i686-elf-ld')? Have you double-checked that you have actually built and installed the lib, which you're to do in the GCC build step
Every good solution is obvious once you've found it.
NeonLightions
Member
Member
Posts: 102
Joined: Wed Oct 20, 2021 6:00 pm
Location: Paraguay

Re: Can't use -lgcc flag with i686-elf-ld

Post by NeonLightions »

Solar wrote:Have you possibly built a cross-compiler (judging from 'i686-elf-ld')? Have you double-checked that you have actually built and installed the lib, which you're to do in the GCC build step
I see. But I really don't understand (cause my bad English). Could you help me explain it?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Can't use -lgcc flag with i686-elf-ld

Post by Solar »

You do not really give enough information for us to help you.

And please do not be offended when I say: You need to be able to read, and write, English on a pretty high level if you want to get anywhere in system programming. If English poses a problem to you, you should practice English, not OS development...
Every good solution is obvious once you've found it.
NeonLightions
Member
Member
Posts: 102
Joined: Wed Oct 20, 2021 6:00 pm
Location: Paraguay

Re: Can't use -lgcc flag with i686-elf-ld

Post by NeonLightions »

Solar wrote:You do not really give enough information for us to help you.

And please do not be offended when I say: You need to be able to read, and write, English on a pretty high level if you want to get anywhere in system programming. If English poses a problem to you, you should practice English, not OS development...
No no no. I think my English is not a big problem for me. I'm good enough to read, write document in English and able to understand them. In https://wiki.osdev.org/GCC_Cross-Compiler I just say that I don't understand that problem. Wiki's solution makes me confuse...
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Can't use -lgcc flag with i686-elf-ld

Post by iansjack »

NeonLightions wrote:No no no. I think my English is not a big problem for me.
But I really don't understand (cause my bad English).
Both of these cannot be true. Solar is correct that, as so much documentation is written in English, you really need to make sure that you understand the language.

You need to give more information, and make your question more meaningful. At present it's the equivalent of saying "I don't feel well; what's wrong with me.

1. Did you follow the wiki instructions, exactly, when constructing your cross-compiler? Indeed, did you construct it or did you get it from some other source?
2. Dos the library libgcc exist in the lib directory of your cross-compiler installation?
3. Your question is far too vague:
  • i. What functions from libgcc are you trying to use?
    ii. What exact compile command are you using?
    iii. In what way does the command not work? Does it produce an executable that doesn't work properly, or does it fail with an error message?
    iv. If the latter, what is that error message (exactly)?
Post Reply