fatfs: Only build static version of lib
What changed, and why it matters
This commit changes the build configuration for the FatFs library so that it is always built as a static library rather than as either a static or shared library depending on the build environment. A static library is linked directly into the final program, whereas a shared library is loaded at runtime. This is a routine build-hardening change and does not fix a vulnerability on its own.
No security action required. Treat as a normal build-system maintenance change. If reviewing for supply-chain or build integrity, verify that downstream consumers still link the correct diskio middleware (asf4-drivers for firmware, mock_diskio for unit tests) as noted in the existing comment.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change in external/CMakeLists.txt converts the CMake target fatfs from a default library type (which CMake decides between STATIC or SHARED based on the BUILD_SHARED_LIBS variable) to an explicit STATIC library. This ensures the FatFs implementation is compiled into the consuming binary rather than being emitted as a separate shared object. There is no code change to FatFs logic, no patch to a known CVE, and no disclosed security issue in the commit message or diff.
Changed components
external/CMakeLists.txtfatfs build targetInspect captured patch +1 / −1
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 821f52b..0299703 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -265,7 +265,7 @@ endif() # CMAKE_CROSSCOMPILING
# fatfs must to be linked together with a diskio middleware:
# - in the firmware, it is linked with asf4-drivers, which contains sdmmc_diskio.c (writing to actual microSD cards)
# - in unit tests, it is linked with a lib containing mock_diskio.c (volume mounted in RAM).
-add_library(fatfs
+add_library(fatfs STATIC
fatfs/source/ff.c
fatfs/source/ffunicode.c
)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.