[vlc-devel] [PATCH] Contrib: allow building contribs with no optimization
Steve Lhomme
robUx4 at videolabs.io
Fri Mar 20 15:26:00 CET 2015
--
makes debugging easier
replaces an older patch that what ffmpeg/ebml/matroska specific
---
contrib/bootstrap | 5 +++++
contrib/src/main.mak | 6 ++++++
2 files changed, 11 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/main.mak b/contrib/src/main.mak
index 287a0ad..d5401c2 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -166,6 +166,12 @@ CFLAGS := $(CFLAGS) $(EXTRA_CFLAGS) -g
CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) -g
EXTRA_LDFLAGS += -L$(PREFIX)/lib
LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
+
+ifdef DISABLE_OPTIM
+CFLAGS := $(CFLAGS) -O0
+CXXFLAGS := $(CXXFLAGS) -O0
+endif
+
# Do not export those! Use HOSTVARS.
# Do the FPU detection, after we have figured out our compilers and flags.
--
2.3.2
More information about the vlc-devel
mailing list