You are not logged in.

#1 2009-05-16 15:59:10

xavier
Member
Registered: 2009-05-16
Posts: 7

Configuration my cflags

Hi,

i'm a new user of arch, i used gentoo and debian.

In first time i sorry for my bad english.

In second, i have a turion 64 x2 and I want to know how to set the flags for the file makepkg.conf in order to optimize the system.

I search in google and i found this url : http://wiki.archlinux.org/index.php/Safe_Cflags

but my architectures not exist.

Thank's very much .. and sorry for my english.

Ale

Offline

#2 2009-05-16 16:03:29

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Configuration my cflags

xavier wrote:

Hi,

i'm a new user of arch, i used gentoo and debian.

In first time i sorry for my bad english.

In second, i have a turion 64 x2 and I want to know how to set the flags for the file makepkg.conf in order to optimize the system.

I search in google and i found this url : http://wiki.archlinux.org/index.php/Safe_Cflags

but my architectures not exist.

Thank's very much .. and sorry for my english.

Ale

I'm no expert.... but I use this for my Turion 64 x2 TL-60:

http://en.wikipedia.org/wiki/Turion_64_ … _nm_SOI.29
http://en.wikipedia.org/wiki/List_of_AM … 2890_nm.29

My CFLAGS:

CFLAGS="-march=athlon64-sse3 -O2 -pipe"
CXXFLAGS="-march=athlon64-sse3 -O2 -pipe"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j3"

and I add this to my PKGBUILDS for LDFLAGS:

export LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"

some links:
http://gcc.gnu.org/onlinedocs/gcc/i386- … 64-Options
http://gcc.gnu.org/onlinedocs/gcc-4.1.1 … tions.html
http://en.gentoo-wiki.com/wiki/CFLAGS
http://en.gentoo-wiki.com/wiki/Safe_Cfl … _.2F_Ultra

Last edited by methuselah (2009-05-16 16:11:09)

Offline

#3 2009-05-16 18:31:18

xavier
Member
Registered: 2009-05-16
Posts: 7

Re: Configuration my cflags

Thank for your post.. tommorow i try your option ..

because i try gentoo and i don't think the option in my make.conf file is enabled in makepkg.conf arch linux file.


thank you
ale

Offline

#4 2009-05-16 22:15:36

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Configuration my cflags

According to your wiki link Methusalemn --march=athlon64 is only for 64 bit systems. For 32 bit systems you still need to use --march=athlon.

At least, that's what that wiki page says smile.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2009-05-16 22:26:29

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Configuration my cflags

Just use -march=native. GCC will pick the correct processor. From my makepkg.conf:

CFLAGS="-march=native -mtune=native -O2 -pipe"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"

I've been told that the -mtune line is redundant.

Offline

#6 2009-05-17 00:13:21

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Configuration my cflags

B wrote:

According to your wiki link Methusalemn --march=athlon64 is only for 64 bit systems. For 32 bit systems you still need to use --march=athlon.

At least, that's what that wiki page says smile.

@B - I'm not sure which link you're talking about. I have a 64bit system and the same Turion 64 x 2 that the opp xavier has so I just shared the settings that I use at the moment. I used the gcc gnu page: http://gcc.gnu.org/onlinedocs/gcc/i386- … 64-Options

@skottish - Would "-march=native" be able to tell that the Turion 64 x 2 has SSE3 available or would it just use the regular athlon64 or k8 setting that doesn't have the SSE3 instruction set support available? (I know just add -msse3)

I'm just wondering how the -march=native setting works..... if it uses SSE3 or not. I read in a few other threads that it just uses k8 or athlon64 (for my Turion 64 x 2).


I use to use "-march=athlon64 -msse3 -O2 -pipe" but then I switched it to "-march=athlon64-sse3 -O2 -pipe" since the gcc.gnu.org page said it was the improved versions of k8, opteron and athlon64 with SSE3 instruction set support. (also available k8-sse3, opteron-sse3)

Last edited by methuselah (2009-05-17 00:23:46)

Offline

#7 2009-05-17 00:54:14

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Configuration my cflags

methuselah wrote:

@skottish - Would "-march=native" be able to tell that the Turion 64 x 2 has SSE3 available or would it just use the regular athlon64 or k8 setting that doesn't have the SSE3 instruction set support available? (I know just add -msse3)

