From owner-freebsd-current Sat May 11 13:33:19 2002 Delivered-To: freebsd-current@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 1984D37B404 for ; Sat, 11 May 2002 13:33:10 -0700 (PDT) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.3/8.12.2) with ESMTP id g4BKX9ev014261 for ; Sat, 11 May 2002 13:33:09 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.3/8.12.3/Submit) id g4BKX9X0014260 for current@freebsd.org; Sat, 11 May 2002 13:33:09 -0700 (PDT) Date: Sat, 11 May 2002 13:33:09 -0700 From: "David O'Brien" To: current@freebsd.org Subject: embellish of bsd.cpu.mk Message-ID: <20020511133309.A14228@dragon.nuxi.com> Reply-To: current@freebsd.org Mail-Followup-To: David O'Brien , current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [bogus From: address, because people cannot be bothered to respect Reply-To:] What do people think of this patch to embellish bsd.cpu.mk? I also changed pN to be the more canonical pentiumN (with pN aliases of course). Index: bsd.cpu.mk =================================================================== RCS file: /home/ncvs/src/share/mk/bsd.cpu.mk,v retrieving revision 1.9 diff -u -r1.9 bsd.cpu.mk --- bsd.cpu.mk 11 May 2002 20:18:54 -0000 1.9 +++ bsd.cpu.mk 11 May 2002 20:31:28 -0000 @@ -6,6 +6,9 @@ .if ${MACHINE_ARCH} == "i386" CPUTYPE ?= i386 .elif ${MACHINE_ARCH} == "alpha" +if !defined(CPUTYPE) +CPUTUNE ?= ev56 +.endif CPUTYPE ?= ev4 .elif ${MACHINE_ARCH} == "ia64" CPUTYPE ?= itanium @@ -17,12 +20,30 @@ # between e.g. i586 and pentium) .if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "pentiumpro" -CPUTYPE = i686 -. elif ${CPUTYPE} == "pentium" +. if ${CPUTYPE} == "pentium" CPUTYPE = i586 -. elif ${CPUTYPE} == "athlon" -CPUTYPE = k7 +. elif ${CPUTYPE} == "i686" +CPUTYPE = pentiumpro +. elif ${CPUTYPE} == "p2" +CPUTYPE = pentium2 +. elif ${CPUTYPE} == "p3" +CPUTYPE = pentium3 +. elif ${CPUTYPE} == "p4" +CPUTYPE = pentium4 +. elif ${CPUTYPE} == "k7" +CPUTYPE = athlon +. elif ${CPUTYPE} == "duron" +CPUTYPE = athlon +. endif +.elif ${MACHINE_ARCH} == "alpha" +. if ${CPUTYPE} == "21264a" +CPUTYPE = ev67 +. if ${CPUTYPE} == "21264" +CPUTYPE = ev6 +. elif ${CPUTYPE} == "21164pc" +CPUTYPE = pca56 +. elif ${CPUTYPE} == "21164a" +CPUTYPE = ev56 . endif .endif @@ -36,7 +57,7 @@ .if !defined(NO_CPU_CFLAGS) || !defined(NO_CPU_COPTFLAGS) . if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "k7" +. if ${CPUTYPE} == "athlon" _CPUCFLAGS = -march=athlon . elif ${CPUTYPE} == "k6-2" _CPUCFLAGS = -march=k6 @@ -44,13 +65,13 @@ _CPUCFLAGS = -march=k6 . elif ${CPUTYPE} == "k5" _CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "p4" -_CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "p3" -_CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "p2" -_CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "i686" +. elif ${CPUTYPE} == "pentium4" +_CPUCFLAGS = -march=pentium4 +. elif ${CPUTYPE} == "pentium3" +_CPUCFLAGS = -march=pentium3 +. elif ${CPUTYPE} == "pentium2" +_CPUCFLAGS = -march=pentium2 +. elif ${CPUTYPE} == "pentiumpro" _CPUCFLAGS = -march=pentiumpro . elif ${CPUTYPE} == "i586/mmx" _CPUCFLAGS = -march=pentium @@ -60,6 +81,8 @@ _CPUCFLAGS = -march=i486 . endif . elif ${MACHINE_ARCH} == "alpha" +. if ${CPUTYPE} == "ev67" +_CPUCFLAGS = -mcpu=ev67 . if ${CPUTYPE} == "ev6" _CPUCFLAGS = -mcpu=ev6 . elif ${CPUTYPE} == "pca56" @@ -75,6 +98,9 @@ . endif . endif .endif +.if ${MACHINE_ARCH} == "alpha" && defined(CPUTUNE) +_CPUCFLAGS += -mtune=${CPUTUNE} +.endif # NB: COPTFLAGS is handled in /usr/src/sys/conf/Makefile. @@ -87,17 +113,17 @@ # presence of a CPU feature. .if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "k7" -MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386 +. if ${CPUTYPE} == "athlon" +MACHINE_CPU = athlon 3dnow mmx k6 k5 i586 i486 i386 . elif ${CPUTYPE} == "k6-2" MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386 . elif ${CPUTYPE} == "k6" MACHINE_CPU = mmx k6 k5 i586 i486 i386 . elif ${CPUTYPE} == "k5" MACHINE_CPU = k5 i586 i486 i386 -. elif ${CPUTYPE} == "p4" +. elif ${CPUTYPE} == "pentium4" MACHINE_CPU = sse i686 mmx i586 i486 i386 -. elif ${CPUTYPE} == "p3" +. elif ${CPUTYPE} == "pentium3" MACHINE_CPU = sse i686 mmx i586 i486 i386 . elif ${CPUTYPE} == "p2" MACHINE_CPU = i686 mmx i586 i486 i386 @@ -113,7 +139,9 @@ MACHINE_CPU = i386 . endif .elif ${MACHINE_ARCH} == "alpha" -. if ${CPUTYPE} == "ev6" +. if ${CPUTYPE} == "ev67" +MACHINE_CPU = ev67 ev6 ev56 pca56 ev5 ev45 ev4 +. elif ${CPUTYPE} == "ev6" MACHINE_CPU = ev6 ev56 pca56 ev5 ev45 ev4 . elif ${CPUTYPE} == "pca56" MACHINE_CPU = pca56 ev56 ev5 ev45 ev4 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message