unable to build gcc 4.9.0 for i686-elf target with posix threads
Jonathan Wakely
jwakely.gcc@gmail.com
Wed Jul 2 13:00:00 GMT 2014
On 2 July 2014 13:43, Ragnar Rüütel wrote:
> Hi,
>
> I've been trying to wrap my head around this for weeks and I'm almost
> ready to give up. I need a i686-elf compiler to build generic linux
> binaries.
What do you mean by "generic linux binaries"?
With no dependency on a C library?
Why do you need "i686-elf" rather than e.g. i686-unknown-linux-gnu ?
What are you actually trying to do in the end?
> So, first I created native compiler
Native to what? What system are you building on?
> (like advised here:
> http://wiki.osdev.org/Building_GCC) into
> /home/ragnar/cpp-tools/compiler/local/gcc. Then exported these:
>
> export CC="/home/ragnar/cpp-tools/compiler/local/gcc/bin/gcc"
> export CXX="/home/ragnar/cpp-tools/compiler/local/gcc/bin/g++"
> export CPP="/home/ragnar/cpp-tools/compiler/local/gcc/bin/cpp"
> export LD="/home/ragnar/cpp-tools/compiler/local/gcc/bin/ld"
> export PATH="/home/ragnar/cpp-tools/compiler/local/gcc/bin:$PATH"
> export LD_LIBRARY_PATH="/home/ragnar/cpp-tools/compiler/local/gcc/lib32"
>
> and started to build i686-elf compiler (as advised here
> http://wiki.osdev.org/GCC_Cross-Compiler) with following commands:
>
> #GMP
> $gmp_src/configure
> --prefix="/home/ragnar/cpp-tools/compiler/linux32/gcc" --enable-cxx
> --disable-shared
> make CPPFLAGS="-fexceptions"
> make install
> #MPFR
> $mpfr_src/configure
> --prefix="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --with-gmp="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --disable-shared
> make
> make install
> #MPC
> $mpc_src/configure
> --prefix="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --with-gmp="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --with-mpfr="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --disable-shared
> make
> make install
> export LD_LIBRARY_PATH="/home/ragnar/cpp-tools/compiler/linux32/gcc/lib:$LD_LIBRARY_PATH"
> #BINUTILS
> $binutils_src/configure
> --prefix="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --target=i686-elf --disable-multilib
> --with-gmp="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --with-mpfr="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --with-mpc="/home/ragnar/cpp-tools/compiler/linux32/gcc" --disable-nls
> --disable-shared --disable-werror
> make
> make check
> make install
Why did you do this? The instructions you said you're following don't do this.
I no longer help people who install gmp, mpfr and mpc manually and ask for help.
> #GCC
> $gcc_src/configure
> --prefix="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --target=i686-elf --enable-32bit --disable-64bit
> --enable-languages="c,c++" --disable-multilib --enable-libssp
> --enable-threads=posix --disable-nls --disable-shared
> --with-gmp="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --with-mpfr="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --with-mpc="/home/ragnar/cpp-tools/compiler/linux32/gcc"
> --enable-checking=release --enable-lto
> --enable-version-specific-runtime-libs
> make all-gcc
> make all-target-libgcc
Where is the --without-headers option that the wiki.osdev.org
instructions say to use?
Why are you surprised it doesn't work if you don't follow the
instructions properly?
More information about the Gcc-help
mailing list