Control buildsets using the --with-* command line option
The following thread has raise an important issue on how we can test newer versions of tools. This ticket is about providing a solution:
https://lists.rtems.org/pipermail/devel/2022-May/071458.html
The solution is allow users to specific a tool set on the command line for a build of tools. The standard option is --with-.*
. For example a command line could be:
../source-builder/sb-set-builder \
--prefix=/opt/rtems/6 \
--log=arm.txt \
--with-rtems-gcc=tools/rtems-gcc-head-newlib-head \
6/rtems-arm
The buildset logic is to be changed to expand macros for buildset file names and to add a new buildset specific keyword %defineifnot
. The tools default file becomes:
#
# Default tools configuration.
#
%include 6/rtems-base.bset
#
# Default RTEMS build. Override on the command line to the
# the RSB. For example to test the latest versino of gcc use:
#
# --with-rtems-gcc=tools/rtems-gcc-head-newlib-head
#
%defineifnot with_rtems_dtc devel/dtc-1.6.1-1
%defineifnot with_rtems_expat devel/expat-2.4.8-1
%defineifnot with_rtems_gmp devel/gmp-6.2.1
%defineifnot with_rtems_gdb tools/rtems-gdb-11.2
%defineifnot with_rtems_binutils tools/rtems-binutils-2.38
%defineifnot with_rtems_gcc tools/rtems-gcc-10-newlib-head
%defineifnot with_rtems_tools tools/rtems-tools-6
#
# Build gdb first to raise the Python install error as early as
# possible. GDB needs expat so it needs to be built before.
#
%{with_rtems_dtc}
%{with_rtems_expat}
%{with_rtems_gmp}
%{with_rtems_gdb}
%{with_rtems_binutils}
%{with_rtems_gcc}
%{with_rtems_tools}
This approach lets cron
based CI flows configure a build with the latest gcc, binutils etc so they can always be tested as a workflow.
The new keyword lets a define in a nested buildset file override a command line value. That may be needed.