From 76634cadd0c180fbb70624ce18c36678fd078520 Mon Sep 17 00:00:00 2001 From: Andrei Tatar Date: Mon, 14 Aug 2023 16:44:20 +0200 Subject: [PATCH] Makefile.uk: Add minimum compiler version check libcxx 14 relies on some C++ features that are only implemented starting from GCC 11 and Clang 10. This change adds an explicit compiler version check to warn the user about this incompatibility. Signed-off-by: Andrei Tatar Reviewed-by: Stefan Jumarea Reviewed-by: Maria Sfiraiala Reviewed-by: Radu Nichita Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #33 --- Makefile.uk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.uk b/Makefile.uk index 7288e6e..9939c6c 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -39,6 +39,14 @@ ################################################################################ $(eval $(call addlib_s,libcxx,$(CONFIG_LIBCXX))) +ifeq ($(CONFIG_LIBCXX),y) +ifeq ($(call have_gcc),y) +$(call error_if_gcc_version_lt,11,0) +else ifeq ($(call have_clang),y) +$(call error_if_clang_version_lt,10,0) +endif +endif + ################################################################################ # Sources ################################################################################ -- 2.39.5