LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-01-2011, 08:55 PM   #1
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Post G++ Error.


Code:
Andrew@Mac:~$ g++ -march=athlon64-sse3 -O2 Projects/omgarrays.cpp -o Desktop/omg
Projects/omgarrays.cpp:1: error: bad value (athlon64-sse3) for -march= switch
Projects/omgarrays.cpp:1: error: bad value (athlon64-sse3) for -mtune= switch
http://gcc.gnu.org/onlinedocs/gcc/i3...4-Options.html
Quote:
Originally Posted by GNU
k8-sse3, opteron-sse3, athlon64-sse3
Improved versions of k8, opteron and athlon64 with SSE3 instruction set support.
Why am I getting this error?
 
Old 04-01-2011, 08:58 PM   #2
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022

Original Poster
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Also,
Code:
Andrew@Mac:~$ g++ -march=native -O2 Projects/omgarrays.cpp -o Desktop/omg
Projects/omgarrays.cpp:1: error: bad value (native) for -march= switch
Projects/omgarrays.cpp:1: error: bad value (native) for -mtune= switch
http://gcc.gnu.org/onlinedocs/gcc/i3...4-Options.html
Quote:
Originally Posted by GNU
native
This selects the CPU to tune for at compilation time by determining the processor type of the compiling machine. Using -mtune=native will produce code optimized for the local machine under the constraints of the selected instruction set. Using -march=native will enable all instruction subsets supported by the local machine (hence the result might not run on different machines).
WTF?
 
Old 04-01-2011, 09:49 PM   #3
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
Quote:
Originally Posted by lupusarcanus View Post
Also,
Code:
Andrew@Mac:~$ g++ -march=native -O2 Projects/omgarrays.cpp -o Desktop/omg
Projects/omgarrays.cpp:1: error: bad value (native) for -march= switch
Projects/omgarrays.cpp:1: error: bad value (native) for -mtune= switch
What version of g++ are you using? Please tell what
Code:
g++ --version
gcc --version
report. It's quite possible you're using an old or a butchered version of gcc.
 
Old 04-01-2011, 09:57 PM   #4
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022

Original Poster
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
4.5.2
 
Old 04-01-2011, 10:07 PM   #5
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022

Original Poster
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Hey, I found the solution. While I was using Mac OS X and Xcode's version of GCC, I used MacPorts to install vanilla GCC 4.5.2. Only, I aliased gcc and not g++. So when I was trying to run that command, it was with Apple's version not vanilla GCC. With 4.5.2 vanilla it works just fine. Sorry about that. Dumb, obvious mistake.
 
  


Reply



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
[SOLVED] Google-Chrome Error (Error 9 (net::ERR_UNEXPECTED): Unknown error) smoooth103 Slackware 4 12-04-2010 07:42 PM
[SOLVED] php5 ./configure error: (FILENAME=- FNR=27) fatal error: internal error richinsc Linux - Software 2 07-08-2010 09:20 AM
Memory error: extended error chipkill ecc error rajivdp Linux - Hardware 1 12-07-2009 08:26 AM
Sendmail: eocket wedge , 504 error , dsn error, mail relay connection error djcs Debian 0 03-03-2009 12:41 AM
Suse CUPS error: cups(File)DoRequest error:client-error-bad-request smdonelan Linux - Hardware 6 04-17-2007 06:46 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:52 AM.

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
Open Source Consulting | Domain Registration