LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 12-02-2011, 08:23 AM   #1
qwerty4061
Member
 
Registered: Nov 2011
Posts: 31

Rep: Reputation: Disabled
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.
Old 12-02-2011, 10:30 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
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.
 
Old 12-03-2011, 09:08 AM   #3
qwerty4061
Member
 
Registered: Nov 2011
Posts: 31

Original Poster
Rep: Reputation: Disabled
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
 
Old 12-03-2011, 10:03 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
Old 12-03-2011, 01:35 PM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by theNbomr View Post
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
 
Old 12-03-2011, 02:30 PM   #6
qwerty4061
Member
 
Registered: Nov 2011
Posts: 31

Original Poster
Rep: Reputation: Disabled
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?
 
  


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
Cross-compiling v/s cross-building kushalkoolwal Programming 3 05-13-2009 06:49 AM
Cross compiling Mike Davies Linux - Kernel 4 04-04-2007 11:59 AM
Cross Compiling dosnlinux Programming 5 03-01-2006 12:12 PM
cross-compiling? jon_k Programming 3 12-09-2004 10:36 AM
cross compiling with g++ hornofsalvation Linux - Newbie 2 10-09-2004 11:29 PM


All times are GMT -5. The time now is 09:24 PM.

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