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 8 of 17
    • Jump to page:
  • Previous
  • 1
  • …
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • 17
  • Next
Author
Message
Shopro
l33t
l33t
User avatar
Posts: 678
Joined: Wed May 12, 2004 6:32 am
Location: Dayton, OH, USA

Question about cflags.

  • Quote

Post by Shopro » Tue Feb 07, 2006 5:43 am

I'm having some difficulties figuring out which cflags i should be using for my two processors. The salesman told me that both of these cpu's have
native 64 bit, but i'm not sure about what cflags are for that. The second CPU is a server and i'm not sure if I should convert it to 64 bit even if it supports it. Oh and how could I convert the first CPU to 64 bit from it's old P3 cflags.

First CPU:

/proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 44
model name : AMD Sempron(tm) Processor 3400+
stepping : 2
cpu MHz : 2010.477
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm
bogomips : 4025.21

lspci
00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)
00:01.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a3)
00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)
00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)
00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)
00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)
00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev f2)
00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)
00:0b.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0c.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0d.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:00.0 VGA compatible controller: nVidia Corporation GeForce 6200 TurboCache(TM) (rev a1)
05:07.0 Ethernet controller: VIA Technologies, Inc. VT86C100A [Rhine] (rev 06)

Second CPU:

/proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 44
model name : AMD Sempron(tm) Processor 2600+
stepping : 2
cpu MHz : 1607.311
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm
bogomips : 3218.10

lspci
0000:00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
0000:00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)
0000:00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)
0000:00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)
0000:00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)
0000:00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
0000:00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)
0000:00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)
0000:00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
0000:00:03.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
0000:00:04.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
0000:00:05.0 VGA compatible controller: nVidia Corporation C51 PCI Express Bridge (rev a2)
0000:00:09.0 RAM memory: nVidia Corporation MCP51 Host Bridge (rev a2)
0000:00:0a.0 ISA bridge: nVidia Corporation MCP51 LPC Bridge (rev a2)
0000:00:0a.1 SMBus: nVidia Corporation MCP51 SMBus (rev a2)
0000:00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a2)
0000:00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev a2)
0000:00:0d.0 IDE interface: nVidia Corporation MCP51 IDE (rev a1)
0000:00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2)
0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
0000:04:0a.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78)
Just because I have nothing to say is no reason why you shouldn't listen.
Top
fangorn
Veteran
Veteran
User avatar
Posts: 1886
Joined: Sat Jul 31, 2004 1:31 pm
Contact:
Contact fangorn
Website

  • Quote

Post by fangorn » Tue Feb 07, 2006 6:52 am

I am not sure that all semprons have 64bit support yet.

But anyway. You will have to do a fresh install to get a nicely running 64bit install. The Profiles for 32bit x86 and 64bit amd64 are quite different, especially if you want to be able to run 32bit binaries like openoffice-bin, firefox-bin and mplayer-bin too (multilib support, needed because openoffice does not build on 64bit, there is no flash plugin for 64bit and mplayer only can play wmv, real a.s.o. as a 32bit binary).

You can copy your home directories and the hand edited part of your /etc and the world file, and do a emerge -e world in the new install.
Video Encoding scripts collection | Project page
Top
mark_alec
Bodhisattva
Bodhisattva
User avatar
Posts: 6066
Joined: Sat Sep 11, 2004 6:40 am
Location: Melbourne, Australia
Contact:
Contact mark_alec
Website

  • Quote

Post by mark_alec » Tue Feb 07, 2006 7:44 am

Merged above two posts.
www.gentoo.org.au || #gentoo-au
Top
Shopro
l33t
l33t
User avatar
Posts: 678
Joined: Wed May 12, 2004 6:32 am
Location: Dayton, OH, USA

  • Quote

Post by Shopro » Tue Feb 07, 2006 11:35 am

Thanks for the anwser, it seems that I won't convert my system(s) to 64 bit, at least not yet.
But what about cflags for those two cpu's. Imagining that I'll be using it as 32 bit only.
Just because I have nothing to say is no reason why you shouldn't listen.
Top
citrusfizz
n00b
n00b
Posts: 62
Joined: Tue Jul 27, 2004 3:07 am

what cflags should i use?

  • Quote

Post by citrusfizz » Fri Feb 17, 2006 6:43 pm

i looking for a performance optimized desktop system..
i have a athlon 64 bit 3200+ cp ... altho i will be using a 32 bit kernel and programs...

