From dd0de22a35f9b7d552a15fedf2f56dde50b53678 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 11 Jan 2023 22:34:27 +0100 Subject: [PATCH] gcc: limit postinst and postrm only with INCLUDE_STATIC_LINK_SPEC Limit postinst and postrm only with INCLUDE_STATIC_LINK_SPEC enabled as it's only needed to install and remove the generated spec file. Also remove extra tab from scripts. Signed-off-by: Christian Marangi --- devel/gcc/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/devel/gcc/Makefile b/devel/gcc/Makefile index 99f3fd6ebc..934de788bd 100644 --- a/devel/gcc/Makefile +++ b/devel/gcc/Makefile @@ -234,14 +234,18 @@ define Package/gcc/install chmod +x $(1)/usr/bin/gcc_env.sh endef +ifeq ($(CONFIG_INCLUDE_STATIC_LINK_SPEC),y) define Package/gcc/postinst - #!/bin/sh - $(INSTALL_STATIC_SPEC) +#!/bin/sh + +$(INSTALL_STATIC_SPEC) endef define Package/gcc/postrm - #!/bin/sh - $(REMOVE_STATIC_SPEC) +#!/bin/sh + +$(REMOVE_STATIC_SPEC) endef +endif $(eval $(call BuildPackage,gcc))