LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-09-2004, 10:47 AM   #1
daveschile
LQ Newbie
 
Registered: Jan 2004
Posts: 17

Rep: Reputation: 0
Cross compiler help please


Hello all, and thanks for taking the time to read this.

I'm attempting to get a cross compiler working on my Debian system. I'm new at the concept of cross compiling, so please bear with me.

I am hoping to cross compile from a i386 pc to a big endian MIPS TiVo.

I found a cross compiler, and I'm pretty sure I got it installed okay at /usr/local/mips-tivo what I'm not sure about is how to compile a program with the cross compler instead of the machine just using the the gcc that's installed on the system? How do I know the programs been complied for MIPS as opposed to the native environment of the development machine (the PC)?

Also, if anyone could point me to some how-to on this subject, I'd really appreciate it. I've searched for a week now, and have found info on building the cross compiler, but very little on how to actually use it.

Thanks much
Dave
 
Old 04-09-2004, 07:24 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,547

Rep: Reputation: 180Reputation: 180
"what I'm not sure about is how to compile a program with the cross compler instead of the machine just using the the gcc that's installed on the system? How do I know the programs been complied for MIPS as opposed to the native environment of the development machine (the PC)?"

When you issue the gcc command you include the -b parameter to tell it to cross compile. Without the -b parameter it will compile for the native machine. See:
man gcc
for a detailed explanation.

"Also, if anyone could point me to some how-to on this subject, I'd really appreciate it. I've searched for a week now, and have found info on building the cross compiler, but very little on how to actually use it."

The first place to look is:
man gcc

Here is a gcc HOWTO:
http://gcc.gnu.org/onlinedocs/gcc/

Here is a HOWTO on cross compiling although the object computer is different than yours:
http://www-106.ibm.com/developerwork...r-lnxw02Zaurus

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
  


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 Compiler for H8300 FLLinux Programming 0 11-06-2005 07:24 AM
cross compiler alpha_foobar Linux - General 0 08-17-2005 06:15 PM
Cross compiler !!! hiteshmaisheri Linux - Laptop and Netbook 3 03-05-2005 09:51 AM
cross compiler leonora Programming 2 01-08-2005 11:13 AM
Cross-compiler for x86-64 ogre7299 Linux - Software 0 10-27-2003 11:27 AM


All times are GMT -5. The time now is 08:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration