Find the answer to your Linux question:
Results 1 to 5 of 5
What you guys make of these optimizations? I know -ffast-math can be dodgy but it's supposed to be stable enough for a ~x86 desktop box, plus from what I hear ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    83

    CFLAGS


    What you guys make of these optimizations? I know -ffast-math can be dodgy but it's supposed to be stable enough for a ~x86 desktop box, plus from what I hear there's a noticable performance increase. I omitted -funroll-loops because of the problems I've heard it can cause with the kernel (Im building the kernel and bootstrapping with very basic flags anyway), and the amount of bloat it creats.

    Code:
    CFLAGS="-O3 -pipe -finline-functions -fgcse -fmove-all-movables -fomit-frame-pointer
    -falign-functions=4 -falign-jumps=4 -fvisibility-inlines-hidden -fweb -fmerge-all-constants
    -ffast-math -ftracer -fprefetch-loop-arrays -march=pentium4 -mtune=pentium4"
    My cpu is a Intel Celeron (Northwood P4 core), so it's basically a pentium 4 with a **** cache.

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    Code:
    CFLAGS="-O3 -march=pentium2 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
    is what I have for my PII 300MHz machine.
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  3. #3
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    Something like this:
    Code:
    CFLAGS="-Os -march=atlhon-tbird -fomit-frame-pointer -pipe -mmmx -m3dnow -fforce-addr
    I don't think I've compiled an entire system with -O3 before, but I've used -O2 and -Os.

    I used to use -ffast-math, but I removed it after seing the warning in the GCC manual. Can you notice a huge performance gain?

  4. #4
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    Code:
    CFLAGS="-O2 -march=i486 -mcpu=i686"
    Just regular stuff, since what I compile must be usable on other boxes too.
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  5. #5
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    Odessa, FL
    Posts
    586
    mine's pretty simple:

    Code:
    CFLAGS="-march=athlon-mp -mfpmath=sse -m3dnow -m32 -pipe -O3 -fomit-frame-pointer"
    it's a dual-cpu machine...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •