I'm trying to make a bash
script that will install a gcc cross-compiler for i686-elf on a Debian computer, but I keep getting the same error:
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --disable-nls, --enable-languages, --without-headers
make: *** No rule to make target 'all-gcc'. Stop.
make: *** No rule to make target 'all-target-libgcc'. Stop.
make: *** No rule to make target 'install-gcc'. Stop.
make: *** No rule to make target 'install-target-libgcc'. Stop.
Does anyone have any idea why these options aren't recognized? I've installed this version before without this problem.
In case it helps, here's my script:
####################################
echo Stage 1 - Building Dependencies
####################################
# make a working directory
cd $HOME/Documents
rm -rf Cross
mkdir Cross
cd Cross
# install or update all apt-get dependencies
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gcc # not cross
sudo apt-get install g++
sudo apt-get install make
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install gawk
sudo apt-get install libgmp3-dev
sudo apt-get install libmpfr-dev libmpfr-doc libmpfr4 libmpfr4-dbg
sudo apt-get install mpc
sudo apt-get install texinfo # optional
sudo apt-get install libcloog-isl-dev # optional
sudo apt-get install build-essential
sudo apt-get install glibc-devel
sudo apt-get -y install gcc-multilib libc6-i386
# download and unpack necessary files
wget http://ftpmirror.gnu.org/binutils/binutils-2.25.1.tar.gz
wget http://ftpmirror.gnu.org/gcc/gcc-5.3.0/gcc-5.2.0.tar.gz
wget http://ftpmirror.gnu.org/mpc/mpc-1.0.3.tar.gz
for f in *.tar*; do tar xf $f; done
mv mpc-1.0.3 gcc-5.2.0
# create installation directory
sudo mkdir -p /opt/cross
sudo chown user /opt/cross
export PREFIX=/opt/cross
export TARGET=i686-elf
export PATH="$PREFIX/bin:$PATH"
################################
echo Stage 2 - Building Compiler
################################
# install binutils
mkdir build-binutils
cd build-binutils
../binutils-2.25.1/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror
make
make install
cd ..
# install gcc
mkdir build-gcc
cd build-gcc
../gcc-5.2.0/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers
make all-gcc
make all-target-libgcc
make install-gcc
make install-target-libgcc
tar zxf $f
ortar zvxf $f
z
for gzip files. Anyway, I could duplicate your problem with the gcc-5.2.0. But when I downloaded gcc-5.3.0, I was able to make it work.