anyways what cflags should i use in make.conf i tried some last night but i ended up borking up my system...
Top
sirdilznik
l33t
l33t
User avatar
Posts: 731
Joined: Thu Apr 28, 2005 10:13 am

  • Quote

Post by sirdilznik » Fri Feb 17, 2006 7:04 pm

CFLAGS="-march=athlon-xp -O2 -pipe -fno-ident"

That's assuming you are build ing a 32-bit system (I'm not sure if you can run a 32-bit kernel with a 64-bit system).
Anything beyond that is moving toward ricer territory. You won't get a magical performance boost by getting crazy with the flags and you will make the system more prone to breakage. Keep it simple.
Top
Moartel
Tux's lil' helper
Tux's lil' helper
Posts: 127
Joined: Sat Dec 18, 2004 4:09 pm
Location: Regensburg, Germany

  • Quote

Post by Moartel » Wed Feb 22, 2006 3:29 pm

I just realised, that the 2.6.15 kernel with ck-patch (I don't know if this is ck-specific or genuine) has an option to use -Os instead of -O2. This reduced the size of the kernel dramatically (1.5 instead of 2.1 MB). I was always wondering if using -Os in my make.conf would be a good idea thinking of the small cache of my old celeron (1133MHz, 32kb L1-, 256kb L2-Cache). The reduced binary size would also be pleasant regarding my limited hd-size (20GB). Has anyone tested -O2 and -Os on a similar system or knows someone who has done it?
When the Bogeyman goes to sleep, he looks in the toilet for Chuck Norris!
Top
socr0819
n00b
n00b
User avatar
Posts: 15
Joined: Thu Jul 01, 2004 3:28 pm
Location: raleigh, nc

what do you think about this?

  • Quote

Post by socr0819 » Wed Mar 08, 2006 3:40 pm

here's what i'm considering using for my next build (from stage1):

CFLAGS="-march=pentium4 -mtune=pentium4"
CFLAGS="${CFLAGS} -pipe"
CFLAGS="${CFLAGS} -O2"
CFLAGS="${CFLAGS} -fweb"
CFLAGS="${CFLAGS} -frename-registers"
CFLAGS="${CFLAGS} -fforce-addr"
CFLAGS="${CFLAGS} -momit-leaf-frame-pointer"
CFLAGS="${CFLAGS} -fomit-frame-pointer"
CFLAGS="${CFLAGS} -ftracer"

CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"

I'm still mixed between using O2, O3, and Os. In the past I've had several things break using Os...
Top
nxsty
Veteran
Veteran
User avatar
Posts: 1556
Joined: Wed Jun 23, 2004 7:00 pm
Location: .se
Contact:
Contact nxsty
Website

  • Quote

Post by nxsty » Wed Mar 08, 2006 4:07 pm

@socr0819:
Drop -momit-leaf-frame-pointer (overrides -fomit-frame-pointer) and -ftracer (bloats, often a pessimisation), otherwise they seem fine.

@Moartel:
Try -Os, it has really good effect on older systems.
Top
Bob P
Advocate
Advocate
User avatar
Posts: 3374
Joined: Wed Oct 20, 2004 9:15 pm
Location: USA

  • Quote

Post by Bob P » Wed Mar 08, 2006 10:07 pm

indeed, nxsty is right. if socr0819 is planning on copying the Jackass! CFLAGS, he would be better advised to use the current Jackass! CFLAGS and not the deprecated ones. :idea:
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

  • Quote

Post by vipernicus » Mon Apr 03, 2006 2:49 pm

Bob P wrote:indeed, nxsty is right. if socr0819 is planning on copying the Jackass! CFLAGS, he would be better advised to use the current Jackass! CFLAGS and not the deprecated ones. :idea:
...you're taking ownership of a set of CFLAGS? Why would you assume he is using Jackass!, when he has not posted in Jackass! Forums? It's almost like your comment was a marketing ploy opposed to any real help.
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Top
stmok
n00b
n00b
Posts: 3
Joined: Wed Apr 05, 2006 4:40 pm
Location: Sydney, Australia

Need some clarification on Gentoo: "Cflags" part

  • Quote

Post by stmok » Wed Apr 05, 2006 4:53 pm

Although I've installed Gentoo with stage 3+GRP, (as I'm a newbie to Gentoo, but mainly just wanting to know if it works on this box). I'm curious as to what I should be putting if I were properly optimising things?

