LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Help me to create a 2nd GCC version... (https://www.linuxquestions.org/questions/linux-software-2/help-me-to-create-a-2nd-gcc-version-25190/)

SilverSnake 07-06-2002 11:03 AM

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.

verigoth 07-06-2002 05:51 PM

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

SilverSnake 07-07-2002 08:37 AM

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).

verigoth 07-11-2002 07:05 PM

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


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