+ Simplify by treating the standard x86 CPU names as the CPUTYPE vs.
treating them as an alias. Treat the shorthand versions as aliases. + Separate the x86 GCC CPU CFLAGS from the ICC CFLAGS. This greatly simplifies the GCC section. It also makes it more clear which CPU's have the same ICC CPU CFLAGS. + Remove redundancy in the alpha section. + Add forgotten ICC CPU CFLAGS for the mobile Intel CPU's added in rev. 1.42.
This commit is contained in:
parent
79db6648d6
commit
d5a538f65f
@ -5,8 +5,8 @@
|
||||
# may tune support for more advanced processors.
|
||||
|
||||
.if !defined(CPUTYPE) || empty(CPUTYPE)
|
||||
. if ${MACHINE_ARCH} == "i386"
|
||||
_CPUCFLAGS =
|
||||
. if ${MACHINE_ARCH} == "i386"
|
||||
MACHINE_CPU = i486
|
||||
. elif ${MACHINE_ARCH} == "alpha"
|
||||
_CPUCFLAGS = -mcpu=ev4 -mtune=ev5
|
||||
@ -14,12 +14,9 @@ MACHINE_CPU = ev4
|
||||
. elif ${MACHINE_ARCH} == "amd64"
|
||||
MACHINE_CPU = amd64 sse2 sse
|
||||
. elif ${MACHINE_ARCH} == "ia64"
|
||||
_CPUCFLAGS =
|
||||
MACHINE_CPU = itanium
|
||||
. elif ${MACHINE_ARCH} == "sparc64"
|
||||
_CPUCFLAGS =
|
||||
. elif ${MACHINE_ARCH} == "arm"
|
||||
_CPUCFLAGS =
|
||||
MACHINE_CPU = arm
|
||||
. endif
|
||||
.else
|
||||
@ -28,20 +25,24 @@ MACHINE_CPU = arm
|
||||
# between e.g. i586 and pentium)
|
||||
|
||||
. if ${MACHINE_ARCH} == "i386"
|
||||
. if ${CPUTYPE} == "pentium4"
|
||||
CPUTYPE = p4
|
||||
. elif ${CPUTYPE} == "pentium4m"
|
||||
CPUTYPE = p4m
|
||||
. elif ${CPUTYPE} == "pentium3"
|
||||
CPUTYPE = p3
|
||||
. elif ${CPUTYPE} == "pentium3m"
|
||||
CPUTYPE = p3m
|
||||
. elif ${CPUTYPE} == "pentium-m"
|
||||
CPUTYPE = p-m
|
||||
. elif ${CPUTYPE} == "pentiumpro"
|
||||
CPUTYPE = i686
|
||||
. elif ${CPUTYPE} == "pentium"
|
||||
CPUTYPE = i586
|
||||
. if ${CPUTYPE} == "p4"
|
||||
CPUTYPE = pentium4
|
||||
. elif ${CPUTYPE} == "p4m"
|
||||
CPUTYPE = pentium4m
|
||||
. elif ${CPUTYPE} == "p3"
|
||||
CPUTYPE = pentium3
|
||||
. elif ${CPUTYPE} == "p3m"
|
||||
CPUTYPE = pentium3m
|
||||
. elif ${CPUTYPE} == "p-m"
|
||||
CPUTYPE = pentium-m
|
||||
. elif ${CPUTYPE} == "p2"
|
||||
CPUTYPE = pentium2
|
||||
. elif ${CPUTYPE} == "i686"
|
||||
CPUTYPE = pentiumpro
|
||||
. elif ${CPUTYPE} == "i586/mmx"
|
||||
CPUTYPE = pentium-mmx
|
||||
. elif ${CPUTYPE} == "i586"
|
||||
CPUTYPE = pentium
|
||||
. elif ${CPUTYPE} == "opteron"
|
||||
CPUTYPE = athlon-mp
|
||||
. elif ${CPUTYPE} == "athlon64"
|
||||
@ -51,6 +52,7 @@ CPUTYPE = athlon
|
||||
. endif
|
||||
. endif
|
||||
|
||||
###############################################################################
|
||||
# Logic to set up correct gcc optimization flag. This must be included
|
||||
# after /etc/make.conf so it can react to the local value of CPUTYPE
|
||||
# defined therein. Consult:
|
||||
@ -63,71 +65,45 @@ CPUTYPE = athlon
|
||||
. if ${MACHINE_ARCH} == "i386"
|
||||
. if ${CPUTYPE} == "crusoe"
|
||||
_CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
|
||||
. elif ${CPUTYPE} == "k5"
|
||||
_CPUCFLAGS = -march=pentium
|
||||
. else
|
||||
_CPUCFLAGS = -march=${CPUTYPE}
|
||||
. endif # GCC on 'i386'
|
||||
. if ${CPUTYPE} == "crusoe"
|
||||
_ICC_CPUCFLAGS = -tpp6 -xiM
|
||||
. elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
|
||||
${CPUTYPE} == "athlon-4"
|
||||
_CPUCFLAGS = -march=${CPUTYPE}
|
||||
_ICC_CPUCFLAGS = -tpp6 -xiMK
|
||||
. elif ${CPUTYPE} == "athlon-tbird" || ${CPUTYPE} == "athlon"
|
||||
_CPUCFLAGS = -march=${CPUTYPE}
|
||||
_ICC_CPUCFLAGS = -tpp6 -xiM
|
||||
. elif ${CPUTYPE} == "k6-3" || ${CPUTYPE} == "k6-2" || ${CPUTYPE} == "k6"
|
||||
_CPUCFLAGS = -march=${CPUTYPE}
|
||||
_ICC_CPUCFLAGS = -tpp6 -xi
|
||||
. elif ${CPUTYPE} == "k5"
|
||||
_CPUCFLAGS = -march=pentium
|
||||
_ICC_CPUCFLAGS = -tpp5
|
||||
. elif ${CPUTYPE} == "p4"
|
||||
_CPUCFLAGS = -march=pentium4
|
||||
. elif ${CPUTYPE} == "pentium4" || ${CPUTYPE} == "pentium4m"
|
||||
_ICC_CPUCFLAGS = -tpp7 -xiMKW
|
||||
. elif ${CPUTYPE} == "p4m"
|
||||
_CPUCFLAGS = -march=pentium4m
|
||||
. elif ${CPUTYPE} == "p3"
|
||||
_CPUCFLAGS = -march=pentium3
|
||||
. elif ${CPUTYPE} == "pentium3" || ${CPUTYPE} == "pentium3m" || \
|
||||
${CPUTYPE} == "pentium-m"
|
||||
_ICC_CPUCFLAGS = -tpp6 -xiMK
|
||||
. elif ${CPUTYPE} == "p3m"
|
||||
_CPUCFLAGS = -march=pentium3m
|
||||
. elif ${CPUTYPE} == "p-m"
|
||||
_CPUCFLAGS = -march=pentium-m
|
||||
. elif ${CPUTYPE} == "p2"
|
||||
_CPUCFLAGS = -march=pentium2
|
||||
. elif ${CPUTYPE} == "pentium2" || ${CPUTYPE} == "pentiumpro"
|
||||
_ICC_CPUCFLAGS = -tpp6 -xiM
|
||||
. elif ${CPUTYPE} == "i686"
|
||||
_CPUCFLAGS = -march=pentiumpro
|
||||
_ICC_CPUCFLAGS = -tpp6 -xiM
|
||||
. elif ${CPUTYPE} == "i586/mmx"
|
||||
_CPUCFLAGS = -march=pentium-mmx
|
||||
. elif ${CPUTYPE} == "pentium-mmx"
|
||||
_ICC_CPUCFLAGS = -tpp5 -xM
|
||||
. elif ${CPUTYPE} == "i586"
|
||||
_CPUCFLAGS = -march=pentium
|
||||
. elif ${CPUTYPE} == "pentium"
|
||||
_ICC_CPUCFLAGS = -tpp5
|
||||
. elif ${CPUTYPE} == "i486"
|
||||
_CPUCFLAGS = -march=i486
|
||||
. else
|
||||
_ICC_CPUCFLAGS =
|
||||
. endif
|
||||
. endif # ICC on 'i386'
|
||||
. elif ${MACHINE_ARCH} == "alpha"
|
||||
. if ${CPUTYPE} == "ev67"
|
||||
_CPUCFLAGS = -mcpu=ev67
|
||||
. elif ${CPUTYPE} == "ev6"
|
||||
_CPUCFLAGS = -mcpu=ev6
|
||||
. elif ${CPUTYPE} == "pca56"
|
||||
_CPUCFLAGS = -mcpu=pca56
|
||||
. elif ${CPUTYPE} == "ev56"
|
||||
_CPUCFLAGS = -mcpu=ev56
|
||||
. elif ${CPUTYPE} == "ev5"
|
||||
_CPUCFLAGS = -mcpu=ev5
|
||||
. elif ${CPUTYPE} == "ev45"
|
||||
_CPUCFLAGS = -mcpu=ev45
|
||||
. elif ${CPUTYPE} == "ev4"
|
||||
_CPUCFLAGS = -mcpu=ev4
|
||||
. endif
|
||||
_CPUCFLAGS = -mcpu=${CPUTYPE}
|
||||
. elif ${MACHINE_ARCH} == "arm"
|
||||
. if ${CPUTYPE} == "strongarm"
|
||||
_CPUCFLAGS = -mcpu=strongarm
|
||||
. elif ${CPUTYPE} == "xscale"
|
||||
. if ${CPUTYPE} == "xscale"
|
||||
#XXX: gcc doesn't seem to like -mcpu=xscale, and dies while rebuilding itself
|
||||
#_CPUCFLAGS = -mcpu=xscale
|
||||
_CPUCFLAGS = -D__XSCALE__
|
||||
. else
|
||||
_CPUCFLAGS = -mcpu=${CPUTYPE}
|
||||
. endif
|
||||
. endif
|
||||
|
||||
@ -138,7 +114,7 @@ _CPUCFLAGS = -D__XSCALE__
|
||||
. if ${MACHINE_ARCH} == "i386"
|
||||
. if ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
|
||||
${CPUTYPE} == "athlon-4"
|
||||
MACHINE_CPU = athlon-xp k7 3dnow sse mmx k6 k5 i586 i486 i386
|
||||
MACHINE_CPU = athlon-xp athlon k7 3dnow sse mmx k6 k5 i586 i486 i386
|
||||
. elif ${CPUTYPE} == "athlon" || ${CPUTYPE} == "athlon-tbird"
|
||||
MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 i486 i386
|
||||
. elif ${CPUTYPE} == "k6-3" || ${CPUTYPE} == "k6-2"
|
||||
@ -147,17 +123,18 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386
|
||||
MACHINE_CPU = mmx k6 k5 i586 i486 i386
|
||||
. elif ${CPUTYPE} == "k5"
|
||||
MACHINE_CPU = k5 i586 i486 i386
|
||||
. elif ${CPUTYPE} == "p4" || ${CPUTYPE} == "p4m" || ${CPUTYPE} == "p-m"
|
||||
. elif ${CPUTYPE} == "pentium4" || ${CPUTYPE} == "pentium4m" || \
|
||||
${CPUTYPE} == "pentium-m"
|
||||
MACHINE_CPU = sse2 sse i686 mmx i586 i486 i386
|
||||
. elif ${CPUTYPE} == "p3" || ${CPUTYPE} == "p3m"
|
||||
. elif ${CPUTYPE} == "pentium3" || ${CPUTYPE} == "pentium3m"
|
||||
MACHINE_CPU = sse i686 mmx i586 i486 i386
|
||||
. elif ${CPUTYPE} == "p2"
|
||||
. elif ${CPUTYPE} == "pentium2"
|
||||
MACHINE_CPU = i686 mmx i586 i486 i386
|
||||
. elif ${CPUTYPE} == "i686"
|
||||
. elif ${CPUTYPE} == "pentiumpro"
|
||||
MACHINE_CPU = i686 i586 i486 i386
|
||||
. elif ${CPUTYPE} == "i586/mmx"
|
||||
. elif ${CPUTYPE} == "pentium-mmx"
|
||||
MACHINE_CPU = mmx i586 i486 i386
|
||||
. elif ${CPUTYPE} == "i586"
|
||||
. elif ${CPUTYPE} == "pentium"
|
||||
MACHINE_CPU = i586 i486 i386
|
||||
. elif ${CPUTYPE} == "i486"
|
||||
MACHINE_CPU = i486 i386
|
||||
|
Loading…
Reference in New Issue
Block a user