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


@chris  Thank you, I have gotten a better understanding of things from your 
comments. 

1. I was thinking of having it in the `src/rsb/source-builder/sb` directory 
along with where the other Python files seem to be situated. I was wondering if 
something like `../sb/stdcxx.py` would work or if there is an OS-independent 
form of resolving this relative path? 
2. Sure, fixed (Although, if it is already defined, is there anything stopping 
us from using that macro instead?)
3. Fixed 
4. Okay, this made the idea a lot clearer to me, I have implemented it in my 
code. 
5. Noted, fixed
6. Noted, thanks

Here are my updated modifications to `gcc-common-1.cfg`: 

### To get the current GCC Version for the target

```
%define stdcxx_script stdcxx-template.py
%define gcc_install_dir %{build_dir}/$SB_BUILD_ROOT/bin
%define rtems_gcc_version %(%{gcc_install_dir}/%{_target}-%{rtems_version}-gcc 
--version | head -1 | awk '{print $3}')
%define stdcxx_template_path ${build_top}/../sb/%{stdcxx_script}
```

 

### To modify existing stdcxx.py template 

```
cat %{stdcxx_template_path} | sed "s/@RSB_GCC_VERSION@/%{rtems_gcc_version}/g" 
> %{build_dir}/$SB_BUILD_ROOT/share/gdb/python/rtems/stdcxx.py
```

I hope this resolves the standing issues with the original version

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


_______________________________________________
bugs mailing list
bugs@rtems.org
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to