LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-06-2002, 12:03 PM   #1
SilverSnake
LQ Newbie
 
Registered: May 2002
Location: Linköping, Sweden
Distribution: RedHat 7.3
Posts: 15

Rep: Reputation: 0
Question Help me to create a 2nd GCC version...


Heya.

I'm so delighted with the good help I've had with me previous two problems I thought I'd come back for some more help.... This time it's not a problem but rather a wish to do something I'm not sure how to acomplish...

I want to recompile GCC as a crosscompiler, but without replacing my old one as I still want to be able to compile stuff for my linux machine. I guess this isn't really a problem as I just need to change where to install it. The problem is that the perticular crosscompiler I intend to do requires a recompiled version of binutils, which I don't want to replace my old ones either...

So I want to first make a new binutil compilation, then using those binutils make a new GCC compilation and then I want in some easy way use this new GCC without having to be in a certain dir or use it's full path (e.g. rename it to gcc2 or ccg or whatever, if that's possible).

If anyone curious I want a compiler for ARM/ELF architecture (i.e. for GBA games).

Thanks in Advance!

SilverSnake.
 
Old 07-06-2002, 06:51 PM   #2
verigoth
Member
 
Registered: May 2002
Posts: 179

Rep: Reputation: Disabled
what you want to do is use ./configure --prefix=/usr/local/cross and then when you want to use it, export PATH=/usr/local/cross:$PATH
unless you want to build the executables and rename them by hand...which wouldn't really work because for example, gcc calls ld, and if you have ld named as cld or whatever it will call the native linker thereby not linking it to your specified platform...hope that makes sense

verigoth

Last edited by verigoth; 07-06-2002 at 06:53 PM.
 
Old 07-07-2002, 09:37 AM   #3
SilverSnake
LQ Newbie
 
Registered: May 2002
Location: Linköping, Sweden
Distribution: RedHat 7.3
Posts: 15

Original Poster
Rep: Reputation: 0
I should use the --prefix=/usr/local/cross for binutils or for gcc? Because I need to recompile a special version of binutils for my crosscompiler that it must use... I don't really know what binutils do and what it's used for, but in all isntructions I've read it says I need to compile a special version of those, but most instructions is for use with CygWin...

Thanks for the reply tho... Still not sure how to solve it other then how to have 2 GCC now. Still need to know how to make my 2nd GCC using my 2nd binutils (and not get a binutil conflict when making that one).
 
Old 07-11-2002, 08:05 PM   #4
verigoth
Member
 
Registered: May 2002
Posts: 179

Rep: Reputation: Disabled
binutils is the linker, assembler, and some other cool tools. you need to use the --prefix option for every utility used by the cross-compiler. this usually includes binutils, gcc, glibc, and maybe a few other libraries

verigoth
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 03:54 PM
trying to create 2nd firewall jimieee Linux - Networking 1 05-14-2005 06:58 AM
redhat fedora gcc version (compiled for 2.4.20) doesn't match kernel version 2.4.22 start1000 Linux - Software 0 03-16-2004 09:17 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 01:07 AM
Sample Driver Module incompatibility with Kernel version (or gcc version) jvs Linux - General 1 06-07-2002 02:40 AM


All times are GMT -5. The time now is 10:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration