All of lore.kernel.org
 help / color / mirror / Atom feed
* CPU type .config <-> i386/Makefile question[s]
@ 2005-06-05 13:58 Nick Warne
  2005-06-05 17:43 ` Adrian Bunk
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Warne @ 2005-06-05 13:58 UTC (permalink / raw)
  To: linux-kernel

Hello all,

I am still a n00b here learning, so by all means tell me to get lost if what I 
am about to say is total bollocks...

I was just running through building the new 2.4.31 kernel on my Quake2 box, 
with looking at building this time with a few optimisations.

I noticed that arch/i386/Makefile uses generic -march= options.

I can have either Pentium-MMX or PentiumPro - But not Pentium2?

>From GCC 3.4.x docs:

pentium-mmx
Intel PentiumMMX CPU based on Pentium core with MMX instruction set support. 

i686, pentiumpro
Intel PentiumPro CPU. 

pentium2
Intel Pentium2 CPU based on PentiumPro core with MMX instruction set support. 

from i386/Makefile:

ifdef CONFIG_M586MMX
CFLAGS += -march=i586
endif

ifdef CONFIG_M686
CFLAGS += -march=i686
endif

ifdef CONFIG_MPENTIUMIII
CFLAGS += -march=i686
endif


Is there a specific reason why the flags aren't -march=pentium2, pentiumpro 
etc?

Also I notice that if I changed the top level Makefile to include my specific 
CPU, then the i386/Makefile adds += -march=i686 to the build lines AFTER 
CFLAGS~ thus the second one will take precedence (I guess) anyway, and the 
-march CFLAG changes are basically over-ridden?

Regards,

Nick
-- 
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: CPU type .config <-> i386/Makefile question[s]
  2005-06-05 13:58 CPU type .config <-> i386/Makefile question[s] Nick Warne
@ 2005-06-05 17:43 ` Adrian Bunk
  2005-06-05 19:43   ` Nick Warne
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2005-06-05 17:43 UTC (permalink / raw)
  To: Nick Warne; +Cc: linux-kernel

On Sun, Jun 05, 2005 at 02:58:50PM +0100, Nick Warne wrote:

> Hello all,

Hi Nick,

> I am still a n00b here learning, so by all means tell me to get lost if what I 
> am about to say is total bollocks...
> 
> I was just running through building the new 2.4.31 kernel on my Quake2 box, 
> with looking at building this time with a few optimisations.
>...
> Is there a specific reason why the flags aren't -march=pentium2, pentiumpro 
> etc?

the specific reason is that kernel 2.4 is in a maintainance mode and 
such changes are not considered being worth the risk of breaking 
anything anywhere with any of the supported gcc versions.

In kernel 2.6, this is already handled the way you expect it.

> Also I notice that if I changed the top level Makefile to include my specific 
> CPU, then the i386/Makefile adds += -march=i686 to the build lines AFTER 
> CFLAGS~ thus the second one will take precedence (I guess) anyway, and the 
> -march CFLAG changes are basically over-ridden?

Users are not expected to manually set any CFLAGS.

It might work in your case, but unless you _really_ know what you are 
doing you always risk some breakage.

> Regards,
> 
> Nick

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: CPU type .config <-> i386/Makefile question[s]
  2005-06-05 17:43 ` Adrian Bunk
@ 2005-06-05 19:43   ` Nick Warne
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Warne @ 2005-06-05 19:43 UTC (permalink / raw)
  To: linux-kernel

On Sunday 05 June 2005 18:43, Adrian Bunk wrote:

> the specific reason is that kernel 2.4 is in a maintainance mode and
> such changes are not considered being worth the risk of breaking
> anything anywhere with any of the supported gcc versions.
>
> In kernel 2.6, this is already handled the way you expect it.
>
> > Also I notice that if I changed the top level Makefile to include my
> > specific CPU, then the i386/Makefile adds += -march=i686 to the build
> > lines AFTER CFLAGS~ thus the second one will take precedence (I guess)
> > anyway, and the -march CFLAG changes are basically over-ridden?
>
> Users are not expected to manually set any CFLAGS.
>
> It might work in your case, but unless you _really_ know what you are
> doing you always risk some breakage.

I see!  Thanks for info.  I can do my own patch to play with :-)

Nick
-- 
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-05 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-05 13:58 CPU type .config <-> i386/Makefile question[s] Nick Warne
2005-06-05 17:43 ` Adrian Bunk
2005-06-05 19:43   ` Nick Warne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.