NetBSD Problem Report #32389

From yamt@mwd.biglobe.ne.jp  Tue Dec 27 09:02:28 2005
Return-Path: <yamt@mwd.biglobe.ne.jp>
Received: from yamt.dyndns.org (FLA1Aai163.kng.mesh.ad.jp [61.193.102.163])
	by narn.netbsd.org (Postfix) with ESMTP id 6A26F63BA67
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 27 Dec 2005 09:02:28 +0000 (UTC)
Message-Id: <1135674112.017299.1353.nullmailer@yamt.dyndns.org>
Date: Tue, 27 Dec 2005 18:01:52 +0900
From: yamt@mwd.biglobe.ne.jp
Reply-To: yamt@mwd.biglobe.ne.jp
To: gnats-bugs@netbsd.org
Subject: sun2 GENERIC is not buildable
X-Send-Pr-Version: 3.95

>Number:         32389
>Category:       port-sun2
>Synopsis:       sun2 GENERIC is not buildable
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sun2-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 27 09:05:00 +0000 2005
>Closed-Date:    Fri Jan 13 07:14:29 +0000 2006
>Last-Modified:  Thu Mar 27 03:28:48 +0000 2008
>Originator:     YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release:        NetBSD 3.99.15
>Organization:

>Environment:
	cross-build on i386.
>Description:

	sun2 GENERIC is not buildable.  maybe due to src/common changes.

