From b67a6d4fade5c2357fa0a94d2396f802a92e159e Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Tue, 5 Dec 2017 21:17:50 +0100 Subject: [PATCH] asterisk-15.x: workaround for build failure On the buildbots (and locally, too) the x86 builds currently fail. It's visible that the Asterisk build system attempts to build menuselect a second time, which fails because it follows the standard recipes in its Makefiles. The first build of menuselect on the other hand only works because the OpenWrt package sets up the build properly. The second build attempt happens because the menuselect CFLAGS category is setup to delete a stamp file when anything in it changes. On x86 -march=native is available, so the OpenWrt package disables that via menuselect, hence this item in the category is changed and the stamp file automatically removed. The missing stamp file triggers a rebuild of menuselect (which is not required for OpenWrt's intents and purposes). Another item in the CFLAGS category with which the package can have the same issue is LOW_MEMORY, but that is not enabled (changed) by default. Work around this problem by recreating the stamp file after the menuselect calls. Signed-off-by: Sebastian Kemper --- net/asterisk-15.x/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/net/asterisk-15.x/Makefile b/net/asterisk-15.x/Makefile index c191231..770e34b 100644 --- a/net/asterisk-15.x/Makefile +++ b/net/asterisk-15.x/Makefile @@ -420,6 +420,13 @@ define Build/Compile --disable BUILD_NATIVE \ $(if $(CONFIG_ASTERISK15_LOW_MEMORY),--enable LOW_MEMORY) \ menuselect.makeopts + # Hack: + # When changing anything in MENUSELECT_CFLAGS the file ".lastclean" + # gets deleted. E.g. when compiling on x86 for x86 "--disable + # BUILD_NATIVE" changes MENUSELECT_CFLAGS and the file gets removed. + # But that will result in a rebuild attempt of menuselect which will + # likely fail. Prevent that by recreating ".lastclean". + $(CP) "$(PKG_BUILD_DIR)/.cleancount" "$(PKG_BUILD_DIR)/.lastclean" $(call Build/Compile/Default,all install samples) endef -- 2.30.2