Page 1 of 1
Is it really a have to to use a cross compiler
Posted: Fri Aug 13, 2021 3:35 am
by ark
Up to really now i have used normal gcc installed on my system. I changed because i thought it may be better to use a cross compilers, like the wiki page says. Is it possible to create a good os (i mean one that can run programs and pretty much like linux) and just compile with normal gcc
Re: Is it really a have to to use a cross compiler
Posted: Mon Aug 16, 2021 8:02 pm
by Octocontrabass
Re: Is it really a have to to use a cross compiler
Posted: Tue Aug 17, 2021 11:30 am
by Maddie
Just use a cross-compiler. It's very easy if you follow the instructions on the wiki, and it will save you a lot of trouble to have a toolchain specific to your OS.
Re: Is it really a have to to use a cross compiler
Posted: Tue Aug 17, 2021 11:34 am
by bzt
Octocontrabass wrote:Yes, it's possible, but it's a bad idea.
I agree. You'll run into strange and unexplainable bugs later (most commonly caused by mixed up host / target headers and such).
Cheers,
bzt
Re: Is it really a have to to use a cross compiler
Posted: Tue Aug 17, 2021 11:36 am
by nexos
Using a cross compiler provides a clean separation of host and target, as bzt said. Your OS will be full independent of your host, and will be able to become your OS.
Re: Is it really a have to to use a cross compiler
Posted: Sat Aug 21, 2021 4:50 am
by ark
Maddie wrote:Just use a cross-compiler. It's very easy if you follow the instructions on the wiki, and it will save you a lot of trouble to have a toolchain specific to your OS.
I have built the cross compiler many times and also used the prebuilt ones. It is actually harder to get working on ubuntu than on arch.
Re: Is it really a have to to use a cross compiler
Posted: Sun Aug 22, 2021 4:05 am
by iansjack
It's not essential to use a cross-compiler. It just makes development easier and less error prone. In fact, it's not essential to use a compiler, or even an assembler. But, in all these cases, you are making life difficult for yourself if you don't choose the right tools.