* [gentoo-dev] auto selection of optimal gcc architecture settings [not found] ` <200304262328.54371.phoenix@webone.com.au> @ 2003-04-28 9:18 ` Padraig Brady 2003-04-28 13:30 ` Mark Gordon 0 siblings, 1 reply; 8+ messages in thread From: Padraig Brady @ 2003-04-28 9:18 UTC (permalink / raw To: gentoo-performance, gentoo-dev Eric Ball wrote: > On Sat, 26 Apr 2003 12:57 am, Padraig Brady wrote: > >>Hi, >> >>I've been testing http://www.pixelbeat.org/scripts/gcccpuopt >>over the last while with good results. Essentially it's >>a Linux specific script that only helps on x86 at present >>but can be updated to other architectures easily. >> >>It would be beneficial IMHO for gentoo to run it at >>installation time and update /etc/make.conf appropriately? >> >>thanks, >>Pádraig. > > It seems nifty. > I'd recommend you submit it in Bugzilla at bugs.gentoo.org or in the > gentoo-dev list as the powers-that-be might not read this list. -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] auto selection of optimal gcc architecture settings 2003-04-28 9:18 ` [gentoo-dev] auto selection of optimal gcc architecture settings Padraig Brady @ 2003-04-28 13:30 ` Mark Gordon 2003-04-28 13:38 ` Paul de Vrieze ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Mark Gordon @ 2003-04-28 13:30 UTC (permalink / raw To: gentoo-dev On Mon, 28 Apr 2003 10:18:54 +0100 Padraig Brady <padraig.brady@corvil.com> wrote: > Eric Ball wrote: > > On Sat, 26 Apr 2003 12:57 am, Padraig Brady wrote: > > > >>Hi, > >> > >>I've been testing http://www.pixelbeat.org/scripts/gcccpuopt > >>over the last while with good results. Essentially it's > >>a Linux specific script that only helps on x86 at present > >>but can be updated to other architectures easily. > >> > >>It would be beneficial IMHO for gentoo to run it at > >>installation time and update /etc/make.conf appropriately? > >> > >>thanks, > >>Pádraig. > > > > It seems nifty. > > I'd recommend you submit it in Bugzilla at bugs.gentoo.org or in the > > > > gentoo-dev list as the powers-that-be might not read this list. It needs extending even for the x86 compatible world. markg@brenda markg $ ./gcccpuopt -march=pentium2 -mmmx markg@brenda markg $ cat /proc/cpuinfo processor : 0 vendor_id : GenuineTMx86 cpu family : 6 model : 4 model name : Transmeta(tm) Crusoe(tm) Processor TM5600 stepping : 3 cpu MHz : 661.674 cache size : 512 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 cx8 sep cmov mmx longrun lrti bogomips : 1307.44 As far as I'm aware the Crusoe emulates a Pentium, not a PII (I've not seen anything definitive stating otherwise). If someone can confirm that I'm wrong or tell me a safe way to test then I'll investigate further. Any other strange processors out there that might have problems? -- Mark Gordon Paid to be a Geek & a Senior Software Developer Currently looking for a new job commutable from Slough, Berks, U.K. Although my email address says spamtrap, it is real and I read it. -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] auto selection of optimal gcc architecture settings 2003-04-28 13:30 ` Mark Gordon @ 2003-04-28 13:38 ` Paul de Vrieze 2003-04-28 13:41 ` Padraig Brady 2003-04-28 13:40 ` Padraig Brady 2003-04-28 16:46 ` Chris PeBenito 2 siblings, 1 reply; 8+ messages in thread From: Paul de Vrieze @ 2003-04-28 13:38 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: signed data --] [-- Type: text/plain, Size: 486 bytes --] On Monday 28 April 2003 15:30, Mark Gordon wrote: > On Mon, 28 Apr 2003 10:18:54 +0100 > > Any other strange processors out there that might have problems? While I didn't check the program, I think the program could very well just try to compile a trivial test program with the flags and check whether it runs well. While this is not bulletproof it should get most errors. Paul -- Paul de Vrieze Researcher Mail: pauldv@cs.kun.nl Homepage: http://www.devrieze.net [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] auto selection of optimal gcc architecture settings 2003-04-28 13:38 ` Paul de Vrieze @ 2003-04-28 13:41 ` Padraig Brady 0 siblings, 0 replies; 8+ messages in thread From: Padraig Brady @ 2003-04-28 13:41 UTC (permalink / raw To: Paul de Vrieze; +Cc: gentoo-dev Paul de Vrieze wrote: > On Monday 28 April 2003 15:30, Mark Gordon wrote: > >>On Mon, 28 Apr 2003 10:18:54 +0100 >> >>Any other strange processors out there that might have problems? > > > While I didn't check the program, I think the program could very well just try > to compile a trivial test program with the flags and check whether it runs > well. While this is not bulletproof it should get most errors. this would be quite useless for testing generated code. It's only useful for testing compiler options and I do this instead by explicitly using the gcc version. Pádraig. -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] auto selection of optimal gcc architecture settings 2003-04-28 13:30 ` Mark Gordon 2003-04-28 13:38 ` Paul de Vrieze @ 2003-04-28 13:40 ` Padraig Brady 2003-04-28 14:05 ` Mark Gordon 2003-04-28 16:46 ` Chris PeBenito 2 siblings, 1 reply; 8+ messages in thread From: Padraig Brady @ 2003-04-28 13:40 UTC (permalink / raw To: Mark Gordon; +Cc: gentoo-dev Mark Gordon wrote: > On Mon, 28 Apr 2003 10:18:54 +0100 > Padraig Brady <padraig.brady@corvil.com> wrote: > > >>Eric Ball wrote: >> >>>On Sat, 26 Apr 2003 12:57 am, Padraig Brady wrote: >>> >>> >>>>Hi, >>>> >>>>I've been testing http://www.pixelbeat.org/scripts/gcccpuopt >>>>over the last while with good results. Essentially it's >>>>a Linux specific script that only helps on x86 at present >>>>but can be updated to other architectures easily. >>>> >>>>It would be beneficial IMHO for gentoo to run it at >>>>installation time and update /etc/make.conf appropriately? >>>> >>>>thanks, >>>>Pádraig. >>> >>>It seems nifty. >>>I'd recommend you submit it in Bugzilla at bugs.gentoo.org or in the >>> >>>gentoo-dev list as the powers-that-be might not read this list. > > > It needs extending even for the x86 compatible world. > > markg@brenda markg $ ./gcccpuopt > -march=pentium2 -mmmx > markg@brenda markg $ cat /proc/cpuinfo > processor : 0 > vendor_id : GenuineTMx86 > cpu family : 6 > model : 4 > model name : Transmeta(tm) Crusoe(tm) Processor TM5600 > > As far as I'm aware the Crusoe emulates a Pentium, not a PII (I've not > seen anything definitive stating otherwise). Nah, cpu family = 6 is quite definitive. This is from /usr/src/linux-2.4/arch/i386/Makefile ifdef CONFIG_MCRUSOE CFLAGS += -march=i686 endif > Any other strange processors out there that might have problems? the only exception is a gcc bug where is assumes 686 has cmov, and this is handled explicitly. Pádraig. -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] auto selection of optimal gcc architecture settings 2003-04-28 13:40 ` Padraig Brady @ 2003-04-28 14:05 ` Mark Gordon 0 siblings, 0 replies; 8+ messages in thread From: Mark Gordon @ 2003-04-28 14:05 UTC (permalink / raw To: gentoo-dev On Mon, 28 Apr 2003 14:40:10 +0100 Padraig Brady <padraig.brady@corvil.com> wrote: > Mark Gordon wrote: > > On Mon, 28 Apr 2003 10:18:54 +0100 > > Padraig Brady <padraig.brady@corvil.com> wrote: > > > > > >>Eric Ball wrote: > >> > >>>On Sat, 26 Apr 2003 12:57 am, Padraig Brady wrote: > >>> > >>> > >>>>Hi, > >>>> > >>>>I've been testing http://www.pixelbeat.org/scripts/gcccpuopt > >>>>over the last while with good results. Essentially it's > >>>>a Linux specific script that only helps on x86 at present > >>>>but can be updated to other architectures easily. > >>>> > >>>>It would be beneficial IMHO for gentoo to run it at > >>>>installation time and update /etc/make.conf appropriately? > >>>> > >>>>thanks, > >>>>Pádraig. > >>> > >>>It seems nifty. > >>>I'd recommend you submit it in Bugzilla at bugs.gentoo.org or in > >the>> > >>>gentoo-dev list as the powers-that-be might not read this list. > > > > > > It needs extending even for the x86 compatible world. > > > > markg@brenda markg $ ./gcccpuopt > > -march=pentium2 -mmmx > > markg@brenda markg $ cat /proc/cpuinfo > > processor : 0 > > vendor_id : GenuineTMx86 > > cpu family : 6 > > model : 4 > > model name : Transmeta(tm) Crusoe(tm) Processor TM5600 > > > > As far as I'm aware the Crusoe emulates a Pentium, not a PII (I've > > not seen anything definitive stating otherwise). > > Nah, cpu family = 6 is quite definitive. > This is from /usr/src/linux-2.4/arch/i386/Makefile > ifdef CONFIG_MCRUSOE > CFLAGS += -march=i686 > endif > > > Any other strange processors out there that might have problems? > > the only exception is a gcc bug where is assumes 686 has cmov, > and this is handled explicitly. OK, I'll up my make.conf to -march=pentium2 and recompile a few things starting with xfree86. If I find any problems I'll be back. -- Mark Gordon Paid to be a Geek & a Senior Software Developer Currently looking for a new job commutable from Slough, Berks, U.K. Although my email address says spamtrap, it is real and I read it. -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] auto selection of optimal gcc architecture settings 2003-04-28 13:30 ` Mark Gordon 2003-04-28 13:38 ` Paul de Vrieze 2003-04-28 13:40 ` Padraig Brady @ 2003-04-28 16:46 ` Chris PeBenito 2003-04-29 9:35 ` Padraig Brady 2 siblings, 1 reply; 8+ messages in thread From: Chris PeBenito @ 2003-04-28 16:46 UTC (permalink / raw To: Mark Gordon; +Cc: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 1478 bytes --] On Mon, 2003-04-28 at 08:30, Mark Gordon wrote: [cut] > > >>I've been testing http://www.pixelbeat.org/scripts/gcccpuopt > > >>over the last while with good results. Essentially it's > > >>a Linux specific script that only helps on x86 at present > > >>but can be updated to other architectures easily. [cut] > > >>It would be beneficial IMHO for gentoo to run it at > > >>installation time and update /etc/make.conf appropriately? [cut] > It needs extending even for the x86 compatible world. > > markg@brenda markg $ ./gcccpuopt > -march=pentium2 -mmmx [cut] I think this would probably be more useful if it dumped out the CHOST line in addition to the optimizations. This would help with people that have the more uncommon processors to set the correct CHOST. I seen more than a few times K6* users have had CHOST="i686-pc-linux-gnu", when it should be i586-pc-linux-gnu. so it'd print this for a K6-2: $ ./gcccpuopt CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6-2" So it could easily be pasted into make.conf. (-mmmx is redundant) -- Chris PeBenito <pebenito@gentoo.org> Developer, Gentoo Linux Hardened Gentoo Project "Engineering does not require science. Science helps a lot, but people built perfectly good brick walls long before they knew why cement works."-Alan Cox Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243 Key fingerprint = B0E6 877A 883F A57A 8E6A CB00 BC8E E42D E6AF 9243 [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] auto selection of optimal gcc architecture settings 2003-04-28 16:46 ` Chris PeBenito @ 2003-04-29 9:35 ` Padraig Brady 0 siblings, 0 replies; 8+ messages in thread From: Padraig Brady @ 2003-04-29 9:35 UTC (permalink / raw To: Chris PeBenito; +Cc: Mark Gordon, gentoo-dev Chris PeBenito wrote: > On Mon, 2003-04-28 at 08:30, Mark Gordon wrote: > [cut] > >>>>>I've been testing http://www.pixelbeat.org/scripts/gcccpuopt >>>>>over the last while with good results. Essentially it's >>>>>a Linux specific script that only helps on x86 at present >>>>>but can be updated to other architectures easily. > > [cut] > >>>>>It would be beneficial IMHO for gentoo to run it at >>>>>installation time and update /etc/make.conf appropriately? > > [cut] > >>It needs extending even for the x86 compatible world. >> >>markg@brenda markg $ ./gcccpuopt >> -march=pentium2 -mmmx > > [cut] > > I think this would probably be more useful if it dumped out the CHOST > line in addition to the optimizations. This would help with people that > have the more uncommon processors to set the correct CHOST. I seen more > than a few times K6* users have had CHOST="i686-pc-linux-gnu", when it > should be i586-pc-linux-gnu. > > so it'd print this for a K6-2: > > $ ./gcccpuopt > CHOST="i586-pc-linux-gnu" > CFLAGS="-march=k6-2" > > So it could easily be pasted into make.conf. (-mmmx is redundant) I would do that as an explicit option as it's handy (outside the gentoo context) to do things like: export CFLAGS="$CFLAGS `gcccpuopt` -O3 -pipe -fomit-frame-pointer" Other useful options would be KERNEL which would output the appropriate kernel config (e.g. CONFIG_MK7), and GCCVER which would specify which gcc to use rather than the installed one. so in summary options to gcccpuopt should be: [-CFLAGS | -CHOST | -KERNEL] [-GCCVER] Pádraig. -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-04-29 9:41 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <3EA94CD1.9070304@corvil.com> [not found] ` <200304262328.54371.phoenix@webone.com.au> 2003-04-28 9:18 ` [gentoo-dev] auto selection of optimal gcc architecture settings Padraig Brady 2003-04-28 13:30 ` Mark Gordon 2003-04-28 13:38 ` Paul de Vrieze 2003-04-28 13:41 ` Padraig Brady 2003-04-28 13:40 ` Padraig Brady 2003-04-28 14:05 ` Mark Gordon 2003-04-28 16:46 ` Chris PeBenito 2003-04-29 9:35 ` Padraig Brady
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox