Open gmarino2048 opened 4 years ago
Another solution which can not bother running cross compilation ourselves:
brew install i686-elf-binutils
brew install i686-elf-gcc
brew install i386-elf-gdb
then in Makefile
:
CC = /usr/local/opt/i686-elf-gcc/bin/i686-elf-gcc
LD = /usr/local/opt/i686-elf-binutils/bin/i686-elf-ld
GDB = /usr/local/opt/i386-elf-gdb/bin/i386-elf-gdb
Hope this help: https://wiki.osdev.org/User:Max/Building_a_GCC_4.9_cross_compiler_on_OS_X_Mavericks
Notice that set the envs:
export CC=gcc-4.9
export CXX=g++-4.9
export CPP=cpp-4.9
export LD=gcc-4.9
Simple workaround is to set CPATH to /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/. This took me 3 hours to figure out, so I'm hoping this will help someone in the future. If you don't have the 10.14 SDK, you can get it here:
https://github.com/phracker/MacOSX-SDKs