--- mulsi3.o ---
    compile  kern/mulsi3.o
    /exports/nbsd/src/common/lib/libc/arch/m68k/gen/mulsi3.S: Assembler messages:
    /exports/nbsd/src/common/lib/libc/arch/m68k/gen/mulsi3.S:49: Error: invalid instruction for this architecture; needs 68020 or 68030 or 68040 or 68060 or cpu32 or 5200 or 5206e or 528x or 5307 or 5407 or cfv4e -- statement `mulsl %sp@(8),%d0' ignored
    *** [mulsi3.o] Error code 1
    1 error

>How-To-Repeat:

>Fix:
	check ${MACHINE_ARCH} == "m68000" ?

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: yamt@netbsd.org
State-Changed-When: Fri, 13 Jan 2006 07:14:29 +0000
State-Changed-Why:
fixed by he@.


From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@netbsd.org, port-sun2-maintainer@netbsd.org,
	netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, yamt@netbsd.org,
	yamt@mwd.biglobe.ne.jp
Cc: 
Subject: Re: port-sun2/32389 (sun2 GENERIC is not buildable)
Date: Fri, 13 Jan 2006 08:25:49 -0500

 On Jan 13,  7:14am, yamt@netbsd.org (yamt@netbsd.org) wrote:
 -- Subject: Re: port-sun2/32389 (sun2 GENERIC is not buildable)

 | Synopsis: sun2 GENERIC is not buildable
 | 
 | State-Changed-From-To: open->closed
 | State-Changed-By: yamt@netbsd.org
 | State-Changed-When: Fri, 13 Jan 2006 07:14:29 +0000
 | State-Changed-Why:
 | fixed by he@.

 But now it is not bootable... It vm_faults.

 christos

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: christos@zoulas.com
Cc: gnats-bugs@NetBSD.org, port-sun2-maintainer@NetBSD.org,
	netbsd-bugs@NetBSD.org, gnats-admin@NetBSD.org,
	yamt@mwd.biglobe.ne.jp, tsutsui@ceres.dti.ne.jp
Subject: Re: port-sun2/32389 (sun2 GENERIC is not buildable)
Date: Sat, 14 Jan 2006 00:47:49 +0900

 In article <20060113132549.CDD7956534@rebar.astron.com>
 christos@zoulas.com wrote:

 > | fixed by he@.
 > 
 > But now it is not bootable... It vm_faults.

 Actually, sun2 has required different functions for libkern and libc.

 In the previous src/sys/lib/libkern/arch/m68k/Makefile.inc:
 ---
 .if defined(MACHINE_ARCH) && (${MACHINE_ARCH} == "m68000")
 SRCS+=  mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S
 SRCS+=  random.c
 random.o random.d: random.c
 .else
 SRCS+=  random.S
 .endif
 ---

 but in src/lib/libc/arch/m68k/gen/Makefile.inc:
 ---
 # 68000-based machines build with a libgcc that includes
 # much of the (soft)float and integer support that would 
 # otherwise be compiled here.
 .if     (${MACHINE_ARCH} == "m68000" || ${MKSOFTFLOAT} == "yes")
 SRCS+=  modf_ieee754.c                  # generic ieee754 version
 SRCS+=  flt_rounds_softfloat.S
 .else
 SRCS+=  modf.S
 SRCS+=  flt_rounds.S fpgetmask.S fpgetround.S fpgetsticky.S fpsetmask.S \
         fpsetround.S fpsetsticky.S
 SRCS+=  adddf3.S addsf3.S cmpdf2.S cmpsf2.S divdf3.S \
         divsf3.S divsi3.S extendsfdf2.S fixdfsi.S fixunsdfsi.S \
         floatsidf.S modsi3.S muldf3.S mulsf3.S mulsi3.S \
         subdf3.S subsf3.S truncdfsf2.S udivsi3.S \
         umodsi3.S umulsi3.S
 .endif
 ---

 I have no idea how to handle this in src/common, though.
 ---
 Izumi Tsutsui

From: christos@zoulas.com (Christos Zoulas)
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@NetBSD.org, port-sun2-maintainer@NetBSD.org,
	netbsd-bugs@NetBSD.org, gnats-admin@NetBSD.org,
	yamt@mwd.biglobe.ne.jp
Subject: Re: port-sun2/32389 (sun2 GENERIC is not buildable)
Date: Fri, 13 Jan 2006 10:58:44 -0500

 On Jan 14, 12:47am, tsutsui@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
 -- Subject: Re: port-sun2/32389 (sun2 GENERIC is not buildable)

 | In article <20060113132549.CDD7956534@rebar.astron.com>
 | christos@zoulas.com wrote:
 | 
 | > | fixed by he@.
 | > 
 | > But now it is not bootable... It vm_faults.
 | 
 | Actually, sun2 has required different functions for libkern and libc.
 | 
 | In the previous src/sys/lib/libkern/arch/m68k/Makefile.inc:
 | ---
 | .if defined(MACHINE_ARCH) && (${MACHINE_ARCH} == "m68000")
 | SRCS+=  mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S
 | SRCS+=  random.c
 | random.o random.d: random.c
 | .else
 | SRCS+=  random.S
 | .endif
 | ---
 | 
 | but in src/lib/libc/arch/m68k/gen/Makefile.inc:
 | ---
 | # 68000-based machines build with a libgcc that includes
 | # much of the (soft)float and integer support that would 
 | # otherwise be compiled here.
 | .if     (${MACHINE_ARCH} == "m68000" || ${MKSOFTFLOAT} == "yes")
 | SRCS+=  modf_ieee754.c                  # generic ieee754 version
 | SRCS+=  flt_rounds_softfloat.S
 | .else
 | SRCS+=  modf.S
 | SRCS+=  flt_rounds.S fpgetmask.S fpgetround.S fpgetsticky.S fpsetmask.S \
 |         fpsetround.S fpsetsticky.S
 | SRCS+=  adddf3.S addsf3.S cmpdf2.S cmpsf2.S divdf3.S \
 |         divsf3.S divsi3.S extendsfdf2.S fixdfsi.S fixunsdfsi.S \
 |         floatsidf.S modsi3.S muldf3.S mulsf3.S mulsi3.S \
 |         subdf3.S subsf3.S truncdfsf2.S udivsi3.S \
 |         umodsi3.S umulsi3.S
 | .endif
 | ---
 | 
 | I have no idea how to handle this in src/common, though.

 We did that by conditionally compiling the files based on __mc68010__...
 Perhaps we missed something? Can you take a look?

 christos

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@netbsd.org, port-sun2-maintainer@netbsd.org,
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
	yamt@mwd.biglobe.ne.jp
Cc: 
Subject: Re: port-sun2/32389 (sun2 GENERIC is not buildable)
Date: Fri, 13 Jan 2006 11:09:08 -0500

 On Jan 13,  4:00pm, christos@zoulas.com (Christos Zoulas) wrote:
 -- Subject: Re: port-sun2/32389 (sun2 GENERIC is not buildable)

 |  We did that by conditionally compiling the files based on __mc68010__...
 |  Perhaps we missed something? Can you take a look?
 |  
 I think I found and I fixed the problem. If someone can rebuild the kernel,
 I can run it. Or I will have to build a cross toolchain this weekend.

 christos

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: christos@zoulas.com
Cc: gnats-bugs@NetBSD.org, port-sun2-maintainer@NetBSD.org,
	netbsd-bugs@NetBSD.org, gnats-admin@NetBSD.org,
	yamt@mwd.biglobe.ne.jp, tsutsui@ceres.dti.ne.jp
Subject: Re: port-sun2/32389 (sun2 GENERIC is not buildable)
Date: Sat, 14 Jan 2006 01:18:49 +0900

 In article <20060113155844.F08A256534@rebar.astron.com>
 christos@zoulas.com wrote:

 > We did that by conditionally compiling the files based on __mc68010__...
 > Perhaps we missed something? Can you take a look?

 IIRC, *si3.S (mulsi3.S, divsi3.S, udivsi3.S, modsi3.S and umodsi3.S)
 functions are only required by libkern for m68010 because they are
 provided by libgcc.a for userland binaries.

 I'm not sure if this may cause any problems or not, though.
 ---
 Izumi Tsutsui


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.