Subject: Re: 32-bit packages
To: None <sigsegv@rambler.ru>
From: Greg Troxel <gdt@ir.bbn.com>
List: port-sparc64
Date: 01/07/2005 12:30:15
  Can't I install 32-bit libraries under /emul/netbsd32, use 64-bit gcc 
  which was installed with the base system and add '-m32' flag to it? Here 
  I'm assuming that gcc knows where to find 32-bit libraries and general 
  header files are the same for 32 and 64-bit architectures. Would that work?

maybe you could get this to work, but I don't think gcc will look for
libraries in different places.

Header files are not all the the same; types in general change across
architectures.  With pkg_comp all of the library and header stuff is
taken care of for you; as long as the native system can run binaries
in the chroot (and perhaps you fake uname with a package that does
that) you should be able to cross build without trouble.

My advice is to use pkg_comp rather than trying to make gcc -m32 find
the right libraries and header files - I think it will be much easier.