[RTEMS Project] #3351: libbsd: Add support for conditional compilation of modules and compiler flags
RTEMS trac
trac at rtems.org
Fri Mar 16 08:10:50 UTC 2018
#3351: libbsd: Add support for conditional compilation of modules and compiler
flags
---------------------------------+--------------------------------
Reporter: Christian Mauderer | Owner: Christian Mauderer
Type: enhancement | Status: assigned
Priority: normal | Milestone: Indefinite
Component: network/libbsd | Version: 5
Severity: normal | Keywords: libbsd waf IPSec
Blocked By: | Blocking:
---------------------------------+--------------------------------
I'll start in the next few days to add IPSec (client) support to the
libbsd. Because IPSec is quite deeply integrated into some parts of the
network stack it would have quite a performance impact on every system and
not only the ones using IPSec. Therefore it is necessary to compile this
support only conditionally.
From my point of view that means that the build system needs two new
capabilities:
1. For IPSec the whole stack has to be compiled with certain defines. If I
understood the FreeBSD build system correctly these defines would be set
via generated header files. In RTEMS we have static files for that (like
rtemsbsd/include/rtems/bsd/local/opt_inet6.h). I see two possibilities:
a. Generate the headers depending on a configure option.
b. Use empty headers like we already do it for a lot of options.
Depending on a configure option then add a '-DSOME_OPT=1' to the modules
that need it. That one would be my preferred way.
2. IPSec adds a number of source files that most likely only work if the
rest of the stack is compiled with the correct configuration. We already
have modules in the libbsd.py. But currently they are added or removed by
commenting the matching line in libbsd.py. My approach would be to make it
possible to enable or disable the modules depending on a command line
switch during configure.
I'm open for any suggestions regarding better solutions.
--
Ticket URL: <http://devel.rtems.org/ticket/3351>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list