[RTEMS Project] #3351: libbsd: Add support for conditional compilation of modules and compiler flags
RTEMS trac
trac at rtems.org
Tue Mar 20 09:37:37 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 | Resolution:
Keywords: libbsd waf IPSec | Blocked By:
Blocking: |
--------------------------------+---------------------------------
Comment (by Christian Mauderer):
Thanks for the input. Let me summarize how I understood you.
1. We try to find an officially supported set of build variants for the
library. That list should ideally not grow to more than 20 to 30 variants
over time. At the moment I would see the following three (of course we can
discuss the exact variants but maybe we should keep that for later (see
also note at the end regarding SSL and WiFi)):
- Size optimized with about the same functions as the classic stack: no
IPv6, no IPsec, maybe no <something else>; `-Os`
- Normal functionality that should cover most use cases: basically
everything that is available now; `-O2`
- IPSec: Normal + IPsec; `-O2`
- Debug build: Everything; `-Og` or `-O0`
2. We want to use ini files for configuring the variants.
3. The system should be build in a way that if the user really wants to
build an unsupported variant, he can use some own configuration file.
If that's what you meant I would be OK with this direction. Otherwise
please correct me.
Now some more guesswork about the implementation:
4. The top configuration files would include the following information:
- The modules to include into the build. That would replace the part
that is currently done in libbsd.py in the `def sources(mm)` with the
`mm.addModule(...)` lines.
- Extra compiler flags (like `-DINET6` or `-Og`) that should be added to
the ones already used for the modules. Some of them would have to be
removed from the modules and put here instead (`INET6`, ...)
5. Later the rest of the `libbsd.py` should be migrated to a ini too. But
that is not necessarily in the scope of this ticket.
6. When I'm already busy with changing the build process, it would be good
to remove the generated `libbsd_waf.py` completely (which most likely
needs quite some thought).
Is that about what you have thought?
How should we deliver the variants? Install them all and tell the user to
use `-lbsd_small` or `-lbsd_ipsec` when he links?
''Note for the build variants:''
Regarding SSL: I hope that this does not influence how other code is built
in libbsd. So it should be OK to put it into the base set. It would be
only linked in if some application uses it. Of course the installed
headers might have an influence on the user application.
Regarding WiFi: Maybe it's possible to deactivate it by default without an
extra build variant. I have already removed quite some big parts by re-
defining mainly the `_bsd_ifconfig_ieee80211_ctor()` as an empty function.
If that doesn't work another variant might could be useful.
--
Ticket URL: <http://devel.rtems.org/ticket/3351#comment:5>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list