cfenollosa / os-tutorial

How to create an OS from scratch
BSD 3-Clause "New" or "Revised" License
26.62k stars 3.24k forks source link

cross-compiler for M1 MacBook? #248

Open ge1mina023 opened 2 years ago

ge1mina023 commented 2 years ago

I am using M1 MacBook Pro for this turotial. I am stuck in chapter 11. Is there any way to build a cross-compiler for my M1 MacBook?

After make all install 2>&1 | tee make.log, I got feedback as below. Screen Shot 2022-07-05 at 11 07 23

firestar4204 commented 2 years ago

I'm on M1 Macbook Air. All I did was brew install i686-elf-gcc or something along those lines.

ge1mina023 commented 1 year ago

I'm on M1 Macbook Air. All I did was brew install i686-elf-gcc or something along those lines.

brew install i686-elf-gcc is only one thing I need do for building a cross-compiler?

firestar4204 commented 1 year ago

you don't even need to build a cross-compiler after that. just use the i686-elf-gcc as your cross-compiler (it's i686 instead of i386, but it will still work)

ge1mina023 commented 1 year ago

you don't even need to build a cross-compiler after that. just use the i686-elf-gcc as your cross-compiler (it's i686 instead of i386, but it will still work)

@firestar4204 Is there anything else I need to do besides brew install i686-elf-gcc

firestar4204 commented 1 year ago

Is there anything else I need to do besides brew install i686-elf-gcc

nope, but i386-elf-gdb is available instead of i686-elf-gdb, I think. That's what I used

ge1mina023 commented 1 year ago

Is there anything else I need to do besides brew install i686-elf-gcc

nope, but i386-elf-gdb is available instead of i686-elf-gdb, I think. That's what I used

@firestar4204 Why didn't you use brew install i386-elf-gcc?

firestar4204 commented 1 year ago

because it redirects you to x86_64-elf-gcc

ge1mina023 commented 6 months ago

because it redirects you to x86_64-elf-gcc

Is there any solution for Lesson 24 for the same M1 MacBook pro?@firestar4204

firestar4204 commented 6 months ago

It shouldn't matter (M1 macs don't support El Capitan), but just make sure to brew upgrade every once in a while

ge1mina023 commented 6 months ago

It shouldn't matter (M1 macs don't support El Capitan), but just make sure to brew upgrade every once in a while

@firestar4204 All I need to do is brew upgrade for lesson 24?