From 453a8be4f3bab0ab930ef0203262352207be5260 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 7 Feb 2024 11:40:23 +0100 Subject: [PATCH] sys/cpp_new_delete: always enable the module when C++ is used --- cpu/avr8_common/Makefile.dep | 5 ----- sys/Makefile.dep | 4 ++++ sys/cpp11-compat/Makefile.dep | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cpu/avr8_common/Makefile.dep b/cpu/avr8_common/Makefile.dep index e6a7d7ff46..999288b384 100644 --- a/cpu/avr8_common/Makefile.dep +++ b/cpu/avr8_common/Makefile.dep @@ -19,8 +19,3 @@ USEMODULE += tiny_strerror_as_strerror ifneq (,$(filter cpp,$(FEATURES_USED))) USEMODULE += cxx_ctor_guards endif - -# new and delete operators needed -ifneq (,$(filter cpp,$(FEATURES_USED))) - USEMODULE += cpp_new_delete -endif diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 06765ece83..9061ead04f 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -41,6 +41,10 @@ ifneq (,$(filter crc32_fast,$(USEMODULE))) USEMODULE += checksum endif +ifneq (,$(filter cpp,$(USEMODULE))) + USEMODULE += cpp_new_delete +endif + ifneq (,$(filter debug_irq_disable,$(USEMODULE))) USEMODULE += fmt endif diff --git a/sys/cpp11-compat/Makefile.dep b/sys/cpp11-compat/Makefile.dep index 8cf19a4dc2..7c9818112f 100644 --- a/sys/cpp11-compat/Makefile.dep +++ b/sys/cpp11-compat/Makefile.dep @@ -1,4 +1,3 @@ -USEMODULE += cpp_new_delete USEMODULE += ztimer64_usec USEMODULE += timex FEATURES_REQUIRED += cpp