mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 10:28:52 +08:00
fix(build): add kconfig support for fortified toolchains
This commit is contained in:
@@ -70,3 +70,19 @@ The command line and GUI interfaces are shown below.
|
||||
### menuconfig Command Line Interface
|
||||
|
||||

|
||||
|
||||
## Fortified Toolchain Compatibility
|
||||
|
||||
Some toolchains define `_FORTIFY_SOURCE` by default. Those toolchains generally require some optimization, which means PX4 configurations that use `-O0` may fail.
|
||||
|
||||
PX4 keeps the default debug optimization unchanged unless you explicitly opt in. To switch `PX4_DEBUG_OPT_LEVEL` from `-O0` to `-Og`, enable:
|
||||
|
||||
- `Toolchain > Fortified toolchain support`
|
||||
|
||||
This is the Kconfig symbol:
|
||||
|
||||
```sh
|
||||
CONFIG_BOARD_SUPPORT_FORTIFIED_TOOLCHAIN=y
|
||||
```
|
||||
|
||||
You can set it either in `boardconfig`/`boardguiconfig` or directly in your board's `*.px4board` file.
|
||||
|
||||
Reference in New Issue
Block a user