... which would be provided through ecc_platform_specific.c but would
only so happen to work on native -- and conflicts with any
default_CSPRNG provided in the future (eg. through a newer libcose
packet).
Previously, external modules had to be individually added to both
EXTERNAL_MODULE_DIRS and USEMODULE. If those where not in sync, this
resulted in build errors.
With this commit, search folders for external modules are added to
EXTERNAL_MODULE_DIRS instead. So lets say the file system structure is
like this
```
└── /path/to/external/modules
├── mod_a
│ ├── Makefile
│ ├── Makefile.dep
│ ├── Makefile.include
│ ├── foo.c
│ └── include
│ └── external_module.h
└── mod_b
├── Makefile
└── bar.c
```
One now adds `/path/to/external/modules` to EXTERNAL_MODULES and only
with `USEMODULE += mod_a` the corresponding module, dependencies and
include settings are actually used. Hence, it is possible to configure
`EXTERNAL_MODULE_DIRS` from `~/.profile` or `~/.bashrc` once and never
needs to worry about them again.
When two threads use `gnrc_ipv6_nib_get_next_hop_l2addr()` to determine
a next hop (e.g. when there is both an IPv6 sender and a 6LoWPAN
fragment forwarder), a race condition may happen, where one thread
acquires the NIB and the other acquires the network interface resulting
in a deadlock. By releasing the NIB (if acquired) before trying to
acquire the network interface and re-acquiring the NIB after the network
interface is acquired, this is fixed.
The handle_trap function is used internally by the trap_entry
implementation from the same file. However, the trap_entry
implementation calls handle_trap from inline assembly. This makes it
difficult for the compiler to infer that the handle_trap function is
used at all. This causes issues when LTO is enabled.
Without this patch compiling any RISC-V RIOT code with `LTO=1` causes
the following linker error:
/home/soeren/src/RIOT/cpu/riscv_common/irq_arch.c:134: undefined reference to `handle_trap'
/tmp/hello-world.elf.Nngidp.ltrans0.ltrans.o:cpu/riscv_common/irq_arch.c:134:(.text.trap_entry+0x34):
relocation truncated to fit: R_RISCV_GPREL_I against undefined symbol `handle_trap'
This commit fixes LTO support for RISC-V.
While at it, also mark the function as static as it is only used by the
trap_entry function from the same compilation unit.