Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

CFLAGS Central (Part 2)

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
408 posts
  • Page 17 of 17
    • Jump to page:
  • Previous
  • 1
  • …
  • 13
  • 14
  • 15
  • 16
  • 17
Author
Message
lightvhawk0
Guru
Guru
User avatar
Posts: 388
Joined: Fri Nov 07, 2003 12:59 am

  • Quote

Post by lightvhawk0 » Wed Apr 28, 2010 7:24 am

Mine are pretty simple

-march=native -O2 -msse4.1-pipe

Code: Select all

-O2 turns on all optimization flags specified by -O.  It also turns
           on the following optimization flags: -fthread-jumps
           -falign-functions  -falign-jumps -falign-loops  -falign-labels
           -fcaller-saves -fcrossjumping -fcse-follow-jumps  -fcse-skip-blocks
           -fdelete-null-pointer-checks -fexpensive-optimizations -fgcse
           -fgcse-lm -findirect-inlining -foptimize-sibling-calls -fpeephole2
           -fregmove -freorder-blocks  -freorder-functions
           -frerun-cse-after-loop -fsched-interblock  -fsched-spec
           -fschedule-insns  -fschedule-insns2 -fstrict-aliasing
           -fstrict-overflow -ftree-switch-conversion -ftree-pre -ftree-vrp
I think all of these opts are good enough for me...

Wow I did a test to see what march=native outputted for me and..

Code: Select all

-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2
are my results!
If God has made us in his image, we have returned him the favor. - Voltaire
Top
HeXiLeD
Veteran
Veteran
User avatar
Posts: 1160
Joined: Sat Aug 20, 2005 5:41 pm
Location: Online

  • Quote

Post by HeXiLeD » Wed Apr 28, 2010 8:57 am

5 years with EMT intel cpu (xeon flags) 64 bit:

Code: Select all

CFLAGS="-march=nocona -O2 -mtune=nocona -fforce-addr -ftracer -mmmx -msse3 -mfpmath=sse -pipe"
For the following 2 core cpu:

Code: Select all

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 4
model name	: Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping	: 3
cpu MHz		: 3203.000
cache size	: 2048 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl est cid cx16 xtpr
bogomips	: 6401.10
clflush size	: 64
cache_alignment	: 128
address sizes	: 36 bits physical, 48 bits virtual
power management:

It's a multilib system and i don't run ~packages and the system is rock solid with very very good performance.
But if there is something that can be even more tunned up; i am all hears/eyes ;)
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Top
kreaukmeaus
n00b
n00b
Posts: 33
Joined: Fri Mar 26, 2010 2:02 am

  • Quote

Post by kreaukmeaus » Wed Apr 28, 2010 2:44 pm

Intel Core 2 duo t9300:

Code: Select all

CFLAGS="-march=core2 -msse -msse2 -msse3 -mssse3 -msse4.1 -mfpmath=sse -O2 -pipe"
cat /proc/cpuinfo:

Code: Select all

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     T9300  @ 2.50GHz
stepping        : 6
cpu MHz         : 2493.622
cache size      : 6144 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm ida tpr_shadow vnmi flexpriority
bogomips        : 4987.24
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

This is printed twice with different id's.

Do not take my useflag too serious cause I'm just a newbie.
Feel free to give me some tips or hints. I would be grateful.
Maybe you guys knows some good sites to learn about them.
Top
tomk
Bodhisattva
Bodhisattva
User avatar
Posts: 7221
Joined: Tue Sep 23, 2003 1:41 pm
Location: Sat in front of my computer

  • Quote

Post by tomk » Wed Apr 28, 2010 3:07 pm

Merged from [post=6260584]here[/post].
Search | Read | [topic=119906]Answer[/topic] | [topic=28820]Report[/topic] | [topic=160179]Strip[/topic]
Top
Neskweek
n00b
n00b
User avatar
Posts: 35
Joined: Sun Jun 20, 2004 1:30 pm
Location: Nantes - France

  • Quote

Post by Neskweek » Fri Jul 23, 2010 10:25 am

Hi

