diff --git a/configure.sh b/configure.sh index d1023a2..5dabd79 100755 --- a/configure.sh +++ b/configure.sh @@ -72,6 +72,13 @@ ln -sf $(command -v sh-elf-ranlib) sh3eb-elf/bin/ranlib cd build +# OpenBSD apparently installs these in /usr/local +if [[ $(uname) == "OpenBSD" ]]; then + extra_args="--with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local" +else + extra_args= +fi + echo "$TAG Configuring gcc..." run_quietly giteapc-configure.log \ -../gcc-$VERSION/configure --prefix="$PREFIX" --target=sh3eb-elf --with-multilib-list=m3,m4-nofpu --enable-languages=c,c++ --without-headers --with-newlib --program-prefix=sh-elf- --enable-libssp --enable-lto +../gcc-$VERSION/configure --prefix="$PREFIX" --target=sh3eb-elf --with-multilib-list=m3,m4-nofpu --enable-languages=c,c++ --without-headers --with-newlib --program-prefix=sh-elf- --enable-libssp --enable-lto $extra_args