Subject: re: compiling a 32bit kernel
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: matthew green <mrg@eterna.com.au>
List: port-sparc64
Date: 11/12/2001 07:14:51
   On Mon, Nov 12, 2001 at 06:07:28AM +1100, matthew green wrote:
   >    
   >    Well, it doesn't for me.
   >    config GENERIC32; cd ../compile/GENERIC32; make depend && make
   >    fail the way I described.
   >    I forgot to add that I just sucessfully ran a build.sh on this machine,
   >    to the toolchain is up to date.
   > 
   > 
   > hmm.  i build GENERIC32 on my lapdog just now using the freshly
   > built toolchain i built via:
   > 
   > 	make MACHINE=sparc64 MACHINE_ARCH=sparc do-make-tools
   > 
   > can you use file(1) to find all the sparcv9 objects, and check
   > out what their compile looks like... something is going wrong
   > for your build.
   
   All objects are sparcv9. They're compiled with:
   cc  -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -Wno-uninitialized -Wno-main -Wa,-Av9a -mno-fpu -I. -I../../../../arch -I../../../.. 
-nostdinc -DSUN4U -DLKM -DMAXUSERS=64 -D_KERNEL -D_KERNEL_OPT -Dsparc64  -c swapnetbsd.c
   (this is just an example).
   
   BTW, do I need a special toolchain to build a 32bit kernel ? I though
   the sparc64 toolchain could do it ...
   
   I'm rebuilding a toolchain using your settings, I'll see if it
   helps.


oh.


you need to use a 32 bit compiler.  the 64bit compiler can output
32bit code but all the normal codegen/memory usage issues remain
for the same code, so i'd suggest installing a separate toolchain
for now....  


"cc -m32", "as -32" and "ld -m sparc_elf32" i think are the magic
otherwise...


.mrg.