From 357949967f330ae1e6d199d1c362f2666de82c43 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 11 Jan 2020 23:44:38 +0100 Subject: [PATCH] asterisk-16.x: fix compile with PKG_ASLR_PIE CFLAGS aren't used when compiling objects for check_expr2. This commits adds the flags, which fixes the compilation when PKG_ASLR_PIE is enabled. Note: The STANDALONE define is removed because it is already defined in _ASTCFLAGS. Fixes #502 Signed-off-by: Sebastian Kemper --- net/asterisk-16.x/Makefile | 2 +- .../patches/056-fix-check_expr2-build.patch | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/net/asterisk-16.x/Makefile b/net/asterisk-16.x/Makefile index 7ab0715..6c1d2cb 100644 --- a/net/asterisk-16.x/Makefile +++ b/net/asterisk-16.x/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk AST_MAJOR_VERSION:=16 PKG_NAME:=asterisk$(AST_MAJOR_VERSION) PKG_VERSION:=$(AST_MAJOR_VERSION).6.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases diff --git a/net/asterisk-16.x/patches/056-fix-check_expr2-build.patch b/net/asterisk-16.x/patches/056-fix-check_expr2-build.patch index edc1edf..dca0193 100644 --- a/net/asterisk-16.x/patches/056-fix-check_expr2-build.patch +++ b/net/asterisk-16.x/patches/056-fix-check_expr2-build.patch @@ -1,6 +1,15 @@ --- a/utils/Makefile +++ b/utils/Makefile -@@ -187,7 +187,6 @@ check_expr2: $(ASTTOPDIR)/main/ast_expr2 +@@ -180,14 +180,13 @@ conf2ael: conf2ael.o ast_expr2f.o ast_ex + + check_expr2: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTTOPDIR)/main/ast_expr2.h astmm.o + $(ECHO_PREFIX) echo " [CC] ast_expr2f.c -> ast_expr2fz.o" +- $(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE $(ASTTOPDIR)/main/ast_expr2f.c -o ast_expr2fz.o ++ $(CC) -g -c -I$(ASTTOPDIR)/include $(_ASTCFLAGS) $(ASTTOPDIR)/main/ast_expr2f.c -o ast_expr2fz.o + $(ECHO_PREFIX) echo " [CC] ast_expr2.c -> ast_expr2z.o" +- $(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE2 $(ASTTOPDIR)/main/ast_expr2.c -o ast_expr2z.o ++ $(CC) -g -c -I$(ASTTOPDIR)/include $(_ASTCFLAGS) -DSTANDALONE2 $(ASTTOPDIR)/main/ast_expr2.c -o ast_expr2z.o + $(ECHO_PREFIX) echo " [LD] ast_expr2fz.o ast_expr2z.o -> check_expr2" $(CC) -g -o check_expr2 ast_expr2fz.o ast_expr2z.o astmm.o -lm $(_ASTLDFLAGS) $(ECHO_PREFIX) echo " [RM] ast_expr2fz.o ast_expr2z.o" rm ast_expr2z.o ast_expr2fz.o