xuxin930 opened a new pull request, #18194:
URL: https://github.com/apache/nuttx/pull/18194
## Summary
This PR contains a comprehensive series of CMake build system bugfixes and
optimizations to improve reliability, compatibility, and robustness across
different platforms and architectures:
1. **Change default compile object extension to .o**: Override CMake's
default object file extension to ensure consistent `.o` files on non-Windows
platforms, improving build consistency and compatibility.
2. **Remove unused libmad link in SIM build**: Clean up simulator build
configuration by removing an unused `libmad` library dependency that was
incorrectly linked, reducing unnecessary build dependencies.
3. **Separate extra flags to avoid parsing errors**: Fix a critical issue
where EXTRA_FLAGS were not properly parsed when containing spaces or special
characters. Now using CMake's `separate_arguments()` function to correctly
handle these flags, preventing build failures with complex configurations.
4. **Fix armv8m missing compile option in CMake**: Correct the ARM
Cortex-M55 with MVE (M-Profile Vector Extension) configuration by properly
including `${EXTCPUFLAGS}` in the march flags, ensuring correct floating-point
extensions are applied.
5. **Fix common/etc conflict with src/etc in CMake genromfs**: Resolve a
duplicate dependency issue in ROMFS generation when both `common/etc` and
`src/etc` paths exist. Now uses CMake's APPEND option to handle multiple
sources correctly, eliminating configuration conflicts.
6. **Do not set nuttx_add_app NAME as required**: Make the NAME parameter
optional in the `nuttx_add_application()` function, allowing more flexible
application registration for advanced build scenarios.
These are all optimization-focused bugfixes that enhance the build system's
robustness without introducing breaking changes.
## Impact
- **Build System**: Improves build consistency, reliability, and flexibility
on all platforms, particularly on Linux/Unix systems
- **Compatibility**: Fixes ARM Cortex-M55 with MVE support, ensuring proper
floating-point compilation flags
- **Robustness**: Resolves configuration parsing issues that could cause
failures with complex EXTRA_FLAGS
- **Performance**: Removes unnecessary dependencies, reducing build overhead
- **Configuration**: Makes application registration more flexible for
advanced build scenarios
- **No Breaking Changes**: These are pure optimizations and bugfixes that
improve existing functionality
## Testing
All changes have been tested through:
- CMake configuration generation and build verification on Linux/Unix
platforms
- ARM architecture builds with Cortex-M55 MVE configurations
- Simulator builds with ALSA audio support enabled
- ROMFS generation with multiple source directories
- Application registration with and without NAME parameter
The changes follow the NuttX CMake build system conventions and do not
introduce any breaking changes to existing build configurations. All
modifications are backward compatible with existing build scripts and
configurations.
--
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]