I'm actually trying to compile a whole system with those using gcc 4.4.3 :

Code: Select all

CFLAGS="-march=native -O2 -pipe -frecord-gcc-switches -ftree-loop-linear -floop-block -floop-interchange -floop-strip-mine -fgraphite-identity -finline-functions -fira-algorithm=CB -fira-region=mixed -ftree-loop-distribution -ftree-parallelize-loops=2 -mfpmath=both -ftree-loop-ivcanon -ftree-loop-im -ftracer -freorder-blocks-and-partition"
CPU :

cpu family : 15
model : 107
model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4800+

Well when I say a whole system I'm lying :P

I'm at this time I did give up, on a per ebuild bases, some of them :
- because some of them break compilation
- because some of them introduces some nice bugs


But at this moment only a few ebuild required to remove some flags. and here are the flags commonly removed on those ebuilds:

-ftree-parallelize-loops=2. Some ebuilds doesn't seem to rely on pthreads so they don't like that flag

-floop-block -floop-interchange -floop-strip-mine -fgraphite-identity : the graphite package. Well for now on I removed that for a very few ebuilds on the @system pack (I'm not yet playing with the @world ones)

SOmething interesting is that two ebuild (don't remember wich one but I could give you their names later) required to be compiled with -fPIC using those flags
Top
davidogg
n00b
n00b
Posts: 9
Joined: Sun Sep 07, 2003 12:33 am

  • Quote

Post by davidogg » Mon Aug 16, 2010 10:27 pm

codergeek42 wrote:You don't need to add those though. The proper MMX/SSE/3DNow! options are implied by your "-march=" setting.
I'm wondering about this, because on my system;

gcc -Q --help=target -march=k8-sse3

doesn't show many of the flags being turned on.

gcc -Q --help=target -march=native

doesn't turn many on either, and returns the same as;

gcc -Q --help=target -march=mybrain

leaving me wondering if "native" does anything at all.
Top
kernelOfTruth
Watchman
Watchman
User avatar
Posts: 6111
Joined: Tue Dec 20, 2005 10:34 pm
Location: Vienna, Austria; Germany; hello world :)
Contact:
Contact kernelOfTruth
Website

  • Quote

Post by kernelOfTruth » Mon Aug 16, 2010 10:55 pm

davidogg wrote:
codergeek42 wrote:You don't need to add those though. The proper MMX/SSE/3DNow! options are implied by your "-march=" setting.
I'm wondering about this, because on my system;

gcc -Q --help=target -march=k8-sse3

doesn't show many of the flags being turned on.

gcc -Q --help=target -march=native

doesn't turn many on either, and returns the same as;

gcc -Q --help=target -march=mybrain

leaving me wondering if "native" does anything at all.
then it might be a gcc-bug you discovered

it was the same in the recent past with gcc 4.5.0 and intel core i7 mistakenly being set as atom :idea:
https://github.com/kernelOfTruth/ZFS-fo ... scCD-4.9.0
https://github.com/kernelOfTruth/pulsea ... zer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Top
davidogg
n00b
n00b
Posts: 9
Joined: Sun Sep 07, 2003 12:33 am

  • Quote

Post by davidogg » Tue Aug 17, 2010 3:11 am

kernelOfTruth wrote:
davidogg wrote:
codergeek42 wrote:You don't need to add those though. The proper MMX/SSE/3DNow! options are implied by your "-march=" setting.
I'm wondering about this, because on my system;

gcc -Q --help=target -march=k8-sse3

doesn't show many of the flags being turned on.

gcc -Q --help=target -march=native

doesn't turn many on either, and returns the same as;

gcc -Q --help=target -march=mybrain

leaving me wondering if "native" does anything at all.
then it might be a gcc-bug you discovered

it was the same in the recent past with gcc 4.5.0 and intel core i7 mistakenly being set as atom :idea:
gcc --version
gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3

I'm still in a chroot installing :P
Top
Post Reply

408 posts
  • Page 17 of 17
    • Jump to page:
  • Previous
  • 1
  • …
  • 13
  • 14
  • 15
  • 16
  • 17

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy