John Klos | 2 Oct 2009 21:23

Problem compiling landisk kernels

Hi,

I just thought I'd mention that I can't compile netbsd-5 GERNERIC landisk 
kernels because of this error:

--- pci_usrreq.o ---
#   compile  JAGUAR/pci_usrreq.o
/usr/tools/bin/shle--netbsdelf-gcc -ffreestanding -fno-zero-initialized-in-bss 
-Os -freorder-blocks -std=gnu99 -fno-strict-aliasing -Werror -Wall -Wno-main 
-Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
-Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings 
-Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign -Wno-attributes 
-Werror -m4-nofpu -Dlandisk -I. -I/usr/src/sys/../common/include 
-I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DSH7751R -DDONT_INIT_BSC 
-DMAXUSERS=16 -D_KERNEL -D_KERNEL_OPT 
-I/usr/src/sys/lib/libkern/../../../common/lib/libc/quad 
-I/usr/src/sys/lib/libkern/../../../common/lib/libc/string 
-I/usr/src/sys/lib/libkern/../../../common/lib/libc/arch/sh3/string 
-I/usr/src/sys/dist/ipf -c /usr/src/sys/dev/pci/pci_usrreq.c
  --- pci_usrreq.o ---
cc1: warnings being treated as errors /usr/src/sys/dev/pci/pci_usrreq.c: In 
function 'pcimmap':
/usr/src/sys/dev/pci/pci_usrreq.c:148: warning: implicit declaration of 
function 'bus_space_mmap'
*** [pci_usrreq.o] Error code 1
1 error

nbmake: stopped in /usr/obj/sys/arch/landisk/compile/JAGUAR

ERROR: Failed to make all in /usr/obj/sys/arch/landisk/compile/JAGUAR
(Continue reading)

Havard Eidnes | 12 Oct 2009 20:28
Picon

sh3 build error

Hi,

there is a build error which occurs while cross-building
rf_copyback.c as part of sys/rump/dev/lib/libraidframe for the
sh3 ports.  The new assembler is apparently more picky, and won't
let

	tas.b  <at> (r0,r9)

pass through, as in this snippet:

rf_CopybackComplete:
        mov.l   r8, <at> -r15
        tst     r5,r5
        mov.l   r9, <at> -r15
        mov     r5,r6
        mov.l   r10, <at> -r15
        mov     r4,r10
        mov.l   r14, <at> -r15
        sts.l   pr, <at> -r15
        add     #-12,r15
        mov     r15,r14
        bf.s    .L51
        mov.l    <at> r4,r9
        mov.w   .L63,r0
	1:      tas.b    <at> (r0,r9)
        bf      1b

which is taken from the gcc-generated file (the leading tab
before the 1: label can be elminated for the cost of a newline,
(Continue reading)

Valeriy E. Ushakov | 13 Oct 2009 02:45
Picon

Re: sh3 build error

On Mon, Oct 12, 2009 at 20:28:37 +0200, Havard Eidnes wrote:

> there is a build error which occurs while cross-building
> rf_copyback.c as part of sys/rump/dev/lib/libraidframe for the
> sh3 ports.  The new assembler is apparently more picky, and won't
> let
> 
> 	tas.b  <at> (r0,r9)
> 
> pass through, as in this snippet:
[...]
> Nick traced this back to __cpu_simple_lock(), which does this:
> 
> static __inline void
> __cpu_simple_lock(__cpu_simple_lock_t *alp)
> {
> 
>          __asm volatile(
>                 "1:     tas.b   %0      \n"
>                 "       bf      1b      \n"
>                 : "=m" (*alp)
>                 : /* no inputs */
>                 : "cc");
> }
> 
> and apparently the actual pointer isn't readily available in a
> register at that point.
> 
> Even though I don't know the sh3 architecture at all, I hope I
> found a fix for this problem:
(Continue reading)

Valeriy E. Ushakov | 13 Oct 2009 17:47
Picon

Re: sh3 build error

On Mon, Oct 12, 2009 at 20:28:37 +0200, Havard Eidnes wrote:

> there is a build error which occurs while cross-building
> rf_copyback.c as part of sys/rump/dev/lib/libraidframe for the
> sh3 ports.

Fixed now.

SY, Uwe
--

-- 
uwe <at> stderr.spb.ru                       |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen


Gmane