Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Feb 2011 23:32:29 +0000
From:      Alexander Best <arundel@freebsd.org>
To:        Martin Matuska <mm@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r218896 - in head/share: examples/etc mk
Message-ID:  <20110220233229.GA23063@freebsd.org>
In-Reply-To: <201102202232.p1KMWLKo047088@svn.freebsd.org>
References:  <201102202232.p1KMWLKo047088@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--3V7upXqbjpZ4EhLz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun Feb 20 11, Martin Matuska wrote:
> Author: mm
> Date: Sun Feb 20 22:32:21 2011
> New Revision: 218896
> URL: http://svn.freebsd.org/changeset/base/218896
> 
> Log:
>   Add opteron-sse3, athlon64-sse3 and k8-sse3 cpu types to bsd.cpu.mk.
>   - add "sse3" to MACHINE_CPU for the new cpu types
>   - for i386, default to CPUTYPE=prescott for the new cpu types

any thoughts regarding these clang specific changes? i think it will be nice to
pass newer CPUTYPEs to clang, yet this will break gnu/lib/libobjc and
sys/boot/{i386,pc98}/boot2, which always get built with gcc.

cheers.
alex

>   
>   PR:		gnu/154906
>   Discussed with:	kib, kan, dim
>   MFC after:	2 weeks
> 
> Modified:
>   head/share/examples/etc/make.conf
>   head/share/mk/bsd.cpu.mk
> 
> Modified: head/share/examples/etc/make.conf
> ==============================================================================
> --- head/share/examples/etc/make.conf	Sun Feb 20 22:25:23 2011	(r218895)
> +++ head/share/examples/etc/make.conf	Sun Feb 20 22:32:21 2011	(r218896)
> @@ -30,8 +30,9 @@
>  # NO_CPU_CFLAGS variable below.
>  # Currently the following CPU types are recognized:
>  #   Intel x86 architecture:
> -#       (AMD CPUs)	opteron athlon64 athlon-mp athlon-xp athlon-4
> -#			athlon-tbird athlon k8 k6-3 k6-2 k6 k5
> +#       (AMD CPUs)	opteron-sse3 opteron athlon64-sse3 athlon64 athlon-mp
> +#			athlon-xp athlon-4 athlon-tbird athlon k8-sse3 k8
> +#			k6-3 k6-2 k6 k5
>  #       (Intel CPUs)	core2 core nocona pentium4m pentium4 prescott
>  #			pentium3m pentium3 pentium-m pentium2
>  #			pentiumpro pentium-mmx pentium i486 i386
> 
> Modified: head/share/mk/bsd.cpu.mk
> ==============================================================================
> --- head/share/mk/bsd.cpu.mk	Sun Feb 20 22:25:23 2011	(r218895)
> +++ head/share/mk/bsd.cpu.mk	Sun Feb 20 22:32:21 2011	(r218896)
> @@ -49,6 +49,9 @@ CPUTYPE = pentiumpro
>  CPUTYPE = pentium-mmx
>  .  elif ${CPUTYPE} == "i586"
>  CPUTYPE = pentium
> +.  elif ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" || \
> +     ${CPUTYPE} == "k8-sse3"
> +CPUTYPE = prescott
>  .  elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \
>       ${CPUTYPE} == "k8"
>  CPUTYPE = athlon-mp
> @@ -158,7 +161,9 @@ _CPUCFLAGS = -mcpu=ultrasparc3
>  # presence of a CPU feature.
>  
>  . if ${MACHINE_CPUARCH} == "i386"
> -.  if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64"
> +.  if ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3"
> +MACHINE_CPU = athlon-xp athlon k7 3dnow sse3 sse2 sse mmx k6 k5 i586 i486 i386
> +.  elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64"
>  MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i386
>  .  elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
>      ${CPUTYPE} == "athlon-4"
> @@ -197,7 +202,9 @@ MACHINE_CPU = i486 i386
>  MACHINE_CPU = i386
>  .  endif
>  . elif ${MACHINE_CPUARCH} == "amd64"
> -.  if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8"
> +.  if ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" || ${CPUTYPE} == "k8-sse3"
> +MACHINE_CPU = k8 3dnow sse3
> +.  elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8"
>  MACHINE_CPU = k8 3dnow
>  .  elif ${CPUTYPE} == "nocona"
>  MACHINE_CPU = sse3

-- 
a13x

--3V7upXqbjpZ4EhLz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mk.diff"

Index: share/mk/sys.mk
===================================================================
--- share/mk/sys.mk	(revision 218896)
+++ share/mk/sys.mk	(working copy)
@@ -355,6 +355,13 @@
 .include "${__MAKE_CONF}"
 .endif
 
+.if !defined(_WITHOUT_SRCCONF)
+SRCCONF?=/etc/src.conf
+.if exists(${SRCCONF})
+.include "${SRCCONF}"
+.endif
+.endif
+
 .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL)
 SHELL=	${__MAKE_SHELL}
 .SHELL: path=${__MAKE_SHELL}
Index: share/mk/bsd.cpu.mk
===================================================================
--- share/mk/bsd.cpu.mk	(revision 218896)
+++ share/mk/bsd.cpu.mk	(working copy)
@@ -33,10 +33,14 @@
 CPUTYPE = prescott
 .  elif ${CPUTYPE} == "p4"
 CPUTYPE = pentium4
+.  elif ${CPUTYPE} == "p4m" && ${CC:T:Mclang} == "clang"
+CPUTYPE = pentium4
 .  elif ${CPUTYPE} == "p4m"
 CPUTYPE = pentium4m
 .  elif ${CPUTYPE} == "p3"
 CPUTYPE = pentium3
+.  elif ${CPUTYPE} == "p3m" && ${CC:T:Mclang} == "clang"
+CPUTYPE = pentium3
 .  elif ${CPUTYPE} == "p3m"
 CPUTYPE = pentium3m
 .  elif ${CPUTYPE} == "p-m"
@@ -59,8 +63,10 @@
 CPUTYPE = athlon
 .  endif
 . elif ${MACHINE_CPUARCH} == "amd64"
-.  if ${CPUTYPE} == "prescott" || ${CPUTYPE} == "core2"
+.  if ${CPUTYPE} == "prescott"
 CPUTYPE = nocona
+.  elif ${CPUTYPE} == "core2" && ${CC:T:Mclang} != "clang"
+CPUTYPE = nocona
 .  endif
 . elif ${MACHINE_ARCH} == "sparc64"
 .  if ${CPUTYPE} == "us"
@@ -206,7 +212,7 @@
 MACHINE_CPU = k8 3dnow sse3
 .  elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8"
 MACHINE_CPU = k8 3dnow
-.  elif ${CPUTYPE} == "nocona"
+.  elif ${CPUTYPE} == "nocona" || ${CPUTYPE} == "core2"
 MACHINE_CPU = sse3
 .  endif
 MACHINE_CPU += amd64 sse2 sse mmx

--3V7upXqbjpZ4EhLz--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110220233229.GA23063>