Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
|
 |
12-02-2011, 07:23 AM
|
#1
|
Member
Registered: Nov 2011
Posts: 31
Rep: 
|
Cross compiling
Hi,
i wanted to use glibc-gcc to cross compile from a ubuntu machine (2.6.35) to a mips32r2 platform. While checking the man pages for gcc I can see that there are options like -march which can be set to mips32r2. Does that mean that I dont need to download and build a cross compiler? Can I use the one installed in my machine to cross compile for mips. If this is possible can some one please type out the entire command to compile a simple hello world program for mips
Versions of my utilities are:
kernel : 2.6.35
gcc: 4.4.5.
glibc: 2.12.1
binutils: 2.20.51
Thanks
|
|
|
Click here to see the post LQ members have rated as the most helpful post in this thread.
|
12-02-2011, 09:30 PM
|
#2
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
Have you heard of crosstool-ng before? http://crosstool-ng.org/
I have used this in the past, and worked very well for what I needed to do.
|
|
|
12-03-2011, 08:08 AM
|
#3
|
Member
Registered: Nov 2011
Posts: 31
Original Poster
Rep: 
|
I have heard of crosstool-ng, but that was not my doubt. What I wanted to know was if I want to cross compile for mips, using glibc-gcc do I need to build a cross compiler or can I use the one installed in my PC.
Thanks
|
|
|
12-03-2011, 09:03 AM
|
#4
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
You need a cross compiler. In fact, you need a cross toolchain, and to create one, I strongly recommend Crosstool-NG.
--- rod.
|
|
2 members found this post helpful.
|
12-03-2011, 12:35 PM
|
#5
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
Quote:
Originally Posted by theNbomr
You need a cross compiler. In fact, you need a cross toolchain, and to create one, I strongly recommend Crosstool-NG.
--- rod.
|
Thanks for saying the same thing I did, in a nutshell 
|
|
|
12-03-2011, 01:30 PM
|
#6
|
Member
Registered: Nov 2011
Posts: 31
Original Poster
Rep: 
|
I think my language skills are worse than my linux :P. Let me try to rephrase my question. In the man page for gcc there is something called MIPS Options. What is it?
|
|
|
All times are GMT -5. The time now is 07:32 PM.
|
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
|
|