Build problems with latest snapshot.

Sergei Organov osv at javad.ru
Mon Mar 20 10:06:13 UTC 2000


Hello,

Please see below.

Ralf Corsepius <corsepiu at faw.uni-ulm.de> writes:
> Sergei Organov wrote:
> 
> > Hello,
> >
> > I'm trying to configure/build the latest RTEMS snapshot (20000118) for
> > PowerPC/papyrus target as a first step of my attempt to port 4.x RTEMS to the
> > MPC5xx processors. I use gcc-2.95.2 and newlib-1.8.2.
> >
> > Well, after a few troubles were solved, I finally got it to
> > configure/compile/link. I still have some questions though:
> >
> 
> >
> > 2. My 'ppc-rtems-gcc' isn't able to link trivial application containing only
> >    main(){} if option -mno-eabi isn't given. This leads to two separate
> >    problems when configuring RTEMS. I didn't find a way to specify '-mno-eabi'
> >    as target compiler option for configuration process.
> 
> At the moment, you have to specify target flags in your BSP's
> make/custom/<bsp>.cfg.

I don't want to specify the flag for RTEMS building process, I need this flag
only to pass configuration without errors. Moreover, this flag should *NOT* be 
active when parts of RTEMS are compiled, so I don't think  this is the right
place to put it.

> 
> > The problem is that if
> >    I set "CFLAGS=-mno-eabi", then this is passed not only to the target
> >    compiler, but also to the native gcc that doesn't grok the unknown
> >    option.
> 
> Yep, this is a known problem with RTEMS current configuration scheme. Currently,
> you can't specify CFLAGS from the environment.
> 
> > I solved the problem by slightly modifying two m4 files in the
> >    RTEMS "aclocal" directory to pass options specified by CFLAGS_FOR_TARGET to
> >    the target compiler. The modified files are "check-newlib.m4" and
> >    "prog-cc.m4". I then set CFLAGS_FOR_TARGET both when configure and make the
> >    RTEMS, and that works for me.
> 
> Well, I guess, I know what you are doing, but I hesitate to add such a change
> right now, because this has side-effects on other issues with RTEMS's building
> scheme (eg. CFLAGS_FOR_TARGET vs CFLAGS_FOR_BSP :).

This should be active only for configuration process, i.e. only when configure 
scripts invoke target compiler to check if it works at all or if it links
executable with NEWLIB. If I rename CFLAGS_FOR_TARGET with
CONFIG_CFLAGS_FOR_TARGET (or some other name of your choice), do you think it
could be incorporated into the RTEMS sources? Maybe I'm wrong, but I don't see
any side effects of such a change.

> 
> > Is there better way to solve the problem?
> >
> 
> The recommended way is to add a make/custom/<bsp>.cfg for your BSP and to add
> appropriate flags there.

The flag I need shouldn't be active while building RTEMS, so I don't think
this is the right thing to do.

BR,
Sergei.




More information about the users mailing list