net/asterisk-11.x and net/asterisk-13.x: fix LOW_MEMORY, drop patch
LOW_MEMORY can't be enabled by defining it in ASTCFLAGS. This can be verified in the headers Asterisk installs: LOW_MEMORY actually is not defined (it would be if LOW_MEMORY was enabled). LOW_MEMORY can be enabled successfully with menuselect. This commit makes menuselect usable and calls it to enable LOW_MEMORY. This commit also disables BUILD_NATIVE with menuselect. So even if configure detects that -march=native is available, it won't be used. This means the configure.ac patch that was added previously can be dropped. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
parent
f616ed7c6e
commit
eead619fb1
4 changed files with 14 additions and 30 deletions
|
@ -323,10 +323,16 @@ define Build/Compile
|
|||
CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \
|
||||
LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)/menuselect"
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" menuselect-tree
|
||||
cd "$(PKG_BUILD_DIR)" && \
|
||||
./menuselect/menuselect \
|
||||
--disable BUILD_NATIVE \
|
||||
--enable LOW_MEMORY \
|
||||
menuselect.makeopts
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" include/asterisk/version.h \
|
||||
include/asterisk/buildopts.h defaults.h \
|
||||
makeopts.embed_rules
|
||||
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
|
||||
ASTCFLAGS="$(EXTRA_CFLAGS)" \
|
||||
ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
||||
ASTVARLIBDIR="/usr/lib/asterisk" \
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1104,7 +1104,10 @@ fi
|
||||
AC_SUBST(AST_SHADOW_WARNINGS)
|
||||
|
||||
AC_MSG_CHECKING(for -march=native support)
|
||||
-if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
|
||||
+if test "${cross_compiling}" = "yes"; then
|
||||
+ AC_MSG_RESULT(cross-compile)
|
||||
+ AST_NATIVE_ARCH=0
|
||||
+elif $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
|
||||
AC_MSG_RESULT(yes)
|
||||
AST_NATIVE_ARCH=1
|
||||
else
|
|
@ -264,10 +264,16 @@ define Build/Compile
|
|||
CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \
|
||||
LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)/menuselect"
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" menuselect-tree
|
||||
cd "$(PKG_BUILD_DIR)" && \
|
||||
./menuselect/menuselect \
|
||||
--disable BUILD_NATIVE \
|
||||
--enable LOW_MEMORY \
|
||||
menuselect.makeopts
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
||||
include/asterisk/version.h \
|
||||
include/asterisk/buildopts.h defaults.h
|
||||
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
|
||||
ASTCFLAGS="$(EXTRA_CFLAGS)" \
|
||||
ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
||||
ASTVARLIBDIR="/usr/lib/asterisk" \
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1226,7 +1226,10 @@ fi
|
||||
AC_SUBST(AST_SHADOW_WARNINGS)
|
||||
|
||||
AC_MSG_CHECKING(for -march=native support)
|
||||
-if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
|
||||
+if test "${cross_compiling}" = "yes"; then
|
||||
+ AC_MSG_RESULT(cross-compile)
|
||||
+ AST_NATIVE_ARCH=0
|
||||
+elif $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
|
||||
AC_MSG_RESULT(yes)
|
||||
AST_NATIVE_ARCH=1
|
||||
else
|
Loading…
Reference in a new issue