This fixes the dependencies of the `arduino_adafruit_sensor` package,
which previously relied on the `arduino` feature. This feature no longer
exists, as it was split into more fine granular features. However, the
module should never have used that feature directly in the first place,
but rather just use the arduino module. This in turn depends on the
correct features.
19634: tree-wide: mixed box of compilation fixes with clang r=benpicco a=maribu
### Contribution description
As the title says: This should increase the number of apps being able to build with clang quite a bit.
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
LLVM was already blacklisted for some specific Cortex-M targets due
to register allocation failing. The issue now has spread. Rather than
starting a whack-a-mole game, let's disable LLVM altogether for that
package.
pkg/fff compiles fine with clang 16.0.0 and higher, but the CI currently
uses version 14.x.y which is incompatible. This disables LLVM in the CI
builds and prints a friendly error message when `TOOLCHAIN=llvm` is
used and clang is older than 16.0.0.
This triggers a known bug much more often than with gnu toolchains to
the point that merging this PR without disabling the test would
render the CI useless.
The sum of an `uint16_t` variable and a literal `1` should still be of
type `uin16_t`. And at least with LLVM 16 this seems to be the case,
but not with the LLVM version in our build container :/
So cast what should have been `uint16_t` anyway explicitly to `uint16_t`
to make that buggy version of LLVM happy.
Make writes to `the_same` "observable behavior" by declaring it
`volatile` to prevent compiler optimization rather than GCC specific
attributes.
Likely, either doesn't a super good job at resulting in constant
time code. But with the plain text password stored in flash, this
likely also isn't what should keep one up at night when actually using
this module.
`clang` doesn't propagate the packed attribute to members. I think
this incorrect, but explicitly adding it won't hurt and makes clang
happy. So let's have it.
Some of the `static inline` functions are only used in some
configurations, depending on the preprocessor. Explicitly disable the
warning to allow compilation with clang.
Drop type qualifiers in front of anonymous bit fields (padding for
reserved bits) for compatibility with `clang++`. A four line bash
script was added to ease fixing new vendor header files.