If a CPUTYPE isn't specified, then don't use -march=k8 when compiling

32-bit compat libs on amd64 since -march=k8 may generate instructions
that are not implemented on Intel EM64T processors.  Instead, use
a simpler set of default flags that should work on all amd64-capable
CPUs.

PR:		amd64/113111
Submitted by:	NIIMI Satoshi  sa2c of sa2c.net
MFC after:	1 week
This commit is contained in:
jhb 2008-08-19 14:23:26 +00:00
parent ee27d03e64
commit 76ad1fe909

View File

@ -259,11 +259,11 @@ WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
LIB32TMP= ${OBJTREE}${.CURDIR}/lib32
.if empty(TARGET_CPUTYPE)
LIB32CPUTYPE= k8
LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2
.else
LIB32CPUTYPE= ${TARGET_CPUTYPE}
LIB32CPUFLAGS= -march=${TARGET_CPUTYPE}
.endif
LIB32FLAGS= -m32 -march=${LIB32CPUTYPE} -mfancy-math-387 -DCOMPAT_32BIT \
LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \
-iprefix ${LIB32TMP}/usr/ \
-L${LIB32TMP}/usr/lib32 \
-B${LIB32TMP}/usr/lib32