LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 08-31-2004, 08:17 PM   #1
enigma Z
Member
 
Registered: Sep 2003
Location: The edge of the world, peering down into the dark abyss
Distribution: Gentoo 2004.2
Posts: 224

Rep: Reputation: 30
What are the effects of using the march and mcpu CFLAGS?


What does g++, gcc, etc do if I supply both an march and an mcpu flag when I compile?

example:

CFLAGS="-march=athlon-tbird -02 -mcpu=i686 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
 
Old 09-01-2004, 12:30 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
specifying -march=cpu-type implies -mcpu=cpu-type.
so just use -march is the thing to do
however if you use both like your example
-march=athlon-tbird -mcpu=i686
then gcc will use the machine instruction for a i686 that don't destroy compatibility to the architecture (cpu) specified with -march in this case athlon-tbird
i think but can't swear to it and i don't know where this is implemented in the gcc code
the documentation for gcc is non existent so i'm just repeating what some else told me once
(yet another gcc rumor)
seems like quite a nightmare when you think about it though implementing that ?
 
Old 09-01-2004, 05:54 AM   #3
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
Quote:
Originally posted by foo_bar_foo

i think but can't swear to it and i don't know where this is implemented in the gcc code
the documentation for gcc is non existent so i'm just repeating what some else told me once
(yet another gcc rumor)
seems like quite a nightmare when you think about it though implementing that ?
Say what???? - http://gcc.gnu.org/onlinedocs/

Anything you never wanted to know and more is documented there.
 
  


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
cflags exodist Linux - Software 2 01-14-2005 08:44 PM
gcc march agdepus Programming 8 05-26-2004 10:11 AM
CFLAGS library -l and -i abs Programming 2 04-11-2004 11:03 PM
how to unset cflags? shanenin Linux - Software 4 01-25-2004 10:36 PM
mcpu vs march Spaz17 Linux - Newbie 6 12-31-2003 01:28 AM


All times are GMT -5. The time now is 12:19 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