Subject: toolchain/25603: nbmakefs building with wrong param.h (MAXBSIZE) for Cross-Builds
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <sgimips@mrynet.com>
List: netbsd-bugs
Date: 05/17/2004 01:03:03
>Number: 25603
>Category: toolchain
>Synopsis: nbmakefs building with wrong param.h (MAXBSIZE) for Cross-Builds
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 17 01:04:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Scott G. Taylor
>Release: NetBSD 2.0E
>Organization:
>Environment:
SunOS mod40 5.9 Generic_112233-12 sun4u sparc SUNW,Ultra-5_10
>Description:
I just noticed that when nbmakefs is built, it is picking up the
native param.h, resulting in the wrong MAXBSIZE for the target
OS when cross-compiling. This behaviour is exhibited when cross-building, for example, NetBSD/sparc64 on a Solaris host.
The Solaris host defines MAXBSIZE to be 8192. NetBSD defines it to be
MAXPHYS, which is defined in all platforms' machine param.h to be
64K (with the exception of sun2 [56K] and arc [32K].
The result of this is that you can't generate release packages under
Solaris:
[ "work.built" = work.built -a -f install.fs -a ! install.fs -ot work.built ] || { echo '# ' " create " instfs/instal
l.fs; rm -f install.fs install.fs.tmp; /tiny/obj/sparc64-main/tooldir.SunOS-5.9-sparc/bin/nbmakefs -t ffs -B be -s 5m
-F work.spec -N /tiny/src/sparc64-main/etc -o bsize=4096,fsize=512 -o optimization=space,minfree=0 -o bsize=16k,fsize
=2k -f 15 install.fs.tmp work && mv -f install.fs.tmp install.fs; }
# create instfs/install.fs
Calculated size of `install.fs.tmp': 5242880 bytes, 949 inodes
block size 16384 is too large, maximum is 8192
*** Failed target: install.fs
It seems obvious that the native MAXBSIZE is being used, even though
the target's MAXBSIZE should be considered for the maximum block size.
Perhaps the makefs code should reference the param.h files in the
source tree rather than /usr/include/{sys,machine}/param.h?
>How-To-Repeat:
Cross-build and generate release sets for a NetBSD port on a Solaris 2.9 host.
>Fix:
Reengineer the toolchain build of makefs to use the NetBSD sys/param.h's version of MAXBSIZE rather than the cross-build host's version.
>Release-Note:
>Audit-Trail:
>Unformatted: