How to make a cross compiler for i386-elf?

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
mrosdev
Member
Member
Posts: 28
Joined: Mon Jun 01, 2020 8:15 am

How to make a cross compiler for i386-elf?

Post by mrosdev »

Can anyone tell me how to make an i386-elf-gcc and i386-elf-binutils? :?:
Octocontrabass
Member
Member
Posts: 5575
Joined: Mon Mar 25, 2013 7:01 pm

Re: How to make a cross compiler for i386-elf?

Post by Octocontrabass »

Here are the instructions.

Do you need help with any of that?
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: How to make a cross compiler for i386-elf?

Post by nexos »

Follow that tutorial and just replace occurrences of i686 with i386
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
mrosdev
Member
Member
Posts: 28
Joined: Mon Jun 01, 2020 8:15 am

Re: How to make a cross compiler for i386-elf?

Post by mrosdev »

Ok, I have a build script for making a cross compiler for i386-elf, but that does not seem to work.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How to make a cross compiler for i386-elf?

Post by iansjack »

It's hardly worth writing a script. Just follow the instructions.

If you have a problem you need to tell people what commands you use and what error messages you get. Saying "it doesn't work" isn't enough.
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: How to make a cross compiler for i386-elf?

Post by PeterX »

Someone has taken the effort and built cross compiler for 32bit Linux:

viewtopic.php?f=1&t=36709&p=305386

Perhaps that helps?

Greetings
Peter
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: How to make a cross compiler for i386-elf?

Post by kzinti »

Here is a makefile that will build GCC for you:

https://github.com/kiznit/build-gcc-and-binutils

You want to use:

Code: Select all

make i686-elf
Note: you will still have to install some dependencies as per the instructions above.
mrosdev
Member
Member
Posts: 28
Joined: Mon Jun 01, 2020 8:15 am

Re: How to make a cross compiler for i386-elf?

Post by mrosdev »

Ok, I built the cross compiler!!! Thank you, everyone!!! :D =D> :wink: :P :mrgreen:
Post Reply