zyfeier opened a new pull request, #21618:
URL: https://github.com/apache/nuttx/pull/21618
## Summary
* Why: get_smartcode_ctc_root() aborted the CMake configuration with a
FATAL_ERROR when the TASKING toolchain was not yet discoverable, and two
separate mechanisms derived the toolchain root: find_program(cctc) for
the include paths versus a dirname of CMAKE_C_COMPILER (plus a Windows
drive-letter path regex) for the toolchain libraries.
* What: the root discovery is merged into a single fault-tolerant
get_tasking_ctc_root() helper - it returns an empty result instead of
failing, the include paths are only added when the root was found, and
nuttx_find_toolchain_lib() reuses the discovered root (the cygwin-style
path regex is dropped).
* How: only arch/tricore/src/cmake/tasking.cmake is touched; the
tc3xx/tc162 and tc4xx/tc18 library branches are kept, with the path
adjusted to the new root definition (parent of the bin directory).
## Impact
* Is new feature added? Is existing feature changed? YES - the TASKING
CMake toolchain root discovery is consolidated and made fault-tolerant.
* Impact on user (will user need to adapt to change)? NO
* Impact on build (will build process change)? YES - minor: TASKING builds
derive include and library paths from a single find_program()-based
discovery instead of failing hard or deriving from CMAKE_C_COMPILER.
* Impact on hardware (will arch(s) / board(s) / driver(s) change)? NO
* Impact on documentation (is update required / provided)? NO
* Impact on security (any sort of implications)? NO
* Impact on compatibility (backward/forward/interoperability)? NO
## Testing
I confirm that changes are verified on local setup and works as intended:
* Build Host(s): Linux x86_64, TASKING SmartCode cctc v10.4 /
tricore-elf-gcc 11.3.1, CMake 3.28.3 + Ninja
* Target(s): triboard_tc4x9_com:nsh_tasking (TASKING CMake/Ninja),
triboard_tc4x9_com:nsh (GNU make regression)
The TASKING build passes and the generated rules confirm the new paths are
in effect:
`-L<ctc root>/lib/tc18` for the toolchain libraries and
`-I<ctc root>/include.cxx/support/tasking` for the includes.
Testing logs (triboard_tc4x9_com:nsh_tasking, TASKING CMake/Ninja):
```
ltc I402: activating file producing phase
ltc I433: emitting object files (task1)
ltc I434: emitting report files (task1)
```
Testing logs (triboard_tc4x9_com:nsh, GNU make):
```
LD: nuttx
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]