--- a/Makefile.am
+++ b/Makefile.am
-@@ -550,7 +550,7 @@ libs/libzrtp/libzrtp.a:
+@@ -549,8 +549,13 @@ libs/libedit/src/.libs/libedit.a:
+ libs/libzrtp/libzrtp.a:
cd libs/libzrtp && $(MAKE)
++# !!! OpenWrt was here !!!
++# - added CROSS and set target to generic-gnu for cross-compile
++# - added CPPFLAGS to CFLAGS, otherwise they would be ignored
++# - disabled optimizations that would override OpenWrt's CFLAGS
++# - added a size limit like Debian does to address CVE-2017-0641
libs/libvpx/Makefile:
- cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
-+ cd libs/libvpx && CROSS="$(CROSS)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
++ cd libs/libvpx && CROSS="$(CROSS)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)" --disable-optimizations --size-limit=16384x16384
libs/libvpx/libvpx.a: libs/libvpx/Makefile
@cd libs/libvpx && $(MAKE)
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -550,7 +550,7 @@ libs/libzrtp/libzrtp.a:
- cd libs/libzrtp && $(MAKE)
-
- libs/libvpx/Makefile:
-- cd libs/libvpx && CROSS="$(CROSS)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
-+ cd libs/libvpx && CROSS="$(CROSS)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)" --disable-optimizations
-
- libs/libvpx/libvpx.a: libs/libvpx/Makefile
- @cd libs/libvpx && $(MAKE)
if ENABLE_LIBVPX
CORE_CFLAGS += -DSWITCH_HAVE_VPX
endif
-@@ -731,11 +730,6 @@ sndfile-reconf:
+@@ -736,11 +735,6 @@ sndfile-reconf:
cd libs/libsndfile && ./config.status --recheck
cd libs/libsndfile && ./config.status
python-reconf:
rm -f src/mod/languages/mod_python/Makefile
./config.status
-@@ -757,7 +751,7 @@ iks-reconf:
+@@ -762,7 +756,7 @@ iks-reconf:
cd libs/iksemel && sh ./configure.gnu $(MY_DEFAULT_ARGS)
$(MAKE) mod_dingaling-clean