fix(build): add kconfig support for fortified toolchains

This commit is contained in:
Onur Özkan
2026-03-31 22:23:50 -08:00
committed by GitHub
parent 94580ab1e5
commit 7d392394dd
6 changed files with 40 additions and 7 deletions
+16
View File
@@ -70,3 +70,19 @@ The command line and GUI interfaces are shown below.
### menuconfig Command Line Interface
![menuconfig command line interface](../../assets/hardware/kconfig-guiconfig.png)
## 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.