Subject: re: 32-bit packages
To: Greg Troxel <gdt@ir.bbn.com>
From: matthew green <mrg@eterna.com.au>
List: port-sparc64
Date: 01/08/2005 13:10:08
     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.

netbsd/sparc64 compiler can be built such that it knows how to build
code for 32 bit.  the -m32 flag seems to have lost a bit of it's workings
in the lastest gcc update (my fault :-) but it is supposed to work fine.
the includes don't change, either.  that is, the compiler and the includes
work together and do the right thing.
   
   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.

personally, i almost always build pkgs in a chroot.


.mrg.