diff --git a/dist/tools/ci/build_and_test.sh b/dist/tools/ci/build_and_test.sh
index 68e5025e872e5a6ce24af6827f77f91e1e39454f..9399c99be6f2191145f1e32475e725bf17cd6d80 100755
--- a/dist/tools/ci/build_and_test.sh
+++ b/dist/tools/ci/build_and_test.sh
@@ -93,6 +93,7 @@ then
         run ./dist/tools/coccinelle/check.sh
         run ./dist/tools/flake8/check.sh
         run ./dist/tools/headerguards/check.sh
+        run ./dist/tools/buildsystem_sanity_check/check.sh
         exit $RESULT
     fi
 
diff --git a/pkg/fatfs/Makefile.dep b/pkg/fatfs/Makefile.dep
index 73eca11fe61ba081a9ceff155d002160b9b184ab..812803ae1e6b12605786e4495dc934e423026024 100644
--- a/pkg/fatfs/Makefile.dep
+++ b/pkg/fatfs/Makefile.dep
@@ -2,11 +2,5 @@ USEMODULE += fatfs_diskio_mtd
 USEMODULE += auto_init_storage
 USEMODULE += mtd
 
-include $(RIOTBASE)/boards/$(BOARD)/Makefile.features
-
-#if periph_rtc is available use it. Otherwise use static timestamps
-ifneq (, $(filter periph_rtc, $(FEATURES_PROVIDED)))
-  CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=0
-else
-  CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=1
-endif
+# Use RTC for timestamps if available
+FEATURES_OPTIONAL += periph_rtc
diff --git a/pkg/fatfs/Makefile.include b/pkg/fatfs/Makefile.include
index 918fe83c886b62773f8daad7fbebe542a69194d8..7fe6cb9347a78046c00d346907dacdf33431167e 100644
--- a/pkg/fatfs/Makefile.include
+++ b/pkg/fatfs/Makefile.include
@@ -9,6 +9,13 @@ ifneq (,$(filter fatfs_vfs,$(USEMODULE)))
   DIRS += $(RIOTBASE)/pkg/fatfs/fatfs_vfs
 endif
 
+#if periph_rtc is available use it. Otherwise use static timestamps
+ifneq (,$(filter periph_rtc,$(USEMODULE)))
+  CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=0
+else
+  CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=1
+endif
+
 ifeq ($(shell uname -s),Darwin)
   CFLAGS += -Wno-empty-body
 endif
diff --git a/sys/shell/commands/Makefile b/sys/shell/commands/Makefile
index 9f5c4604f15affffbe6aca94b6f29135f173d79b..268a6481c0d2eb05f4b3946ff0df9d5780d3f381 100644
--- a/sys/shell/commands/Makefile
+++ b/sys/shell/commands/Makefile
@@ -70,7 +70,7 @@ ifneq (,$(filter cord_ep,$(USEMODULE)))
   SRC += sc_cord_ep.c
 endif
 
-ifneq (,$(filter periph_rtc,$(FEATURES_PROVIDED)))
+ifneq (,$(filter periph_rtc,$(USEMODULE)))
   SRC += sc_rtc.c
 endif