I'm just wondering how the -march=native setting works..... if it uses SSE3 or not. I read in a few other threads that it just uses k8 or athlon64 (for my Turion 64 x 2).

It's a little unclear to me whether GCC pulls in every option:

man_gcc wrote:

native
               This selects the CPU to tune for at compilation time by
               determining the processor type of the compiling machine.  Using
               -mtune=native will produce code optimized for the local machine
               under the constraints of the selected instruction set.  Using
               -march=native will enable all instruction subsets supported by
               the local machine (hence the result might not run on different
               machines).

It's not as enlightening as I'd like it to be. It seems like it should compile using all CPU specific instructions.

Offline

#8 2009-05-17 12:13:55

xavier
Member
Registered: 2009-05-16
Posts: 7

Re: Configuration my cflags

in my gentoo file i use athlon-xp is possible used this flag also in arch linux file?

and other in makepkg.conf is possible used the INPUT_DEVICES and VIDEO_CARDS option to describe the other periperals of notebook?

And USE flag exist?

Ale

Offline

#9 2009-05-17 17:17:27

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Configuration my cflags

xavier wrote:

in my gentoo file i use athlon-xp is possible used this flag also in arch linux file?

and other in makepkg.conf is possible used the INPUT_DEVICES and VIDEO_CARDS option to describe the other periperals of notebook?

And USE flag exist?

Ale

You are asking about your AMD Turion 64 x 2 processoer correct?

Which OS are you on? Arch i686 or Arch x86_64. (32bit or 64bit OS)

Offline

#10 2009-05-17 21:53:54

xavier
Member
Registered: 2009-05-16
Posts: 7

Re: Configuration my cflags

Yes, i asking for AMD Turion 64 x2 architecture.

in this moment i installed a 32 bit system.

I search install a minimal and essential system smile

Offline

#11 2009-05-17 21:59:00

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Configuration my cflags

xavier wrote:

Yes, i asking for AMD Turion 64 x2 architecture.

in this moment i installed a 32 bit system.

I search install a minimal and essential system smile

I have no idea what cflags you should use for the Turion 64 x 2 on a 32bit system. Sorry.

Offline

#12 2009-05-18 05:37:01

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Configuration my cflags

methuselah wrote:
B wrote:

According to your wiki link Methusalemn --march=athlon64 is only for 64 bit systems. For 32 bit systems you still need to use --march=athlon.

At least, that's what that wiki page says smile.

@B - I'm not sure which link you're talking about. I have a 64bit system and the same Turion 64 x 2 that the opp xavier has so I just shared the settings that I use at the moment. I used the gcc gnu page: http://gcc.gnu.org/onlinedocs/gcc/i386- … 64-Options

My bad - I now see the link in your post was one you quoted, not provided yourself smile.

Xavier: you basically just need the K7 options for the K8 in 32 bit mode wink. You might want to add SSE3 support if your CPU does support it, but most of the time it's hardly worth it (it should be an additional gain for multimedia though). However, since there's not much to be compiled in general if you set up a minimal installation, isn't Gentoo worth looking into for you?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#13 2009-05-18 08:44:43

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: Configuration my cflags

I use C2D with

CFLAGS="-march=core2 -msse3 -O2 -pipe"

Is that correct or

CFLAGS="-march=core2-msse3 -O2 -pipe"

Offline

#14 2009-05-18 09:22:25

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Configuration my cflags

I'm surprised no one's using the new graphite branch loop optimizations:

-floop-interchange -floop-strip-mine -floop-block (See http://gcc.gnu.org/gcc-4.4/changes.html)

Using this since GCC4.4 was pushed in [TESTING], no build problems at all. Of course, the performance gain is >>!*HUGE*!<< but won't be noticed by any human being. ;-)

Offline

#15 2009-05-18 11:57:36

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Configuration my cflags

bangkok_manouel wrote:

I'm surprised no one's using the new graphite branch loop optimizations:

-floop-interchange -floop-strip-mine -floop-block (See http://gcc.gnu.org/gcc-4.4/changes.html)

Using this since GCC4.4 was pushed in [TESTING], no build problems at all. Of course, the performance gain is >>!*HUGE*!<< but won't be noticed by any human being. ;-)

Thanks, I just added it to my makepkg.conf file. Any other tips?

Offline

Board footer

Powered by FluxBB