1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Optimize generated code with just CPUTYPE

Discussion in 'Installation and Maintenance of Ports or Packages' started by ediondo69, May 5, 2012.

  1. ediondo69

    ediondo69 New Member

    Messages:
    3
    Thanks Received:
    0
    Hi, I'm a noob in the FreeBSD world but I like it. If I just add this line to /etc/make.conf

    Code:
    CPUTYPE?= native  


    Then gcc will set -march=native and -O2 right? Is this simple tuning option enough for a decent output code? May I set -O3? I'm confused because some books I've read said that using -03 will break some ports and the compiler sometimes doesn't detect the right processor, but they were written two or three years ago.

    Thank you, English is not my first language.
     
  2. graudeejs

    graudeejs Well-Known Member

    Messages:
    4,594
    Thanks Received:
    633

    Wrong.
    And you don't need to optimize anything (at least while you're noob. When you will not be noob, then you probably won't want to optimize anyway :) )
     
    ediondo69 thanks for this.
  3. ediondo69

    ediondo69 New Member

    Messages:
    3
    Thanks Received:
    0
    Thank you very much. I'm sorry for my unformatted first post, I didn't know those rules for posting.