mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
Make tools/target_dec_*_fuzzer buildable with configure and make
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d976d2ec78
commit
5b499bf4a0
4
Makefile
4
Makefile
@ -77,9 +77,13 @@ all: $(AVPROGS)
|
||||
$(TOOLS): %$(EXESUF): %.o
|
||||
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS)
|
||||
|
||||
target_dec_%_fuzzer$(EXESUF): target_dec_%_fuzzer.o $(FF_DEP_LIBS)
|
||||
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
|
||||
|
||||
tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
|
||||
tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
|
||||
tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
|
||||
tools/target_dec_%_fuzzer$(EXESUF): $(FF_DEP_LIBS)
|
||||
|
||||
CONFIGURABLE_COMPONENTS = \
|
||||
$(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c)) \
|
||||
|
12
configure
vendored
12
configure
vendored
@ -438,6 +438,8 @@ Developer options (useful when working on FFmpeg itself):
|
||||
--random-seed=VALUE seed value for --enable/disable-random
|
||||
--disable-valgrind-backtrace do not print a backtrace under Valgrind
|
||||
(only applies to --disable-optimizations builds)
|
||||
--enable-osfuzz Enable building fuzzer tool
|
||||
--libfuzzer=PATH path to libfuzzer
|
||||
|
||||
NOTE: Object files are built at the place where configure is launched.
|
||||
EOF
|
||||
@ -1676,6 +1678,7 @@ CONFIG_LIST="
|
||||
fontconfig
|
||||
memory_poisoning
|
||||
neon_clobber_test
|
||||
ossfuzz
|
||||
pic
|
||||
raise_major
|
||||
thumb
|
||||
@ -3509,6 +3512,9 @@ for opt do
|
||||
;;
|
||||
--fatal-warnings) enable fatal_warnings
|
||||
;;
|
||||
--libfuzzer=*)
|
||||
libfuzzer_path="$optval"
|
||||
;;
|
||||
*)
|
||||
optname="${opt%%=*}"
|
||||
optname="${optname#--}"
|
||||
@ -3577,6 +3583,11 @@ set >> $logfile
|
||||
|
||||
test -n "$valgrind" && toolchain="valgrind-memcheck"
|
||||
|
||||
enabled ossfuzz && {
|
||||
add_cflags -fsanitize=address,undefined -fsanitize-coverage=trace-pc-guard,trace-cmp -fno-omit-frame-pointer
|
||||
add_ldflags -fsanitize=address,undefined -fsanitize-coverage=trace-pc-guard,trace-cmp
|
||||
}
|
||||
|
||||
case "$toolchain" in
|
||||
*-asan)
|
||||
cc_default="${toolchain%-asan}"
|
||||
@ -6737,6 +6748,7 @@ SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
|
||||
VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD}
|
||||
SAMPLES:=${samples:-\$(FATE_SAMPLES)}
|
||||
NOREDZONE_FLAGS=$noredzone_flags
|
||||
LIBFUZZER_PATH=$libfuzzer_path
|
||||
EOF
|
||||
|
||||
get_version(){
|
||||
|
@ -1,6 +1,16 @@
|
||||
TOOLS = qt-faststart trasher uncoded_frame
|
||||
TOOLS-$(CONFIG_ZLIB) += cws2fws
|
||||
|
||||
tools/target_dec_video_%_fuzzer.o: tools/target_dec_fuzzer.c
|
||||
$(COMPILE_C) -DFFMPEG_CODEC=AV_CODEC_ID_$* -DFUZZ_FFMPEG_VIDEO
|
||||
|
||||
tools/target_dec_audio_%_fuzzer.o: tools/target_dec_fuzzer.c
|
||||
$(COMPILE_C) -DFFMPEG_CODEC=AV_CODEC_ID_$* -DFUZZ_FFMPEG_AUDIO
|
||||
|
||||
tools/target_dec_subtitle_%_fuzzer.o: tools/target_dec_fuzzer.c
|
||||
$(COMPILE_C) -DFFMPEG_CODEC=AV_CODEC_ID_$* -DFUZZ_FFMPEG_SUBTITLE
|
||||
|
||||
|
||||
OBJDIRS += tools
|
||||
|
||||
clean::
|
||||
|
Loading…
Reference in New Issue
Block a user