os-tutorial icon indicating copy to clipboard operation
os-tutorial copied to clipboard

macOS install gcc cross compiler error

Open backsapce opened this issue 6 years ago • 3 comments

follow configure step is right for me

./configure --prefix=$PREFIX \
--target=$TARGET \
--disable-nls \
--enable-languages=c,c++ --without-headers \
--enable-interwork --enable-multilib \
--with-gmp=/usr/local/Cellar --with-mpc=/usr/local/Cellar --with-mpfr=/usr/local/Cellar

the gmp mpc mpfr must target to /usr/local/Cellar.because they are install with brew

backsapce avatar Jun 28 '18 13:06 backsapce

I used these flags in configure that works for gcc 5.2:

./configure --prefix=$PREFIX --target=$TARGET --disable-nls \
--enable-languages=c --without-headers --disable-multilib --with-sysroot --disable-werror
--disable-nls

TravorLZH avatar Aug 20 '18 13:08 TravorLZH

I used homebrew package manager. It worked for me.

brew tap nativeos/i386-elf-toolchain 
brew install i386-elf-binutils i386-elf-gcc

KazumaTakata avatar Nov 06 '18 01:11 KazumaTakata

The following worked for me

../gcc-8.2.0/configure --target=$TARGET --prefix=$PREFIX --disable-nls --disable-libssp --enable-languages=c,c++ --without-headers --enable-interwork --enable-multilib --with-gmp=/usr/local/Cellar/gmp/6.1.2_2 --with-mpfr=/usr/local/Cellar/mpfr/4.0.1 --with-mpc=/usr/local/Cellar/libmpc/1.1.0

bbbbx avatar Nov 20 '18 14:11 bbbbx