aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/gstreamer/build.sh
diff options
context:
space:
mode:
authorGravatar Edward Hervey <bilboed@gmail.com>2017-11-01 17:06:31 +0100
committerGravatar Max Moroz <dor3s1@gmail.com>2017-11-01 09:06:31 -0700
commit398bb0134edca69bf8d44eca299cfaef424ab2c1 (patch)
tree93ded759bfc6c9d145a8a77c1aecd9ec2dad42b3 /projects/gstreamer/build.sh
parentc6125d3a4f7cf802d433e863157865e404d80130 (diff)
[gstreamer] several updates + add new "typefind" target (#938)
* gstreamer: build glib ourselves Allows having full backtraces of leaks amongst other things * gstreamer: Don't build orc it's still too problematic * gstreamer: Add new typefind fuzzing target Covers just the typefind element, which has a lot of parsing code within
Diffstat (limited to 'projects/gstreamer/build.sh')
-rwxr-xr-xprojects/gstreamer/build.sh31
1 files changed, 28 insertions, 3 deletions
diff --git a/projects/gstreamer/build.sh b/projects/gstreamer/build.sh
index dc1a5c4f..3c0f07d3 100755
--- a/projects/gstreamer/build.sh
+++ b/projects/gstreamer/build.sh
@@ -21,12 +21,19 @@ PREFIX=$WORK/prefix
PLUGIN_DIR=$PREFIX/lib/gstreamer-1.0
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
mkdir -p $PREFIX
+export PATH=$PREFIX/bin:$PATH
cd $WORK
# Minimize gst-debug level/code
export CFLAGS="$CFLAGS -DGST_LEVEL_MAX=2"
-for i in orc gstreamer gst-plugins-base;
+tar xvJf $SRC/glib-2.54.2.tar.xz
+cd glib-2.54.2
+./configure --prefix=$PREFIX --enable-static --disable-shared --disable-libmount --with-pcre=internal && make -j$(nproc) && make install
+cd ..
+
+
+for i in gstreamer gst-plugins-base;
do
mkdir -p $i
cd $i
@@ -39,12 +46,12 @@ do
done
#finally build the binary \o/
-BUILD_CFLAGS="$CFLAGS `pkg-config --static --cflags glib-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 gstreamer-app-1.0 orc-0.4`"
+BUILD_CFLAGS="$CFLAGS `pkg-config --static --cflags glib-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 gstreamer-app-1.0`"
# List of dependencies libraries we grab from pkg-config
# Should also include dependencies of dependencies (ex: libvorbis depends on libogg)
-PKG_DEPS="glib-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 orc-0.4 \
+PKG_DEPS="glib-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 \
gstreamer-riff-1.0 gstreamer-tag-1.0 gstreamer-app-1.0 zlib \
ogg vorbis vorbisenc theoraenc theoradec theora"
@@ -95,3 +102,21 @@ echo ">>>> Installing OGG corpus"
echo
cp $SRC/*_seed_corpus.zip $OUT
+
+echo ">>>> BUILDING typefind.o"
+echo
+
+$CC $CFLAGS $BUILD_CFLAGS -c $SRC/gst-ci/fuzzing/typefind.c -o $SRC/gst-ci/fuzzing/typefind.o
+
+echo
+echo ">>>> LINKING"
+echo
+
+$CXX $CXXFLAGS \
+ -o $OUT/typefind \
+ $PREDEPS_LDFLAGS \
+ $SRC/gst-ci/fuzzing/typefind.o \
+ $PLUGINS \
+ $BUILD_LDFLAGS \
+ $LIB_FUZZING_ENGINE \
+ -Wl,-Bdynamic