Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Ccompile time Error in NetBSD-vax 6.0 kernel with TDB enabled.



Holm Tiffe wrote:

> While cross compiling NetBSD6.0-vax on a FreeBSD8.2 System I get the
> following compile time error in the vax kernel if TRAPDEBUG is enabled in
> the Kernel config file:
> 
> #   compile  RTVAX/syscall.o
> /home/holm/tmp/netbsd/root6/usr/src/obj/tooldir.FreeBSD-8.2-RELEASE-p10-i386/bin/vax--netbsdelf-gcc
> -fno-pic -ffreestanding -fno-zero-initialized-in-bss -g -O2
> -fno-strict-aliasing -std=gnu99 -Werror -Wall -Wno-main
> -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes
> -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual
> -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes
> -Wno-sign-compare --sysroot=/home/holm/tmp/netbsd/root6 -D_VAX_INLINE_ -I.
> -I../../../../../common/include -I../../../../arch -I../../../.. -nostdinc
> -DRTVAX300 -DDIAGNOSTIC -DDEBUG -DPMAPDEBUG -DTRAPDEBUG -DMAXUSERS=8
> -D_KERNEL -D_KERNEL_OPT -std=gnu99
> -I../../../../lib/libkern/../../../common/lib/libc/quad
> -I../../../../lib/libkern/../../../common/lib/libc/string
> -I../../../../lib/libkern/../../../common/lib/libc/arch/vax/string
> -I../../../../dist/ipf -c ../../../../arch/vax/vax/syscall.c
> ../../../../arch/vax/vax/syscall.c: In function 'syscall':
> ../../../../arch/vax/vax/syscall.c:81: error: 'frame' undeclared (first use 
> in this function)
> ../../../../arch/vax/vax/syscall.c:81: error: (Each undeclared identifier is 
> reported only once
> ../../../../arch/vax/vax/syscall.c:81: error: for each function it appears 
> in.)
> ../../../../arch/vax/vax/syscall.c:121: error: 'exptr' undeclared (first use 
> in this function)
> 
> *** Failed target:  syscall.o
> *** Failed command: echo '# ' "compile RTVAX/syscall.o" && echo
> /home/holm/tmp/netbsd/root6/usr/src/obj/tooldir.FreeBSD-8.2-RELEASE-p10-i386/bin/vax--netbsdelf-gcc
> -fno-pic -ffreestanding -fno-zero-initialized-in-bss -g -O2
> -fno-strict-aliasing -std=gnu99 -Werror -Wall -Wno-main
> -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes
> -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual
> -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes
> -Wno-sign-compare --sysroot=/home/holm/tmp/netbsd/root6 -D_VAX_INLINE_ -I.
> -I../../../../../common/include -I../../../../arch -I../../../.. -nostdinc
> -DRTVAX300 -DDIAGNOSTIC -DDEBUG -DPMAPDEBUG -DTRAPDEBUG -DMAXUSERS=8
> -D_KERNEL -D_KERNEL_OPT -std=gnu99
> -I../../../../lib/libkern/../../../common/lib/libc/quad
> -I../../../../lib/libkern/../../../common/lib/libc/string
> -I../../../../lib/libkern/../../../common/lib/libc/arch/vax/string
> -I../../../../dist/ipf -c ../../../../arch/vax/vax/syscall.c &&
> /home/holm/tmp/netbsd/root6/usr/src/obj/tooldir.FreeBSD-8.2-RELEASE-p10-i386/bin/vax--netbsdelf-gcc
> -fno-pic -ffreestanding -fno-zero-initialized-in-bss -g -O2
> -fno-strict-aliasing -std=gnu99 -Werror -Wall -Wno-main
> -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes
> -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual
> -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes
> -Wno-sign-compare --sysroot=/home/holm/tmp/netbsd/root6 -D_VAX_INLINE_ -I.
> -I../../../../../common/include -I../../../../arch -I../../../.. -nostdinc
> -DRTVAX300 -DDIAGNOSTIC -DDEBUG -DPMAPDEBUG -DTRAPDEBUG -DMAXUSERS=8
> -D_KERNEL -D_KERNEL_OPT -std=gnu99
> -I../../../../lib/libkern/../../../common/lib/libc/quad
> -I../../../../lib/libkern/../../../common/lib/libc/string
> -I../../../../lib/libkern/../../../common/lib/libc/arch/vax/string
> -I../../../../dist/ipf -c ../../../../arch/vax/vax/syscall.c && echo
> *** Error code 1
> 
> 
> Could please someone take a look at it, verify it and report a bug if
> neccessary?
> 
> Regards,
> 
> Holm
> -- 

looked at arch/vax/syscall.c and found that at line 75 this is missing:

struct trapframe * const exptr = tf;

and line 82 is to be changed from:
TDB(("trap syscall %s pc %lx, psl %lx, sp %lx, pid %d, frame %p\n",
            syscallnames[tf->tf_code], tf->tf_pc, tf->tf_psl,tf->tf_sp,
            p->p_pid,frame));

to

TDB(("trap syscall %s pc %lx, psl %lx, sp %lx, pid %d, frame %p\n",
            syscallnames[tf->tf_code], tf->tf_pc, tf->tf_psl,tf->tf_sp,
            p->p_pid,tf));

Regards,

Holm


-- 
      Technik Service u. Handel Tiffe, www.tsht.de, Holm Tiffe, 
     Freiberger Straße 42, 09600 Oberschöna, USt-Id: DE253710583
  www.tsht.de, info%tsht.de@localhost, Fax +49 3731 74200, Mobil: 0172 8790 741


Home | Main Index | Thread Index | Old Index