Subject: nbmakefs building with wrong param.h
To: None <tech-toolchain@netbsd.org>
From: sgimips NetBSD list <sgimips@mrynet.com>
List: tech-toolchain
Date: 05/16/2004 11:18:03
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 behavious 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/install.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?

-scott