29jm / SnowflakeOS

"It is very special"
https://jmnl.xyz
MIT License
316 stars 18 forks source link

Some issues with make toolchain #4

Closed Petross404 closed 3 years ago

Petross404 commented 3 years ago

Hello, I recently found your repo and I liked the fact that you keep a blog with your coding adventures.

I decided to clone it locally and build it. But your script downloads the toolchain while not giving the user the option to install either a cross compiler from a deb package on Ubuntu or use crossdev and the existing toolchain on Gentoo and create a cross compiler.

My idea is that, unless you are willing to detect the OS and based on the package management it offers, you could document the generation of a cross compiler in your README for cases like when it's installed system-wide. Maybe your scripts could first ask the user if he wishes to use an existing cross-compiler and where it is located.

I am writing this because compilation of GCC can take up to 2 hours on my Phenom II and I fear that for many others is somewhat the same. I am not feeling right to compile another two hours along side with Portage...

All the best, Petros

29jm commented 3 years ago

Hi Petros, you're right it must be quite annoying having to build a cross compiler when you already have one on hand, I hadn't thought about that. I'll document it asap (currently having a funny debugging session, trying to get ext2 support but encountering fairly fundamental bugs).

Meanwhile, if you have a cross compiler in your path, you can modify the variables at the beginning of the main Makefile (AR, AS, CC, LD) with the name of that compiler's build of those binaries, and make build should work. Thanks for the heads up!

Petross404 commented 3 years ago

Thank you for considering this :) And keep up the interesting work with your blog too, it's nice to have an inside view of the development.

nisarg14 commented 3 years ago

Hello, I'm a B.tech-ICT student at Ahmedabad University. I was wondering if me and my classmates could work on some issue or some new features as part of our Operating Systems class? Thank you!

29jm commented 3 years ago

@Petross404 I've added a section in the readme about using a pre-existing cross compiler instead of compiling it. I preferred not to touch the toolchain script to keep it somewhat simple. Don't hesitate to re-open if my changes to the readme could be clearer or better.
I'll try to keep up with the blog for sure, I love writing it!

@nisarg14 I got back to your email :)

Petross404 commented 3 years ago

@Petross404 I've added a section in the readme about using a pre-existing cross compiler instead of compiling it. I preferred not to touch the toolchain script to keep it somewhat simple. Don't hesitate to re-open if my changes to the readme could be clearer or better. I'll try to keep up with the blog for sure, I love writing it!

I think this is enough, thank you.