I'm using a Sempron64 (which is basically a Socket 754 Athlon64 with less cache)...I don't want to use the AMD64 capability, just 32bit mode and the rest of the features (SSE2, etc)...What should I be using for Cflags part?

Would it be like...

Code: Select all

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -mfpmath=sse -msse2 -mmmx -m3dnow -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
OR should it be like -march=i686 instead of -march=k8? Or maybe -march=athlon-xp?

There's no solid info for this, when I'm looking in:

CFLAGS
http://gentoo-wiki.com/CFLAGS

Safe Cflags
http://gentoo-wiki.com/Safe_Cflags

3.17.14 Intel 386 and AMD x86-64 Options
http://gcc.gnu.org/onlinedocs/gcc/i386- ... tions.html

...And the Gentoo forums.


Using cat /proc/cpuinfo reveals:

Code: Select all

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 44
model name      : AMD Sempron(tm) Processor 2800+
stepping        : 2
cpu MHz         : 1607.463
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm
bogomips        : 3218.33
(Bare in mind, I've only had about 1 yr of Linux experience with OpenSUSE and Ubuntu...I just got fustrated at them as they did things for me that I didn't want...I'm liking Gentoo Linux so far).

Any thoughts on my Cflags options?
Top
sonicbhoc
Veteran
Veteran
User avatar
Posts: 1805
Joined: Mon Oct 24, 2005 7:52 pm
Location: In front of the computer screen
Contact:
Contact sonicbhoc
Website

  • Quote

Post by sonicbhoc » Wed Apr 05, 2006 5:02 pm

try march=amd64.
Top
hielvc
Advocate
Advocate
Posts: 2805
Joined: Fri Apr 19, 2002 5:55 pm
Location: Oceanside, Ca

  • Quote

Post by hielvc » Wed Apr 05, 2006 5:10 pm

These " sse sse2 mmx 3dnow mmxext " are best put in your /etc/make.conf USE=" ..." . The simpler you keep your CFLAGS the simpler things will be. When you get comfortable then go to GCC 4.1[beta].

To see which of those are used by portage "emerge ufed" , and run it in a terminal.
An A-Z Index of the Linux BASH command line
Top
nixnut
Bodhisattva
Bodhisattva
User avatar
Posts: 10974
Joined: Fri Apr 09, 2004 1:43 pm
Location: the dutch mountains

  • Quote

Post by nixnut » Wed Apr 05, 2006 6:00 pm

merged anbove three posts here
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Top
stmok
n00b
n00b
Posts: 3
Joined: Wed Apr 05, 2006 4:40 pm
Location: Sydney, Australia

  • Quote

Post by stmok » Fri Apr 07, 2006 5:46 am

To answer my own question, the "safe flags" to use for a Sempron64 in 32bit mode ONLY.

CFLAGS="-march=athlon-xp -O2 -msse2 -msse3 -pipe"

(This is assuming you don't want to use AMD64 capability)

-msse2 and -msse3 are added as athlon-xp does not support SSE2/SSE3, but the Sempron64 DOES support these features.

-fomit-frame-pointer flag doesn't work for me, as compiler complains of misconfiguration.
Top
nxsty
Veteran
Veteran
User avatar
Posts: 1556
Joined: Wed Jun 23, 2004 7:00 pm
Location: .se
Contact:
Contact nxsty
Website

  • Quote

Post by nxsty » Fri Apr 07, 2006 7:54 am

stmok wrote:To answer my own question, the "safe flags" to use for a Sempron64 in 32bit mode ONLY.

CFLAGS="-march=athlon-xp -O2 -msse2 -msse3 -pipe"

(This is assuming you don't want to use AMD64 capability)

-msse2 and -msse3 are added as athlon-xp does not support SSE2/SSE3, but the Sempron64 DOES support these features.

-fomit-frame-pointer flag doesn't work for me, as compiler complains of misconfiguration.
Why -march=athlon-xp and not -march=k8?

I would recomend:

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -msse3 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

The flags "-msse2 -mmmx -m3dnow" are included in -march=k8 but -msse3 is not, and your CPU supports it accordning to /proc/cpuinfo. I also removed -mfpmath=sse as it only degrades performance.
Top
Bob P
Advocate
Advocate
User avatar
Posts: 3374
Joined: Wed Oct 20, 2004 9:15 pm
Location: USA

  • Quote

Post by Bob P » Fri Apr 07, 2006 5:50 pm

vipernicus wrote:
Bob P wrote:indeed, nxsty is right. if socr0819 is planning on copying the Jackass! CFLAGS, he would be better advised to use the current Jackass! CFLAGS and not the deprecated ones. :idea:
...you're taking ownership of a set of CFLAGS? Why would you assume he is using Jackass!, when he has not posted in Jackass! Forums? It's almost like your comment was a marketing ploy opposed to any real help.
maybe you don't have enough experience to recognize it, but his post is a character-for-character reproduction of a segment of a copyrighted document. yes, i have ownership of that document. otherwise, i would not have the authority to release it under the GPL. that's the way open source works -- as the owner of a document you have to copyright it before you have the right to release it under the GPL.
Top
stmok
n00b
n00b
Posts: 3
Joined: Wed Apr 05, 2006 4:40 pm
Location: Sydney, Australia

  • Quote

Post by stmok » Sat Apr 08, 2006 2:30 pm

nxsty wrote:Why -march=athlon-xp and not -march=k8?

I would recomend:

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -msse3 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
Thanks. Well, I'm testing this one at the moment...

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=k8 -mtune=k8 -O2 -m32 -msse3 -pipe"
CXXFLAGS="${CFLAGS}"


...it seems to work with FlightGear and Torcs better than the athlon-xp one I tried.
I don't want to do AMD64 mode, so the -m32 is there.

-fomit-frame-pointer doesn't work for me, so that's left out.

Now to try to get Nvidia drivers and ALSA working. I'm such a noob at this. :oops:
Top
nxsty
Veteran
Veteran
User avatar
Posts: 1556
Joined: Wed Jun 23, 2004 7:00 pm
Location: .se
Contact:
Contact nxsty
Website

  • Quote

Post by nxsty » Sat Apr 08, 2006 6:20 pm

stmok wrote:...it seems to work with FlightGear and Torcs better than the athlon-xp one I tried.
I don't want to do AMD64 mode, so the -m32 is there.

-fomit-frame-pointer doesn't work for me, so that's left out.

Now to try to get Nvidia drivers and ALSA working. I'm such a noob at this. :oops:
You don't need -m32, a i686 compile defaults to 32 bit (though it wont hurt). What do you mean "-fomit-frame-pointer doesn't work"? :?
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

  • Quote

Post by vipernicus » Mon Apr 10, 2006 2:02 am

Bob P wrote:
vipernicus wrote:
Bob P wrote:indeed, nxsty is right. if socr0819 is planning on copying the Jackass! CFLAGS, he would be better advised to use the current Jackass! CFLAGS and not the deprecated ones. :idea:
...you're taking ownership of a set of CFLAGS? Why would you assume he is using Jackass!, when he has not posted in Jackass! Forums? It's almost like your comment was a marketing ploy opposed to any real help.
maybe you don't have enough experience to recognize it, but his post is a character-for-character reproduction of a segment of a copyrighted document. yes, i have ownership of that document. otherwise, i would not have the authority to release it under the GPL. that's the way open source works -- as the owner of a document you have to copyright it before you have the right to release it under the GPL.
Sorry, I must be lacking in experience...
Am I breaking any copyrights with these flags?

Code: Select all

CFLAGS="-march=athlon-xp"
CFLAGS="${CFLAGS} -O2"
CFLAGS="${CFLAGS} -pipe"
CFLAGS="${CFLAGS} -fno-ident"
CFLAGS="${CFLAGS} -ftracer -fweb"
CFLAGS="${CFLAGS} -fomit-frame-pointer"
CFLAGS="${CFLAGS} -falign-functions=64"
CFLAGS="${CFLAGS} -freorder-blocks-and-partition"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
CXXFLAGS="${CXXFLAGS} -fno-enforce-eh-specs"
#CXXFLAGS="${CXXFLAGS}  -fpermissive"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,-Bdirect -Wl,--as-needed -Wl,-hashvals -Wl,-zdynsort"
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Top
Alejandro Nova
n00b
n00b
Posts: 50
Joined: Wed Sep 08, 2004 1:01 am
Contact:
Contact Alejandro Nova
Website

  • Quote

Post by Alejandro Nova » Thu Apr 13, 2006 12:00 am

Greetings.

Now, I am on a Sempron 2500+, Palermo core, with SSE3 and AMD64 support. My CFLAGS are:

Code: Select all

CFLAGS="-march=k8 -msse3 -O2 -pipe -fforce-addr -fno-ident"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
And I want to make some questions.

1. How much performance will I gain from -fomit-frame-pointer? AFAIK, it has a great effect in x86, but I'm not sure of the effect it will have in AMD64. I've heard reports that it doesn't even work, because frame pointers are always omitted under AMD64 with -O2, unlike x86.
2. Is -fforce-addr hurting performance? The GCC docs say that it will generate a better code, but I don't know how will that translate into better performance.

I've dropped -fvisibility-inlines-hidden because of serious issues with various programs, and recompiled all my system with these CFLAGS before asking.

Thanks in advance.
Becoming someone beautiful, through my music, my silent devotion...
Alejandro Nova™.
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

  • Quote

Post by vipernicus » Sat Apr 15, 2006 2:53 pm

Bob P wrote:
vipernicus wrote:
Bob P wrote:indeed, nxsty is right. if socr0819 is planning on copying the Jackass! CFLAGS, he would be better advised to use the current Jackass! CFLAGS and not the deprecated ones. :idea:
...you're taking ownership of a set of CFLAGS? Why would you assume he is using Jackass!, when he has not posted in Jackass! Forums? It's almost like your comment was a marketing ploy opposed to any real help.
maybe you don't have enough experience to recognize it, but his post is a character-for-character reproduction of a segment of a copyrighted document. yes, i have ownership of that document. otherwise, i would not have the authority to release it under the GPL. that's the way open source works -- as the owner of a document you have to copyright it before you have the right to release it under the GPL.
Can you show me proof of your copyright?
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Top
KD-120RD
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 149
Joined: Sun Mar 07, 2004 3:16 pm
Location: Hamburg

  • Quote

Post by KD-120RD » Thu Apr 27, 2006 12:02 pm

Hi,

like all gentoo users I'm keen to get the most out of my system. But I don't realy like to break this, so I use
CFLAGS="-march=athlon-xp -Os -fomit-frame-pointer -pipe" in my make.conf

I use -Os because I think many apps and libs do not realy have to be optimized, because they do not need many cpu-cylcles to do their job. On the othere hand there are apps that definetly benefit from optimization, apps that "produce" a lot of cpu-load. Like gzip i.e.
Thats why I use an packages.cflags to tell gcc to use

Code: Select all

-march=athlon-xp -O3 -fprofile-use -fprefetch-loop-arrays -falign-functions=64 -fomit-frame-pointer -ffast-math -pipe
to the following packages

Code: Select all

media-video/ffmpeg, media-libs/x264-svn, media-libs/xvid, media-libs/win32codecs, media-libs/xine-lib, media-libs/flac, media-libs/a52dec       
media-libs/libdvdcss, media-libs/libmad, media-sound/lame, media-gfx/gimp, media-video/mplayer, media-video/kaffeine, 
#
app-arch/tar, app-arch/zip, app-arch/gzip, app-arch/bzip2, app-arch/p7zip, app-arch/unzip, app-arch/unrar, app-arch/unace, app-arch/rpm2targz, app-arch/cabextract, app-arch/cpio
#
app-crypt/qca, app-crypt/qca-tls, app-crypt/pinentry, app-crypt/gpgme, app-crypt/gnupg, dev-libs/libgcrypt, app-crypt/hashalot, 
#
sys-libs/glibc, sys-libs/zlib, net-misc/openssh, dev-libs/openssl
This is my theory and I would like to know what you think about this. Especially about the apps I want to optimize and if I missed some important ones.


I also have an package.ldflags file to compile KDE with --as-needed. I recently read that Wl,z,now is a good flag to use. info ld says:
-z 'now'
When generating an executable or shared library, mark it to tell the dynamic linker to resolve all symbols when the program is
started, or when the shared library is linked to using dlopen, instead of deferring function call resolution to the point when the
function is first called.
If I understand this right, it works simmilar to --as-needed, right? So is it save to use?

Tell me what you think.
Top
lnxz
Guru
Guru
Posts: 472
Joined: Sun Jul 03, 2005 4:53 am
Location: Earth

  • Quote

Post by lnxz » Fri Apr 28, 2006 12:20 pm

AFAIK --as-needed and -z,now are different in that as-needed tries to strip unused libraries, while z,now causes all symbols to be resolved upon execution, resulting in slower startup and increased run-time performance/stability (in theory).
For me, z,now breaks modular X, but I've had no other problems with it and the startup penalty seems quite miniscule (prelink might eliminate it altogether).
Top
Post Reply

408 posts
  • Page 8 of 17
    • Jump to page:
  • Previous
  • 1
  • …
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • 17
  • Next

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