Commit d7bbd17
Use
This is part of the compiler not the libc and so is ok to use.
This addresses this compile error with the current compiler in Debian:
```
arm-none-eabi-gcc -march=armv5te -g -Os -marm -fpic -Wall -fno-common -fno-builtin -ffreestanding -nostdinc -fno-strict-aliasing -mno-thumb-interwork -fno-stack-protector -fno-toplevel-reorder -Wstrict-prototypes -Wno-format-nonliteral -Wno-format-security jtag-loop.c bare-metal.c -nostdlib -o jtag-loop.elf -T bare-metal.lds -Wl,-N
In file included from jtag-loop.c:21:
bare-metal.h:59:13: error: 'bool' cannot be defined via 'typedef'
59 | typedef int bool;
| ^~~~
bare-metal.h:59:13: note: 'bool' is a keyword with '-std=c23' onwards
```
To allow the use of `stdbool` drop use of `-nostdinc` when building bare metal
components. We will rely on the link phase and `-ffreestanding` along with
`-nostdlib` to prevent accidental use of stdlib features.
Signed-off-by: Ian Campbell <ijc@debian.org><stdbool.h> even on bare metal1 parent 1e057a0 commit d7bbd17
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | | - | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
0 commit comments