From nobody@FreeBSD.org  Sat Nov 27 17:43:52 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C269C16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Nov 2004 17:43:52 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A973F43D5A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Nov 2004 17:43:52 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iARHhqDI083465
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Nov 2004 17:43:52 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id iARHhqOq083464;
	Sat, 27 Nov 2004 17:43:52 GMT
	(envelope-from nobody)
Message-Id: <200411271743.iARHhqOq083464@www.freebsd.org>
Date: Sat, 27 Nov 2004 17:43:52 GMT
From: Petr Rehor <petr.rehor@i.cz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] Adding VIA Eden family to bsd.cpu.mk
X-Send-Pr-Version: www-2.3

>Number:         74454
>Category:       i386
>Synopsis:       [bsd.cpu.mk] [patch] Adding VIA Eden family
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 27 17:50:20 GMT 2004
>Closed-Date:    Tue Feb 26 10:22:52 UTC 2008
>Last-Modified:  Tue Feb 26 10:22:52 UTC 2008
>Originator:     Petr Rehor
>Release:        FreeBSD 5.3-RELEASE-p1
>Organization:
S.ICZ a.s.
>Environment:
FreeBSD charon.rx.cz 5.3-RELEASE-p1 FreeBSD 5.3-RELEASE-p1 #0: Sun Nov 21 16:58:35 UTC 2004     root@marvin.rx.cz:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Newer GCC (not sure, but 3.4.2 has these) supports VIA C3 and VIA C3-2
optimization, but bsd.cpu.mk doesn't utilize these. I'm running world
with -02 -march=c3 on my VIA Epia 5000 board without any problems.

>How-To-Repeat:
      
>Fix:
There is a patch relative to RELENG_5_3

--- bsd.cpu.mk.orig     Sun Nov 21 12:45:25 2004
+++ bsd.cpu.mk  Sat Nov 27 18:25:39 2004
@@ -55,7 +55,13 @@
#      http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html

. if ${MACHINE_ARCH} == "i386"
-.  if ${CPUTYPE} == "crusoe"
+.  if ${CPUTYPE} == "c3"
+_CPUCFLAGS = -march=${CPUTYPE}
+_ICC_CPUCFLAGS = -tpp5 -xM
+. elif  ${CPUTYPE} == "c3-2"
+_CPUCFLAGS = -march=${CPUTYPE}
+_ICC_CPUCFLAGS = -tpp6 -xiMK
+.  elif ${CPUTYPE} == "crusoe"
_CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
_ICC_CPUCFLAGS = -tpp6 -xiM
.  elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
@@ -116,7 +122,11 @@
# presence of a CPU feature.

. if ${MACHINE_ARCH} == "i386"
-.  if ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
+.  if ${CPUTYPE} == "c3"
+MACHINE_CPU = c3 3dnow mmx i586 i486 i386
+.  elif ${CPUTYPE} == "c3-2"
+MACHINE_CPU = c3-2 sse i686 mmx i586 i486 i386
+.  elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
    ${CPUTYPE} == "athlon-4"
MACHINE_CPU = athlon-xp k7 3dnow sse mmx k6 k5 i586 i486 i386
.  elif ${CPUTYPE} == "athlon" || ${CPUTYPE} == "athlon-tbird"

>Release-Note:
>Audit-Trail:

