Thread: Linux compilation opt-flag?
December 24th, 2002, 02:03 PM #1
Linux compilation opt-flag?
A minor issue 'cause I can't see much difference with compiling opt-flags, but would a K6-3 w/on-board cache be best modeled as an i586, i686, or perhaps even an Athlon?
I use the K6 flag for the kernel, which works fine, but gcc-2.95 doesn't define the K6 flag for general program source compiling, so I have to choose something else.
Last edited by BFlurie; December 25th, 2002 at 01:28 AM.
December 24th, 2002, 03:39 PM #2
for my k6 i use CFLAGS="-march=i586"
edit! forgot closing quote mark!
Last edited by pbharris; December 24th, 2002 at 03:52 PM.Odds are very good there are several spelling mistakes in this post.
December 25th, 2002, 06:43 AM #3
I wonder if the i586, i686, k6, etc. flag in itself does anything or is only an identifier. Perhaps the only real "tweaks" are the flags like -- fomit-frame-pointer, pipe, preferred-stack-boundary=2, etc.
December 25th, 2002, 08:41 AM #4
Supposedly there's some preformance to be gained by compiling for you chip architecture but that's just what I've heard. This:
export CFLAGS="-O2 -march=i686 -fomit-frame-pointer -malign-functions=4 -mpreferred-stack-boundary=2"
Is what I've put into my .bash_profile so that when I compile it builds this way for all source packages.
Merry Christmas..Where's Lunch?
December 25th, 2002, 12:12 PM #5
Mine's similar. Whatcher CPU?
December 27th, 2002, 03:15 AM #6
ok, i have an athlon xp... could i put into my profile -march=athlon and get this supposed speed increase?
i'd also LOVE to get rpm rebuilds to better work with that... they don't too well unfortunately...
December 27th, 2002, 04:22 AM #7
-march="i686" would be correct, I think.
December 27th, 2002, 04:55 AM #8
- Join Date
- Oct 2001
December 28th, 2002, 03:06 PM #9
see that's confusing me. have they depreciated the -march athlon thing nowadays?
where's otheos when you need him? :P he knows all about this stuff...
December 28th, 2002, 03:53 PM #10
- Join Date
- Jul 2002
- edit - gone north
Last edited by Centurion; April 16th, 2003 at 12:56 PM.Centurion - From Canada
December 28th, 2002, 04:19 PM #11*** all that we C or Scheme is
but a dream within a dream ***
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)