amd64/82071: incorrect -march's parameter to build 32bit libraries

Shusnuke SHINOMIYA shino at fornext.org
Thu Jun 9 15:00:34 GMT 2005


>Number:         82071
>Category:       amd64
>Synopsis:       incorrect -march's parameter to build 32bit libraries
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 09 15:00:32 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Shusnuke SHINOMIYA
>Release:        FreeBSD/amd64 5.4-STABLE
>Organization:
>Environment:
FreeBSD walnut.net.ss.titech.ac.jp 5.4-STABLE FreeBSD 5.4-STABLE #0: Sat May  7 15:57:39 JST 2005     shino at walnut.net.ss.titech.ac.jp:/usr/obj/usr/src/sys/WALNUT  amd64

>Description:
In src/Makefile.inc1, -march's parameter is hard-coded as athlon-xp in order to build 32bit libraries.
But, I think appropriate -march in Intel Xeon environment is prescott.

BTW, nocona is not AMD CPU. However nocona is listed as `AMD CPUs' in share/examples/etc/make.conf.

>How-To-Repeat:

>Fix:
--- Makefile.inc1.orig  Thu Jun  9 23:30:41 2005
+++ Makefile.inc1       Thu Jun  9 23:35:26 2005
@@ -205,7 +205,13 @@
 # 32 bit world
 LIB32TMP=      ${OBJTREE}${.CURDIR}/lib32

-LIB32PREFLAGS= -m32 -march=athlon-xp -msse2 -mfancy-math-387 -DCOMPAT_32BIT
+LIB32PREFLAGS= -m32 -msse2 -mfancy-math-387 -DCOMPAT_32BIT
+.if ${TARGET_CPUTYPE} == "nocona"
+LIB32PREFLAGS+=        -march=prescott
+.else
+LIB32PREFLAGS+=        -march=athlon-xp
+.endif
+
 LIB32POSTFLAGS=        -I${LIB32TMP}/usr/include \
                -L${LIB32TMP}/usr/lib32 \
                -B${LIB32TMP}/usr/lib32

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-amd64 mailing list