[RTEMS Project] #3351: libbsd: Add support for conditional compilation of modules and compiler flags

RTEMS trac trac at rtems.org
Fri Mar 23 06:52:11 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 Chris Johns):

 I think the simplest solution is to:

 1. Leave `libbsd.py` as is for now. I feel this file can be split into
 parts after an initial refactoring has been completed.

 2. Create `waf_libbsd.py` which is a copy of `libbsd_waf.py` and convert
 all the `self.add('')` calls into actual code. I thnk `freebsd-to-
 rtems.py` can use the `builder.py` base class because all it needs to call
 is `processSource()` which is all in `builder.py`.

 3. Add class methods to match the required `waf` functions:
  a. `init`
  b. `options`
  c. `bsp_configure`
  d. `configure`
  e. `build`

 4. Update `wscript` to create a `Modules` instance and hold globally. It
 then uses it for each of it's calls.

 5. Update `freebsd-to-rtems.py` to use `waf_libbsd.py` and remove the
 generate code.

 This conversion is not too difficult. The INI configuration support can be
 built on opt of this. The result is:

 a. List of modules to build
 b. Defines
 c. Compile flags

--
Ticket URL: <http://devel.rtems.org/ticket/3351#comment:8>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list