In gcc/config/m68k/linux-unwind.h, the function m68k_fallback_frame_state() has
the following:

if (*(int *) sc->sc_fpstate)
  {
    int *fpregs = (int *) sc->sc_fpregs;

    fs->regs.reg[16].how = REG_SAVED_OFFSET;
    fs->regs.reg[16].loc.offset = (long) &fpregs[0] - cfa;
    fs->regs.reg[17].how = REG_SAVED_OFFSET;
    fs->regs.reg[17].loc.offset = (long) &fpregs[M68K_FP_SIZE/4] - cfa;
  }

The variable "sc" is of type "struct sigcontext", which is defined the linux
kernel headers in asm/sigcontext.h. For asm-m68k, the sigcontext structure has
members sc_fpregs, sc_fpcntl, and sc_fpstate. For asm-m68knommu, the sigcontext
structure does not have the sc_fp... members. This causes the gcc build to
break in libgcc when the asm-m68knommu kernel headers are used. This is so with
the uClinux 2.4 kernel and the vanilla linux 2.6 kernel.

I'm not too familiar with the code in linux-unwind.h, but one solution might be
to wrap the above code in an "#ifdef __mcffpu__".


-- 
           Summary: m68k/coldfire gcc build breaks due to sc_fpstate,
                    sc_fpregs reference
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kendallc at vxitech dot com
GCC target triplet: m68k-unknown-uclinux-uclibc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36070

Reply via email to