public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.5.69 Change to i386 Makefile to distinguish athlons.
@ 2003-05-14 18:57 Jonathan Bastien-Filiatrault
  2003-05-14 20:03 ` Dave Jones
  2003-05-14 20:47 ` Sam Ravnborg
  0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Bastien-Filiatrault @ 2003-05-14 18:57 UTC (permalink / raw)
  To: mec; +Cc: Linux Kernel

It should succesfully set -march=athlon-<type> according to uname -p.

--- linux-2.5.69/arch/i386/Makefile.orig    2003-05-14 
13:37:19.000000000 -0400
+++ linux-2.5.69/arch/i386/Makefile    2003-05-14 14:50:03.000000000 -0400
@@ -23,7 +23,7 @@
 CFLAGS += -pipe

 check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > 
/dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
-
+get_athlon_type = ${shell case `uname -p` in "* 4 *") echo 
"athlon-4";;*XP*) echo "athlon-xp";;*MP*) echo "athlon-mp";;*) echo 
"athlon";;esac}
 # prevent gcc from keeping the stack 16 byte aligned
 CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)

@@ -39,7 +39,7 @@
 cflags-$(CONFIG_MPENTIUMIII)    += $(call 
check_gcc,-march=pentium3,-march=i686)
 cflags-$(CONFIG_MPENTIUM4)    += $(call 
check_gcc,-march=pentium4,-march=i686)
 cflags-$(CONFIG_MK6)        += $(call check_gcc,-march=k6,-march=i586)
-cflags-$(CONFIG_MK7)        += $(call 
check_gcc,-march=athlon,-march=i686 $(align)-functions=4)
+cflags-$(CONFIG_MK7)        += $(call check_gcc,-march=$(call 
get_athlon_type),-march=i686 $(align)-functions=4)
 cflags-$(CONFIG_MK8)        += $(call check_gcc,-march=k8,$(call 
check_gcc,-march=athlon,-march=i686 $(align)-functions=4))
 cflags-$(CONFIG_MCRUSOE)    += -march=i686 $(align)-functions=0 
$(align)-jumps=0 $(align)-loops=0
 cflags-$(CONFIG_MWINCHIPC6)    += $(call 
check_gcc,-march=winchip-c6,-march=i586)



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

* Re: [PATCH] 2.5.69 Change to i386 Makefile to distinguish athlons.
  2003-05-14 18:57 [PATCH] 2.5.69 Change to i386 Makefile to distinguish athlons Jonathan Bastien-Filiatrault
@ 2003-05-14 20:03 ` Dave Jones
  2003-05-14 20:47 ` Sam Ravnborg
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Jones @ 2003-05-14 20:03 UTC (permalink / raw)
  To: Jonathan Bastien-Filiatrault; +Cc: mec, Linux Kernel

On Wed, May 14, 2003 at 02:57:21PM -0400, Jonathan Bastien-Filiatrault wrote:
 > It should succesfully set -march=athlon-<type> according to uname -p.

"Look, a new way to do something pointless!"

This is just as broken as the previous patch that was posted.
_READ_ the gcc sources. See what those flags do.

The only differences are the enabling of PTA_SSE on the later models.
"Cool, I have SSE, I want optimised SSE routines". Bad luck.
This flag makes damn all difference on integer code. FP code is not
allowed in kernel space, and in the few exceptions where we do use it
(see the memcpy routines), it's guarded by explicit kernel_fpu_begin()
kernel_fpu_end() pairs, something that gcc wouldn't be able to add for us.

		Dave


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

* Re: [PATCH] 2.5.69 Change to i386 Makefile to distinguish athlons.
  2003-05-14 18:57 [PATCH] 2.5.69 Change to i386 Makefile to distinguish athlons Jonathan Bastien-Filiatrault
  2003-05-14 20:03 ` Dave Jones
@ 2003-05-14 20:47 ` Sam Ravnborg
  1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2003-05-14 20:47 UTC (permalink / raw)
  To: Jonathan Bastien-Filiatrault; +Cc: mec, Linux Kernel

On Wed, May 14, 2003 at 02:57:21PM -0400, Jonathan Bastien-Filiatrault wrote:
> It should succesfully set -march=athlon-<type> according to uname -p.
> 
> --- linux-2.5.69/arch/i386/Makefile.orig    2003-05-14 
> 13:37:19.000000000 -0400
> +++ linux-2.5.69/arch/i386/Makefile    2003-05-14 14:50:03.000000000 -0400
> @@ -23,7 +23,7 @@
> CFLAGS += -pipe
> 
> check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > 
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
> -
> +get_athlon_type = ${shell case `uname -p` in "* 4 *") echo 
> "athlon-4";;*XP*) echo "athlon-xp";;*MP*) echo "athlon-mp";;*) echo 
> "athlon";;esac}

This is broken.
You have no guarantee whatsoever that the kernel is being compiled
for the machine where you do the compilation.

	Sam

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

end of thread, other threads:[~2003-05-14 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-14 18:57 [PATCH] 2.5.69 Change to i386 Makefile to distinguish athlons Jonathan Bastien-Filiatrault
2003-05-14 20:03 ` Dave Jones
2003-05-14 20:47 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox