Port-sparc64 archive

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

32-bit distribution for ultrasparc



Hi, I'm trying to see if I can get 32-bit X11 and userland working on sparc64 
via compat_netbsd32. So I'm building 32-bit sparc distribution 
with -mcpu=ultrasparc, which fails at the follwing point:

cc1: warnings being treated as errors
/opt/xsrc/xfree/xc/extras/Mesa/src/mesa/sparc/sparc.c: In 
function '_mesa_init_sparc_glapi_relocs':
/opt/xsrc/xfree/xc/extras/Mesa/src/mesa/sparc/sparc.c:167: warning: right 
shift count >= width of type
/opt/xsrc/xfree/xc/extras/Mesa/src/mesa/sparc/sparc.c:170: warning: right 
shift count >= width of type
*** [sparc.o] Error code 1
1 error

nbmake: stopped in /opt/src/x11/lib/OSmesa

Looking at sparc.c file, the error occurs in the following lines of code

void _mesa_init_sparc_glapi_relocs(void)
{
#ifdef USE_SPARC_ASM
        unsigned int *insn_ptr, *end_ptr;
        unsigned long disp_addr;

        insn_ptr = &_mesa_sparc_glapi_begin;
        end_ptr = &_mesa_sparc_glapi_end;
        disp_addr = (unsigned long) &_glapi_Dispatch;

        while (insn_ptr < end_ptr) {
#if (defined(__sparc_v9__) && (!defined(__linux__) || 
defined(__linux_sparc_64__)))
                insn_ptr[0] |= (disp_addr >> (32 + 10));
                insn_ptr[1] |= ((disp_addr & 0xffffffff) >> 10);
                __glapi_sparc_icache_flush(&insn_ptr[0]);
                insn_ptr[2] |= ((disp_addr >> 32) & ((1 << 10) - 1));
                insn_ptr[3] |= (disp_addr & ((1 << 10) - 1));
                __glapi_sparc_icache_flush(&insn_ptr[2]);
                insn_ptr += 11;
#else
                insn_ptr[0] |= (disp_addr >> 10);
                insn_ptr[1] |= (disp_addr & ((1 << 10) - 1));
                __glapi_sparc_icache_flush(&insn_ptr[0]);
                insn_ptr += 5;
#endif
        }
#endif /* USE_SPARC_ASM */
}

So, looks like __sparc_v9__ is defined when -mcpu=ultrasparc flag is used. 
Does anyone how to fix this? Because in this case ultrasparc != 64-bit ABI.

Another question is - when building X11 for sparc, does this build sunffb 
driver? If not, why not enable it as for sparc64?


Home | Main Index | Thread Index | Old Index