From ac09d1c2f1577a40dcf4eb0e3477a0a6b423ad8b Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Thu, 22 Dec 2022 15:24:45 -0800 Subject: [PATCH] imagemagick: 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: * `-flto` for "not =10" (or newer, probably) * no additional options for "=10" (and newer, 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" unsure of what actually works, perhaps `-flto` works in all versions by now (possibly early gcc 10 bug workaround?) GCC 11 will have been using `-flto` anyway by the current logic and I guess it must be working or there would have been changes Signed-off-by: Tony Butler --- multimedia/imagemagick/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/imagemagick/Makefile b/multimedia/imagemagick/Makefile index 53f69720eb..8c4e977755 100644 --- a/multimedia/imagemagick/Makefile +++ b/multimedia/imagemagick/Makefile @@ -110,7 +110,7 @@ CONFIGURE_ARGS += \ --with-png \ --with-tiff -TARGET_CFLAGS += $(if $(CONFIG_GCC_USE_VERSION_10),,-flto) +TARGET_CFLAGS += $(if $(filter-out 5 6 7 8 9,$(word 1,$(subst ., ,$(call qstrip,$(CONFIG_GCC_VERSION))))),,-flto) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include -- 2.30.2