GCC -include option and waf

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Oct 20 05:33:06 UTC 2015


Hello,

how can I use the "-include file" GCC option with waf? In case I use this:

+    bld.objects(target = "objs07",
+                features = "c",
+                cflags = ['-include 
freebsd/sys/contrib/ncsw/build/dflags.h'] + cflags,

I get:

Waf: Entering directory 
`/scratch/git-rtems-libbsd/build/powerpc-rtems4.12-qoriq_t4240rdb'
[351/896] c: freebsd/sys/contrib/ncsw/Peripherals/BM/bm.c -> 
build/powerpc-rtems4.12-qoriq_t4240rdb/freebsd/sys/contrib/ncsw/Peripherals/BM/bm.c.16.o
cc1: fatal error:  freebsd/sys/contrib/ncsw/build/dflags.h: No such file 
or directory
compilation terminated.
Waf: Leaving directory 
`/scratch/git-rtems-libbsd/build/powerpc-rtems4.12-qoriq_t4240rdb'
Build failed
    -> task in 'objs07' failed (exit status 1):
           {task 36571024: c bm.c -> bm.c.16.o}
['/opt/rtems-4.12/bin/powerpc-rtems4.12-gcc', '-qrtems', 
'-B/opt/rtems-4.12/powerpc-rtems4.12/lib/', 
'-B/opt/rtems-4.12/powerpc-rtems4.12/qoriq_t4240rdb/lib/', '--specs', 
'bsp_specs', '-mcpu=e6500', '-mcpu=e6500', '-m32', '-m32', 
'-msdata=sysv', '-msdata=sysv', '-fno-common', '-fno-common', 
'-std=gnu++11', '-include freebsd/sys/contrib/ncsw/build/dflags.h', ..., 
'../../freebsd/sys/contrib/ncsw/Peripherals/BM/bm.c', '-c', '-o', 
'freebsd/sys/contrib/ncsw/Peripherals/BM/bm.c.16.o']

E.g. what is the equivalent of $(top_srcdir) or $(srcdir) in waf?

This -include is something else than a simple -I. It instructs GCC to 
include the specified file. So, this is a command line #include <...>.

-- 
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.

_______________________________________________
internal mailing list
internal at rtems.org
http://lists.rtems.org/mailman/listinfo/internal
_______________________________________________
internal mailing list
internal at rtems.org
http://lists.rtems.org/mailman/listinfo/internal


More information about the devel mailing list