Author Topic: compiler flags for core i7  (Read 4609 times)

Offline alle_meije

  • Multiple posting newcomer
  • *
  • Posts: 29
compiler flags for core i7
« on: January 28, 2011, 11:58:09 am »
Hi,

I have been building the Debug version of my program with all the warnings etc on, now I want to make everything as fast as possible in the Release version. My computer has a core i7 processor so a march=XXXXX option should be able to make good use of that.

But what is XXXXX for a core i7 computer? For gcc versions upwards of 4.2 (I have 4.4.5) it seems that "-march=generic" and "-march=native" seem to be safe options. But they are not in Code::Blocks' standard list.

Can I just add one of those in "other options"? Or is it better to choose one of the ones in the list (e.g. Intel Core2 or Athlon64)?

Thanks!
Alle Meije

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: compiler flags for core i7
« Reply #1 on: January 28, 2011, 12:02:44 pm »
You can add any flags in other options.
If they also exist in the compiler flags, they will "magically" disappear from other options and appear in compiler flags, if you open the build options the next time.
This is wrong, if I remeber right it was done this way, but I am not sure about.
Nevertheless compiler flags, seem to have precedence over opther options, this means if a flag is set in other options, but exists in compiler flags (and is not set there) it will be unset.

Sorry for the misinformation.
« Last Edit: January 28, 2011, 12:23:32 pm by jens »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: compiler flags for core i7
« Reply #2 on: January 28, 2011, 03:47:13 pm »
i7 support seems to be added in 4.6 - http://gcc.gnu.org/gcc-4.6/changes.html
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]