Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-27-2004, 12:42 AM
|
#1
|
Member
Registered: Jun 2004
Distribution: CLFS
Posts: 523
Rep:
|
configuring a cross compiler
Hi,
I recently downloaded the new version of gcc(3.4.2).I want to replace the 3.3 version that I have now.My question is how do I configure it as a cross compiler(is my terminology correct?).What is the difference between a cross compiler and a straight one?Which should be better?If I don't have a compiler loaded on the system,then how do I configure gcc?
ALso, when I downloaded gcc,I also downloaded the g++,ada,java and the other libraries that come along with the release.How do i utilize these?Or does the main pack suffice?Please advise.
|
|
|
09-27-2004, 01:57 AM
|
#2
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
A cross compiler is a compiler running on an architecture (eg. Linux/i386) that builds binaries suitable for another architecture (eg. Solaris/SPARC).
I don't think it is your goal.
|
|
|
09-27-2004, 03:05 AM
|
#3
|
Member
Registered: Jun 2004
Distribution: CLFS
Posts: 523
Original Poster
Rep:
|
thanks for the info,mate.But my other questino is still unanswered.What do I do with the other packages that come with gcc.Please help
|
|
|
09-27-2004, 02:39 PM
|
#4
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
The answer depends on the distribution you are using, and specially the packaging used.
The simple way is to ask your software/package manager application to first uninstall your previous gcc and then to install the new one, taking care of all the dependancy stuff.
Can't be more specific without more clues about what you have downloaded and on what distro you want to install it.
|
|
|
09-29-2004, 12:46 AM
|
#5
|
Member
Registered: Jun 2004
Distribution: CLFS
Posts: 523
Original Poster
Rep:
|
Hi,
sorry for missing out on the info.I'm running fedora core2 and I downloaded the gcc 3.4.2 release from the gnu mirror as bzipped files.Again I ask you,will the main gcc package suffice or will I need to install the gcc-core,gcc-ada,gcc-++ and the g77 packages too?Well,the other packs don't come with a configure script or a make file.How do I get about with these?
|
|
|
09-29-2004, 02:15 AM
|
#6
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
You are trying the hard way.
As you certainly know, linux software can be distributed as a package (rpm or other) or as a "blob" (tarballs, bzipped ...).
When you choose the package way, you are lucky that all the dependancies processing, installation and uninstallation tasks are automatically done for you by the installer (it should be yum, yumgui or apt on fedora core).
When you choose the blob option, you are likely to mess up your system by overwriting files and unsynchronizing what your installer thinks is there and what is actually on the disk.
To minimize the risk, better for you to look what gcc packages are currently installed on your PC, uninstall them and then install the matching bzips.
The simpler alternative is to find already built gcc 3.4.2 packages (perhaps on unofficial fedora archives) and work with them.
|
|
|
09-29-2004, 02:21 AM
|
#7
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
Just a few more words,
from your last posting, it seems you are downloading gcc under source form.
This is increasing the complexity of the installation operation, as you cannot uninstall the previous compiler because it is needed to build the new one.
Perhaps one way to overcome that is to configure the new compiler to install itself in a non standard location, so you can have both installed in parallel.
|
|
|
09-29-2004, 02:36 AM
|
#8
|
Member
Registered: Jun 2004
Distribution: CLFS
Posts: 523
Original Poster
Rep:
|
Thanks for the help jlliagre.i got what you're trying to imply. I know that to make the packages a compiler is required.But what happens when a system is built from scratch,not using pre-compiled binaries?how are the packs installed then?
|
|
|
09-29-2004, 02:53 AM
|
#9
|
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246
Rep:
|
The first compiler ever was an assembler written in machine code I'm sure. And then the first C compiler was probably written in assembly...but nowadays I'm sure they just modify a pre-existing compiler to spit out an executable designed for a new system (i.e. cross-compiling).
|
|
|
09-29-2004, 02:57 AM
|
#10
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
Chicken and egg problem 
|
|
|
09-29-2004, 03:13 AM
|
#11
|
Member
Registered: Jun 2004
Distribution: CLFS
Posts: 523
Original Poster
Rep:
|
Thanks again mate.I hope that your advise will help me a lot on this issue.
Another thing though,do you code in ADA?if you do where did you learn it,coz i heard that it's development has been stopped.How can i learn ADA (maybe thru the net with som tutorials??).i'm sure nobody teaches ADA 'bout my place.
|
|
|
All times are GMT -5. The time now is 06:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|