How to build start.o using waf?

Gedare Bloom gedare at rtems.org
Wed Oct 2 17:30:51 UTC 2019


On Wed, Oct 2, 2019 at 5:12 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> On 30/09/2019 15:14, Sebastian Huber wrote:
> > Hello,
> >
> > I would like to work on a new build system prototype. The idea is to use
> > specification items maintained by Doorstop (YAML files), a Python
> > configuration script and waf to build RTEMS and the tests. This is
> > similar to the libbsd build. The difference is that in libbsd the build
> > data is maintained directly in Python code (libbsd.py).
> >
> > How do you build a singe object file (start.o) from assembly files in
> > waf? An example would be great.
>
> I think I found it in:
>
> https://git.rtems.org/amar/waf-old.git/tree/py/waf/builder.py#n54
>
>         def start(self, source, defines=[]):
>                 from os.path import splitext, basename
>
>                 for s in source:
>                         file = splitext(basename(s))[0]
>                         self.ctx(
>                                 rule     = '${CC} -DASM ${CFLAGS} ${CPPFLAGS} ${DEFINES_ST:DEFINES}
> ${CPPPATH_ST:INCPATHS} -c -o ${TGT} ${SRC}',
>                                 source   = s,
>                                 target   = "%s.o" % file,
>                                 name     = "start_%s_o" % file,
>                                 features = "c casm bld_include src_include",
>                                 defines  = defines,
>                         )
>
It seems likely for a simple link you'd only need features="casm",
although I'm not sure.

>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list