Subject: netbsd-3-0 build failure
To: None <port-amiga@netbsd.org>
From: Anders Lindgren <ali@df.lth.se>
List: port-amiga
Date: 02/10/2006 00:41:59
I am trying to crossbuild a fresh checkout of netbsd-3-0 on my 
amd64/3.0_BETA box. IIRC the same applies to -current.

-------------8<-----------------8<------------------
#   compile  GENERIC/if_x25subr.o
/usr/build/tools.amiga/bin/m68k--netbsdelf-gcc -pipe -m68060 -Wa,-m68030 
-Wa,-m68851 -msoft-float -ffreestanding
-pipe -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith 
-Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare 
-fno-zero-initialized-in-bss -Damiga -DFPCOPROC -I. -I/usr/src/sys/arch 
-I/usr/src/sys -nostdinc
-DDRACO -DM68060 -DM68040 -DM68030 -DM68020 -DLKM -DMAXUSERS=8 -D_KERNEL 
-D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c 
/usr/src/sys/netccitt/if_x25subr.c
/usr/src/sys/netccitt/if_x25subr.c: In function `x25_ifinput':
/usr/src/sys/netccitt/if_x25subr.c:218: error: inconsistent operand 
constraints in an `asm'

*** Failed target:  if_x25subr.o
*** Failed command: echo '# ' "compile GENERIC/if_x25subr.o"; echo 
/usr/build/tools.amiga/bin/m68k--netbsdelf-gcc -pipe -m68060 -Wa,-m68030 
-Wa,-m68851 -msoft-float -ffreestanding -pipe -Werror -Wall -Wno-main 
-Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
-Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Damiga 
-DFPCOPROC -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DDRACO 
-DM68060 -DM68040 -DM68030 -DM68020 -DLKM -DMAXUSERS=8 -D_KERNEL 
-D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c 
/usr/src/sys/netccitt/if_x25subr.c; 
/usr/build/tools.amiga/bin/m68k--netbsdelf-gcc -pipe -m68060 -Wa,-m68030 
-Wa,-m68851 -msoft-float -ffreestanding -pipe -Werror -Wall -Wno-main 
-Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
-Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Damiga 
-DFPCOPROC -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DDRACO 
-DM68060 -DM68040 -DM68030 -DM68020 -DLKM -DMAXUSERS=8 -D_KERNEL 
-D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c 
/usr/src/sys/netccitt/if_x25subr.c
*** Error code 1

Stop.
-------------8<-----------------8<------------------

Line 218 of if_x25subr.c:218 is:

218:    schednetisr(isr);

..which looks like it might come from /usr/src/sys/net/netisr.h:149:

#ifndef schednetisr
#define schednetisr(anisr)      { netisr |= 1<<(anisr); setsoftnet(); }
#endif

..setsoftnet() in turn appears to come from:

#define setsoftnet()    do {ssir |= SIR_NET; setsoftint(); } while (0)

and:

#define setsoftint()    do { if (is_draco()) \
                                 single_inst_bset_b(*draco_intfrc, DRIRQ_SOFT); \
                             else \
                                 custom.intreq = INTF_SETCLR|INTF_SOFTINT; \
                         } while (0)


..in /usr/src/sys/arch/amiga/include/mtpr.h, meaning the culprit should be 
in /usr/src/sys/arch/m68k/include/asm_single.h:43:

#define single_inst_bset_b(var, bit)    \
         __asm __volatile ("orb %1,%0"   \
                 : "=m" (var)            \
                 : "di" ((u_char)bit), "0" (var))

..and this is where I stop, since I don't speak m68k assembly. :-)

Ideas? The file asm_single.h doesn't appear to have changed since at least
2005-12-24 according to cvs log...

/ali
:wq