LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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

Reply
 
Search this Thread
Old 04-07-2010, 02:47 AM   #1
anhvuitinh
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Rep: Reputation: 0
Question gcc error with -mtune option


I am trying to compile a hello world program to run on a powerpc processor. I used GCC 4.4.1 from Ubuntu 9.10 on a X86 (PC) platform.

> gcc -g -Wall -mtune=powerpc ./hello.c
./hello.c:1: error: bad value (powerpc) for -mtune= switch

Which value should I use to indicate powerpc architecture? Thanks.
 
Old 04-07-2010, 03:33 AM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by anhvuitinh View Post
I am trying to compile a hello world program to run on a powerpc processor. I used GCC 4.4.1 from Ubuntu 9.10 on a X86 (PC) platform.

> gcc -g -Wall -mtune=powerpc ./hello.c
./hello.c:1: error: bad value (powerpc) for -mtune= switch

Which value should I use to indicate powerpc architecture? Thanks.
And what does 'gcc' documentation say ? Just look in it for 'mtune'.

And why do you need '-mtune' for such a simple program ? The command line switch is used in order to obtain maximum performance.

Last edited by Sergei Steshenko; 04-07-2010 at 03:34 AM.
 
1 members found this post helpful.
Old 04-07-2010, 07:24 PM   #4
anhvuitinh
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks, a4Z.
I think this is what I need, a cross-compiler. I'll try it tonight.
 
  


Reply

Tags
gcc


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
gcc-giving error as as: unrecognized option `-Qy' nidhimittal Linux - Newbie 4 03-27-2008 05:44 AM
gcc/g++ option nuxrl Programming 1 11-30-2006 01:36 PM
gcc -I option vkmgeek Programming 18 05-16-2006 06:27 PM
SUSE 9.3 using DBD:mysql - mtune error (!!?) ivanrolim Suse/Novell 2 04-28-2006 04:46 AM
gcc option -E use. niverson Programming 2 10-11-2004 04:06 PM


All times are GMT -5. The time now is 12:37 PM.

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