OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Mar 18, 2024 10:40 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Error building cross compiler
PostPosted: Fri Jan 08, 2016 1:28 am 
Offline
Member
Member

Joined: Sat Dec 19, 2015 10:48 am
Posts: 42
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.


Top
 Profile  
 
 Post subject: Re: Error building cross compiler
PostPosted: Fri Jan 08, 2016 1:32 am 
Offline
Member
Member
User avatar

Joined: Thu Aug 11, 2005 11:00 pm
Posts: 1109
Location: Tartu, Estonia
What is your target triplet?

_________________
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS


Top
 Profile  
 
 Post subject: Re: Error building cross compiler
PostPosted: Fri Jan 08, 2016 1:56 am 
Offline
Member
Member

Joined: Sat Dec 19, 2015 10:48 am
Posts: 42
XenOS wrote:
What is your target triplet?


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.


Top
 Profile  
 
 Post subject: Re: Error building cross compiler
PostPosted: Fri Jan 08, 2016 2:32 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
What have you set the environment variable $TARGET to? What about $PREFIX?


Top
 Profile  
 
 Post subject: Re: Error building cross compiler
PostPosted: Fri Jan 08, 2016 12:47 pm 
Offline
Member
Member

Joined: Sat Dec 19, 2015 10:48 am
Posts: 42
iansjack wrote:
What have you set the environment variable $TARGET to? What about $PREFIX?


export PREFIX="$HOME/cross"
export TARGET=i686-elf
export PATH="$PREFIX/bin:$PATH"


Top
 Profile  
 
 Post subject: Re: Error building cross compiler
PostPosted: Fri Jan 08, 2016 5:42 pm 
Offline
Member
Member

Joined: Sat Mar 28, 2015 12:50 pm
Posts: 31
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.


Top
 Profile  
 
 Post subject: Re: Error building cross compiler
PostPosted: Sat Jan 09, 2016 4:38 am 
Offline
Member
Member

Joined: Sat Dec 19, 2015 10:48 am
Posts: 42
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.


I was doing:
make,
make all-gcc,
make all-target-libgcc.

Wrong. Thanks for your help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group