RTEMS Tools | Provide an RTEMS STD C++ script in Python (#5)

Suraj Kumar (@the.m3chanic) gitlab at rtems.org
Tue Jul 9 15:59:46 UTC 2024




Suraj  Kumar commented on a discussion: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/5#note_108927


@chris Thanks, I have made the required changes and debugged them with `--dry-run` and `--log` and see that they are the outputs that I would like. Here are the final set of changes:

### To gcc-common-1.cfg

```
%define rtems_configdir %(echo %{_configdir} | cut -d':' -f1)
%define stdcxx_template %{rtems_configdir}/stdcxx-template.py
%define rsb_rtems_gcc_version %(%{_bindir}/%{_target}-gcc --version | head -1 | awk '{print $3}')
%define stdcxx_script %{_prefix}/share/gdb/python/rtems/stdcxx.py

cat %{stdcxx_template} | sed "s/@RSB_GCC_VERSION@/%{rsb_rtems_gcc_version}/g" > %{stdcxx_script}
```

I found that `_configdir` was the directory pointing to `rtems/config`, but was 4 copies of the same path separated by spaces, so `rtems_configdir` is a singular copy of that path. 

For reference, the macros expand to the following on my system: 

```
1. rtems_configdir - /home/the.m3chanic/quick-start/src/rsb/rtems/config
2. stdcxx_template - /home/the.m3chanic/quick-start/src/rsb/rtems/config/stdcxx-template.py
3. stdcxx_script - /home/suslaptop/quick-start/rtems/6/share/gdb/python/rtems/stdcxx.py
```

I think these would work well, I will do a test build in the meantime and verify everything works as it is supposed to.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/5#note_108927
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240709/2b3c34b3/attachment-0001.htm>


More information about the bugs mailing list