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

Another problem with egcs-1.0.2-prerelease



Ok.  Finally.  You have:

RTEMS_CPU_MODEL=m68360

in your BSP.cfg.

I have:

RTEMS_CPU_MODEL=mcpu32



   Sorry for all my mindless banterings.  I knew I encountered this.

    Cheers,
    Jake


> 
> I just tried building rtems-980219 (gen68360) with the egcs-1.0.2  
> prerelease.  I modified the egcs source as mentioned previously here  
> so that -mcpu32 implied -msoft-float.  I also changed  
> make/custom/gen68360.cfg to:
> 
> ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
> CPU_CFLAGS= -m68040
> else
> CPU_CFLAGS = -mcpu32
> endif
> 
> 
> Things worked fine until I got
> #error "Unsupported CPU Model"
> from c/src/exec/score/cpu/m68k/m68k.h while attempting to compile  
> c/src/exec/score/cpu/m68k/cpu.c
> 
> 
> 
> The problem is that m68k.h has lines like
> #elif defined(mcpu32)
> 
> The compiler is invoked as
> m68k-rtems-gcc --pipe  -mcpu32 -Wall -ansi -fasm -g ........
> 
> The `-mcpu32' flag normally causes mcpu32 and __mcpu32__ to be  
> predefined.  The `-ansi' flag turns off the definition of mcpu32,  
> though.
> 
> 
> 
> I thought the fix would be to change all the `ifdef' lines in m68k.h  
> by prepending and appending two underscores to each of the names  
> being tested.  I then ran into problems when building the  
> gen68360_040 target.  It seems that -m68040 doesn't predefine *any*  
> of the symbols, even when -ansi is not specified.
> 
> So, it seems that the best thing to do is to make gen68360.cfg look like:
> ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
> CPU_CFLAGS= -m68040
> CPU_DEFINES += -Dm68040 -D__m68040__
> else
> CPU_CFLAGS = -mcpu32
> CPU_DEFINES += -Dmcpu32 -D__mcpu32__
> endif
> 
> 
> ---
> Eric Norum                                 eric at skatter.usask.ca
> Saskatchewan Accelerator Laboratory        Phone: (306) 966-6308
> University of Saskatchewan                 FAX:   (306) 966-6058
> Saskatoon, Canada.
> 


-- 
   janovetz at uiuc.edu    | Once you have flown, you will walk the earth with
 University of Illinois | your eyes turned skyward, for there you have been,
                        | there you long to return.     -- da Vinci
        PP-ASEL         | http://www.ews.uiuc.edu/~janovetz/index.html