[PATCH] sb/setbuilder: Control buildsets using the --with-* command line option

Chris Johns chrisj at rtems.org
Mon May 9 00:55:13 UTC 2022


On 6/5/2022 10:41 pm, Frank Kühndel wrote:
> Hello Chris,
> 
> On 5/6/22 00:35, Chris Johns wrote:
>> On 5/5/2022 10:48 pm, Frank Kühndel wrote:
>>> Hi Chris,
>>>
>>> On 5/5/22 04:52, chrisj at rtems.org wrote:
>>>> From: Chris Johns <chrisj at rtems.org>
>>>>
>>>> - Expand macros in buildset file names
>>>>
>>>> - Add support to buildsets for `%defineifnot`
>>>>
>>>> - Update 6 and 7 to support command line build overrides
>>>>
>>>> Closes #4646
>>> Useful feature. Just two comments:
>>>
>>> 1) There exist other packages. Have these been forgotten or are they
>>> irrelevant for this purpose?
>>>
>>> mips: mipstx39-rtems6-gdb-11.2-x86_64-linux-gnu-1
>>> riscv: sis-2.29-x86_64-linux-gnu-1
>>> sparc: sis-2.29-x86_64-linux-gnu-1
>>> x86_64: grub2-2.06-x86_64-linux-gnu-1
>> Not irrelevant, may be forgotten but I would settle on limited time to check all
>> possible places, make the changes and test. The pattern to manage this is now
>> set so please feel free to post patches with further changes.
> 
> I have the same time limits for such task. I just wanted to ensure these
> are not accidentally forgotten.

:)

> 
>>
>>> 2) Are these new options worth documenting?
>> A great question and yes I would love to see this happen.
>>
>>> Currently:
>>>
>>> source-builder/sb-set-builder --help
>>> [...]
>>> --with-<label>         : Add the --with-<label> to the build
>>> --without-<label>      : Add the --without-<label> to the build
>>> [...]
>> The `--with-*` and `--without-*` is modelled after the configure option. There
>> is no means to know in the config scripts where and how they are used so there
>> is no simple way to produce relevant help messages. Updating the python based on
>> script does not seem wise to me.
>>
>>> There at least exist the following (from source-builder/config/checks.cfg):
>> Yeah and this is what makes it difficult to link back to the python `--help`.
>> The parser is too slow to scan all the sources to build a list when --help is used.
>>
>> A file in the `source-builder` directory called `help.ini` (or whatever) could
>> hold a list that is checked when a with or without macro is referenced in a
>> config file might work. If there is no help present a warning is printed. The
>> problem is updating the file when an option is removed from the config scripts?
>>
>> Another possible solution is to add something like:
>>
>>  %help with-rtems-gcc Set the path to a BSET build configuration for GCC
>>
>> And a tool could be written to parse the configs and update the file?
> 
> I was thinking of the much simpler solution of just adding a fixed text
> either to the output of the --help option or into the RTEMS User Manual
> and live with some options not being documented. On the other side, you
> have a point in generating the list automatically as there seem to exist
> quite a number of such --with-/--without- options.

Adding to the documentation is easy. Knowing when we can or should remove
something is hard. My recent review of the documentation has highlighted a range
of issues. I feel having a tool help maintain it's documentation helps.

> 
>>
>>> #
>>> # Process the command line --with-/--without- options.
>>> #
>>> %{?with_cxx:%define enable_cxx 1}
>>> %{?without_cxx:%define enable_cxx 0}
>>> %{?with_ada:%define enable_ada 1}
>>> %{?without_ada:%define enable_ada 0}
>>> %{?with_fortran:%define enable_fortran 1}
>>> %{?without_fortran:%define enable_fortran 0}
>>> %{?with_java:%define enable_java 1}
>>> %{?without_java:%define enable_java 0}
>>> %{?with_objc:%define enable_objc 1}
>>> %{?without_objc:%define enable_objc 0}
>>>
>>> (Note: --with-java does not work. GCC configure does not known language
>>> "java". See https://gcc.gnu.org/install/configure.html option
>>> --enable-languages)
>> Please raise a ticket ... a patch would also be welcome? :)
> 
> I created https://devel.rtems.org/ticket/4647

Thanks.
Chris


More information about the devel mailing list