I'm using Ubuntu 14.04 on a 32-bit pc. I just compiled gcc 4.9.3 and binutils 2.25, per OSDev instructions. I have tried to compile a cross compiler but I am getting an error I can't resolve:
configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
I read everything I could find about this error which mostly are written by people trying to build a cross compiler. The articles go back several years with different comments and suggestions on how to fix the problem. I've tried several of the recomendations such as editing lines in files 'libstdc++v3/acinclude.m4' and 'configure.ac', or adding other options after the 'configure' command.
Per OSDev I am using the command
../gcc-4.9.3/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers.
Does anyone here know how to resolve the error? I'can't go any further and I've run out of clues.
TIA. Bill S.
Error building cross compiler
- xenos
- Member
- Posts: 1118
- Joined: Thu Aug 11, 2005 11:00 pm
- Libera.chat IRC: xenos1984
- Location: Tartu, Estonia
- Contact:
Re: Error building cross compiler
What is your target triplet?
Re: Error building cross compiler
I'm not sure what 'target triplet' means. i686, ELF format. I will be developing for 32-bit pc. I am running Ubuntu 14.04.XenOS wrote:What is your target triplet?
Re: Error building cross compiler
What have you set the environment variable $TARGET to? What about $PREFIX?
Re: Error building cross compiler
export PREFIX="$HOME/cross"iansjack wrote:What have you set the environment variable $TARGET to? What about $PREFIX?
export TARGET=i686-elf
export PATH="$PREFIX/bin:$PATH"
Re: Error building cross compiler
I'm assuming you just typed "make" instead of "make all-gcc" followed by "make all-target-libgcc".
Just typing "make" tries to build libstdc++ as well, which can't be done in a freestanding configuration. Please read the instructions here.
Just typing "make" tries to build libstdc++ as well, which can't be done in a freestanding configuration. Please read the instructions here.
Re: Error building cross compiler
I was doing:yr wrote:I'm assuming you just typed "make" instead of "make all-gcc" followed by "make all-target-libgcc".
Just typing "make" tries to build libstdc++ as well, which can't be done in a freestanding configuration. Please read the instructions here.
make,
make all-gcc,
make all-target-libgcc.
Wrong. Thanks for your help.