From ac78a5a21fded24cb3995967b9dc1ec042777e62 Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Thu, 22 Dec 2022 15:26:21 -0800 Subject: [PATCH] gnupg2: refresh GCC options in Makefile this Makefile still used `CONFIG_GCC_USE_VERSION_*` to select various compilation options, for GCC versions that are antiquated convert to parsing the major from the `CONFIG_GCC_VERSION` which will always exist and can also be used with range logic intent seemed to be: * `-DEXTERN_UNLESS_MAIN_MODULE=static` for "=10" (and newer, probably) * no additional options for "not =10" (or older, probably) GCC 11 or 12 would likely revert to the default (not =10) option, because 10 was the newest at the time, and 11 and 12 are "not 10" Signed-off-by: Tony Butler --- utils/gnupg2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gnupg2/Makefile b/utils/gnupg2/Makefile index ce81a88b9f..5982d3d1db 100644 --- a/utils/gnupg2/Makefile +++ b/utils/gnupg2/Makefile @@ -104,7 +104,7 @@ CONFIGURE_ARGS += \ --disable-tests \ --disable-zip -TARGET_CFLAGS += $(if $(CONFIG_GCC_USE_VERSION_10),-DEXTERN_UNLESS_MAIN_MODULE=static) +TARGET_CFLAGS += $(if $(filter-out 5 6 7 8 9,$(word 1,$(subst ., ,$(call qstrip,$(CONFIG_GCC_VERSION))))),-DEXTERN_UNLESS_MAIN_MODULE=static) define Package/gnupg2/install $(INSTALL_DIR) $(1)/usr/bin