All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RFC] gcc3 arch options
@ 2002-05-27 15:00 J.A. Magallon
  2002-05-27 15:08 ` Thunder from the hill
  2002-05-27 15:18 ` David Woodhouse
  0 siblings, 2 replies; 8+ messages in thread
From: J.A. Magallon @ 2002-05-27 15:00 UTC (permalink / raw)
  To: Lista Linux-Kernel; +Cc: Alan Cox, Marcelo Tosatti

Hi.

Patch below adds support for newer gcc -march code generation options.
It adds options for pentium-mmx, pentium-pro, pentium2, pentium3 and pentium4.
(note: pII part depends or previous patch).
It just what Luca Barbieri did adding PII.

I have been running a PII optmized kernel on a dual PII@400 box and nothing
has broken for 2 days....

Patch follows:

--- linux-2.4.19-pre8-jam4/arch/i386/Makefile.orig	2002-05-26 11:39:23.000000000 +0200
+++ linux-2.4.19-pre8-jam4/arch/i386/Makefile	2002-05-26 11:43:06.000000000 +0200
@@ -43,23 +43,23 @@
 endif
 
 ifdef CONFIG_M586MMX
-CFLAGS += -march=i586
+CFLAGS += $(shell if $(CC) -march=pentium-mmx -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=pentium-mmx"; else echo "-march=i586"; fi)
 endif
 
 ifdef CONFIG_M686
-CFLAGS += -march=i686
+CFLAGS += $(shell if $(CC) -march=pentium-pro -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=pentium-pro; else echo "-march=i686"; fi)
 endif
 
 ifdef CONFIG_MPENTIUMII
-CFLAGS += -march=i686
+CFLAGS += $(shell if $(CC) -march=pentium2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=pentium2"; else echo "-march=i686"; fi)
 endif
 
 ifdef CONFIG_MPENTIUMIII
-CFLAGS += -march=i686
+CFLAGS += $(shell if $(CC) -march=pentium3 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=pentium3"; else echo "-march=i686"; fi)
 endif
 
 ifdef CONFIG_MPENTIUM4
-CFLAGS += -march=i686
+CFLAGS += $(shell if $(CC) -march=pentium4 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=pentium4"; else echo "-march=i686"; fi)
 endif
 
 ifdef CONFIG_MK6


-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.3 (Cooker) for i586
Linux werewolf 2.4.19-pre8-jam4 #2 SMP dom may 26 11:20:42 CEST 2002 i686

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [PATCH][RFC] gcc3 arch options
@ 2002-05-27 15:33 Thunder from the hill
  0 siblings, 0 replies; 8+ messages in thread
From: Thunder from the hill @ 2002-05-27 15:33 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,

On Mon, 27 May 2002, David Woodhouse wrote:
> jamagallon@able.es said:
> > +CFLAGS += $(shell if $(CC) -march=pentium-mmx -S -o /dev/null -xc /
> > dev/null >/dev/null 2>&1; then echo "-march=pentium-mmx"; else echo
> > "-march=i586"; fi)
> 
> Doesn't this run the shell command every time $(CFLAGS) is used?

It does. But I don'y know whether it is _TOO_ expensive, others do it as 
well. I think in the GCC compile we have it either.

However, we might better determine that in advance.

Regards,
Thunder
-- 
Was it a black who passed along in the sand?
Was it a white who left his footprints?
Was it an african? An indian?
Sand says, 'twas human.



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

end of thread, other threads:[~2002-05-27 22:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-27 15:00 [PATCH][RFC] gcc3 arch options J.A. Magallon
2002-05-27 15:08 ` Thunder from the hill
2002-05-27 15:18 ` David Woodhouse
2002-05-27 15:47   ` Kai Germaschewski
2002-05-27 16:01     ` Thunder from the hill
2002-05-27 21:42     ` J.A. Magallon
2002-05-27 22:47       ` Kai Germaschewski
  -- strict thread matches above, loose matches on Subject: below --
2002-05-27 15:33 Thunder from the hill

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.