[vlc-devel] [PATCH] Contribs: add the possibility to build some contribs without optimization
Steve Lhomme
robUx4 at videolabs.io
Wed Feb 25 15:44:40 CET 2015
For better debugging
only ffmpeg, ebml and matroska for now
---
contrib/bootstrap | 5 +++++
contrib/src/ebml/rules.mak | 4 ++++
contrib/src/ffmpeg/rules.mak | 5 +++++
contrib/src/matroska/rules.mak | 4 ++++
4 files changed, 18 insertions(+)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index 4d2b826a..5895f35 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -30,6 +30,7 @@ usage()
echo " --disable-net configure to not build networking packages"
echo " --disable-sout configure to not build stream output packages"
echo " --enable-small optimize libraries for size with slight speed decrease [DANGEROUS]"
+ echo " --disable-optim disable optimization in libraries"
echo " --disable-gpl configure to not build viral GPL code"
}
@@ -74,6 +75,9 @@ do
--disable-sout)
BUILD_ENCODERS=
;;
+ --disable-optim)
+ DISABLE_OPTIM=1
+ ;;
--enable-small)
ENABLE_SMALL=1
;;
@@ -224,6 +228,7 @@ test -z "$PREFIX" || add_make "PREFIX := $PREFIX"
test -z "$BUILD_DISCS" || add_make_enabled "BUILD_DISCS"
test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
test -z "$BUILD_NETWORK" || add_make_enabled "BUILD_NETWORK"
+test -z "$DISABLE_OPTIM" || add_make_enabled "DISABLE_OPTIM"
test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
test -z "$GPL" || add_make_enabled "GPL"
diff --git a/contrib/src/ebml/rules.mak b/contrib/src/ebml/rules.mak
index 4a5ac16..78abbbc 100644
--- a/contrib/src/ebml/rules.mak
+++ b/contrib/src/ebml/rules.mak
@@ -17,6 +17,10 @@ libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml
EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions -fvisibility=hidden" \
CPPFLAGS=""
+ifdef DISABLE_OPTIM
+EBML_EXTRA_FLAGS += CPPFLAGS="${CPPFLAGS} -O0"
+endif
+
.ebml: libebml
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(EBML_EXTRA_FLAGS)
cd $< && $(MAKE) install
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 9041e09..fc7639c 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -50,9 +50,14 @@ FFMPEGCONF += --disable-encoders --disable-muxers
endif
# Small size
+ifdef DISABLE_OPTIM
+FFMPEGCONF += --optflags=-O0
+else
ifdef ENABLE_SMALL
FFMPEGCONF += --enable-small
endif
+endif
+
ifeq ($(ARCH),arm)
ifdef HAVE_ARMV7A
FFMPEGCONF += --enable-thumb
diff --git a/contrib/src/matroska/rules.mak b/contrib/src/matroska/rules.mak
index c71ee83..eb11583 100644
--- a/contrib/src/matroska/rules.mak
+++ b/contrib/src/matroska/rules.mak
@@ -18,6 +18,10 @@ libmatroska: libmatroska-$(MATROSKA_VERSION).tar.bz2 .sum-matroska
MATROSKA_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
+ifdef DISABLE_OPTIM
+MATROSKA_EXTRA_FLAGS += CPPFLAGS="${CPPFLAGS} -O0"
+endif
+
.matroska: libmatroska
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(MATROSKA_EXTRA_FLAGS)
cd $< && $(MAKE) install
--
2.2.2
More information about the vlc-devel
mailing list