From: Petr Rehor <prehor@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/74454: [bsd.cpu.mk] [patch] Adding VIA Eden family
Date: Sat, 5 Nov 2005 12:30:22 +0100

 Hi. There is a patch for CURRENT/RELENG_6/RELENG_6_0. P.
 
 Index: bsd.cpu.mk
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/src/share/mk/bsd.cpu.mk,v
 retrieving revision 1.48
 diff -u -r1.48 bsd.cpu.mk
 --- bsd.cpu.mk  24 May 2005 21:24:40 -0000      1.48
 +++ bsd.cpu.mk  5 Nov 2005 11:27:47 -0000
 @@ -50,6 +50,10 @@
  CPUTYPE =3D athlon-mp
  .  elif ${CPUTYPE} =3D=3D "k7"
  CPUTYPE =3D athlon
 +.  elif ${CPUTYPE} =3D=3D "eden"
 +CPUTYPE =3D c3
 +.  elif ${CPUTYPE} =3D=3D "nehemiah"
 +CPUTYPE =3D c3-2
  .  endif
  . elif ${MACHINE_ARCH} =3D=3D "amd64"
  .  if ${CPUTYPE} =3D=3D "prescott"
 @@ -68,7 +72,13 @@
  #      http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html
 
  . if ${MACHINE_ARCH} =3D=3D "i386"
 -.  if ${CPUTYPE} =3D=3D "crusoe"
 +.  if ${CPUTYPE} =3D=3D "c3"
 +_CPUCFLAGS =3D -march=3D${CPUTYPE}
 +_ICC_CPUCFLAGS =3D -tpp5 -xM
 +. elif  ${CPUTYPE} =3D=3D "c3-2"
 +_CPUCFLAGS =3D -march=3D${CPUTYPE}
 +_ICC_CPUCFLAGS =3D -tpp6 -xiMK
 +.  elif ${CPUTYPE} =3D=3D "crusoe"
  _CPUCFLAGS =3D -march=3Di686 -falign-functions=3D0 -falign-jumps=3D0 -fali=
 gn-loops=3D0
  .  elif ${CPUTYPE} =3D=3D "k5"
  _CPUCFLAGS =3D -march=3Dpentium
 @@ -119,7 +129,11 @@
  # presence of a CPU feature.
 
  . if ${MACHINE_ARCH} =3D=3D "i386"
 -.  if ${CPUTYPE} =3D=3D "opteron" || ${CPUTYPE} =3D=3D "athlon64"
 +.  if ${CPUTYPE} =3D=3D "c3"
 +MACHINE_CPU =3D c3 3dnow mmx i586 i486 i386
 +.  elif ${CPUTYPE} =3D=3D "c3-2"
 +MACHINE_CPU =3D c3-2 c3 sse i686 mmx i586 i486 i386
 +.  elif ${CPUTYPE} =3D=3D "opteron" || ${CPUTYPE} =3D=3D "athlon64"
  MACHINE_CPU =3D athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i38=
 6
  .  elif ${CPUTYPE} =3D=3D "athlon-mp" || ${CPUTYPE} =3D=3D "athlon-xp" || =
 \
      ${CPUTYPE} =3D=3D "athlon-4"

From: Volker <volker@vwsoft.com>
To: bug-followup@FreeBSD.org, petr.rehor@i.cz
Cc:  
Subject: Re: i386/74454: [bsd.cpu.mk] [patch] Adding VIA Eden family
Date: Sat, 23 Feb 2008 01:10:22 +0100

 Petr,
 
 support for C3 and C3-2 CPUs has been brought into CVS:
 
 src/share/mk/bsd.cpu.mk:
 HEAD rev. 1.50 2006-07-19
 RELENG_6 rev. 1.48.2.1 2006-09-13
 
 Do you think we can close this PR?
 
 Thanks!
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sat Feb 23 03:19:10 UTC 2008 
State-Changed-Why:  
Note that submitter has been asked for feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74454 

From: =?iso-8859-2?B?2GVob/ggUGV0cg==?= <Petr.Rehor@i.cz>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: RE: i386/74454: [bsd.cpu.mk] [patch] Adding VIA Eden family
Date: Mon, 25 Feb 2008 08:54:13 +0100

 > support for C3 and C3-2 CPUs has been brought into CVS:
 >=20
 > src/share/mk/bsd.cpu.mk:
 > HEAD rev. 1.50 2006-07-19
 > RELENG_6 rev. 1.48.2.1 2006-09-13
 >=20
 > Do you think we can close this PR?
 
 Yes, of course. Thanks. P.
State-Changed-From-To: feedback->closed 
State-Changed-By: gavin 
State-Changed-When: Tue Feb 26 10:22:06 UTC 2008 
State-Changed-Why:  
This is now fixed in -HEAD and RELENG_6 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74454 
>Unformatted:
