Makefile.in                            |    2 --
 bin/oss-fuzz-build.sh                  |    9 +++++----
 configure.ac                           |    4 ++--
 desktop/Module_desktop.mk              |    2 ++
 distro-configs/LibreOfficeOssFuzz.conf |    2 ++
 smoketest/Module_smoketest.mk          |    2 ++
 vcl/Executable_docxfuzzer.mk           |    2 ++
 vcl/Executable_fodtfuzzer.mk           |    2 ++
 vcl/Executable_htmlfuzzer.mk           |    4 +++-
 vcl/Module_vcl.mk                      |    3 +--
 vcl/commonfuzzer.mk                    |    4 +++-
 vcl/workben/docxfuzzer.cxx             |    5 -----
 vcl/workben/fodtfuzzer.cxx             |    5 -----
 vcl/workben/htmlfuzzer.cxx             |    2 --
 14 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 37106f20bd5cc016a473fbdb2e9e37da096cff5f
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Sun Dec 12 22:03:49 2021 +0100
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Sat Dec 25 17:05:08 2021 +0100

    oss-fuzz: convert to static cross-build
    
    This way we can get rid of the pre-generated locale data and the
    special fuzzers target, which invokes a full gbuild make for
    every prereqisite, always parsing the whole tree, taking ages.
    
    This also reverts:
    - commit d0780b21cfe235c4446adf649eb690f9c1771dd5 ("fix oss-fuzz
      build") by adding epubgen and revenge dependencies.
    - commit ff25d6a123beb42476bf42d189b3033a86835b2a ("ofz#41602 fix
      more build failure"), which shouldn't happen anymore since
      commit d47628f287f4377394c4ff488c433bfe254b6abe ("don't want to
      link to system static libs for DISABLE_DYNLOADING")
    
    Change-Id: I3aed9ec62da507254b42e4e7470bae1097b4bc8c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127031
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>

diff --git a/Makefile.in b/Makefile.in
index 3ac9ce6d3c22..7c30271cffb9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -504,8 +504,6 @@ $(BUILDDIR)/vs-code.code-workspace: 
$(BUILDDIR)/vs-code.code-workspace.template
        @test -e $@ || cp $< $@ && \
        cmp -s $@ $< || echo "ATTN: $(@F) differs from $(<F), please check 
yourself for changes"
 
-fuzzers: StaticLibrary_dtoa StaticLibrary_zlib StaticLibrary_libjpeg-turbo 
Library_sal Library_salhelper Library_reg Library_store Library_unoidl 
codemaker Library_cppu Library_i18nlangtag Library_cppuhelper 
Library_comphelper StaticLibrary_ulingu StaticLibrary_findsofficepath 
Library_tl Library_basegfx Library_canvastools Library_cppcanvas 
Library_dbtools Library_deploymentmisc Library_editeng Library_i18nutil 
Library_localebe1 Library_sax Library_sofficeapp Library_ucbhelper Rdb_services 
udkapi offapi Library_icg Library_reflection Library_invocadapt 
Library_bootstrap Library_introspection Library_stocservices Library_xmlreader 
Library_gcc3_uno instsetoo_native StaticLibrary_boost_locale 
StaticLibrary_fuzzerstubs StaticLibrary_fuzzer_core StaticLibrary_fuzzer_calc 
StaticLibrary_fuzzer_draw StaticLibrary_fuzzer_writer StaticLibrary_fuzzer_math 
Library_forui Library_binaryurp Library_io Library_invocation 
Library_namingservice Library_proxyfac Library_uuresolver Module_ure Library_w
 pftwriter Library_sb Library_file Library_avmedia Executable_pptfuzzer 
Executable_cgmfuzzer Executable_ww2fuzzer Executable_ww6fuzzer 
Executable_ww8fuzzer Executable_qpwfuzzer Executable_slkfuzzer 
Executable_fodtfuzzer Executable_fodsfuzzer Executable_fodpfuzzer 
Executable_xlsfuzzer Executable_scrtffuzzer Executable_wksfuzzer 
Executable_diffuzzer Executable_docxfuzzer Executable_xlsxfuzzer 
Executable_pptxfuzzer Executable_htmlfuzzer Executable_rtffuzzer 
Executable_mmlfuzzer Executable_mtpfuzzer Executable_olefuzzer 
Executable_lwpfuzzer Executable_hwpfuzzer Executable_wmffuzzer 
Executable_dxffuzzer Executable_sftfuzzer Executable_svmfuzzer 
Executable_tiffuzzer Executable_epsfuzzer Executable_jpgfuzzer 
Executable_metfuzzer Executable_bmpfuzzer Executable_giffuzzer 
Executable_pngfuzzer Executable_602fuzzer Executable_tgafuzzer 
Executable_pcxfuzzer Executable_psdfuzzer Executable_ppmfuzzer 
Executable_pcdfuzzer Executable_rasfuzzer Executable_pctfuzzer 
Executable_xpmfuzzer Executable_xbm
 fuzzer Executable_dbffuzzer
-
 endif # MAKE_RESTARTS
 
 # vim: set noet sw=4 ts=4:
diff --git a/bin/oss-fuzz-build.sh b/bin/oss-fuzz-build.sh
index 906cadd500d4..d0f4564a930e 100755
--- a/bin/oss-fuzz-build.sh
+++ b/bin/oss-fuzz-build.sh
@@ -12,10 +12,14 @@ echo start at `date -u`
 #shuffle CXXFLAGS -stdlib=libc++ arg into CXX as well because we use
 #the CXX as the linker and need to pass -stdlib=libc++ to build
 export CXX="$CXX -stdlib=libc++ 
-fsanitize-blacklist=$SRC/libreoffice/bin/sanitize-excludelist.txt"
+export CXX_FOR_BUILD="$CXX"
 export CC="$CC 
-fsanitize-blacklist=$SRC/libreoffice/bin/sanitize-excludelist.txt"
+export CC_FOR_BUILD="$CC"
 #similarly force the -fsanitize etc args in as well as pthread to get
 #things to link successfully during the build
 export LDFLAGS="$CFLAGS -Wl,--compress-debug-sections,zlib -lpthread"
+#build-time rsc tool leaks a titch
+export ASAN_OPTIONS="detect_leaks=0"
 
 df -h $OUT $WORK
 
@@ -24,10 +28,7 @@ $SRC/libreoffice/autogen.sh --with-distro=LibreOfficeOssFuzz 
--with-external-tar
 
 make clean
 
-#build-time rsc tool leaks a titch
-export ASAN_OPTIONS="detect_leaks=0"
-
-make fuzzers
+make
 
 pushd instdir/program
 head -c -14 services.rdb  > templateservices.rdb
diff --git a/configure.ac b/configure.ac
index 1ba896d7defb..f85e0b1701f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3799,7 +3799,7 @@ if test -n "$WIN_MULTI_ARCH" -a -n "$WIN_OTHER_ARCH"; then
 fi
 
 
-if test "$build_cpu" != "$host_cpu" -o \( "$DISABLE_DYNLOADING" = TRUE -a 
"$enable_fuzzers" != yes \); then
+if test "$build_cpu" != "$host_cpu" -o "$DISABLE_DYNLOADING" = TRUE; then
     # To allow building Windows multi-arch releases without cross-tooling
     if test "$DISABLE_DYNLOADING" = TRUE -o \( -z "$WIN_MULTI_ARCH" -a -z 
"$WIN_OTHER_ARCH" \); then
         cross_compiling="yes"
@@ -9574,7 +9574,7 @@ else
         
LIBXML_LIBS="${WORKDIR}/UnpackedTarball/libxml2/win32/bin.msvc/libxml2.lib"
     else
         LIBXML_LIBS="-L${WORKDIR}/UnpackedTarball/libxml2/.libs -lxml2"
-        if test "$DISABLE_DYNLOADING" = TRUE -a "$ENABLE_FUZZERS" != "TRUE"; 
then
+        if test "$DISABLE_DYNLOADING" = TRUE; then
             LIBXML_LIBS="$LIBXML_LIBS -lm"
         fi
     fi
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index a03a552e4271..ce8f254d7af1 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -100,9 +100,11 @@ $(eval $(call gb_Module_add_targets,desktop,\
 
 else ifeq (,$(filter MACOSX ANDROID iOS HAIKU,$(OS)))
 
+ifeq (,$(filter FUZZERS,$(BUILD_TYPE)))
 $(eval $(call gb_Module_add_targets,desktop,\
     Executable_oosplash \
 ))
+endif
 
 endif
 
diff --git a/distro-configs/LibreOfficeOssFuzz.conf 
b/distro-configs/LibreOfficeOssFuzz.conf
index 434452a673f0..5f50f2774bc5 100644
--- a/distro-configs/LibreOfficeOssFuzz.conf
+++ b/distro-configs/LibreOfficeOssFuzz.conf
@@ -8,6 +8,7 @@
 --disable-cups
 --disable-dbus
 --disable-dconf
+--disable-extensions
 --disable-firebird-sdbc
 --disable-gio
 --disable-gtk3
@@ -29,5 +30,6 @@
 --with-locales=en
 --with-system-lockfile
 --without-fonts
+--without-galleries
 --without-java
 --without-webdav
diff --git a/smoketest/Module_smoketest.mk b/smoketest/Module_smoketest.mk
index 217dbfa6543a..5d66a0daa1e4 100644
--- a/smoketest/Module_smoketest.mk
+++ b/smoketest/Module_smoketest.mk
@@ -12,10 +12,12 @@ $(eval $(call gb_Module_Module,smoketest))
 
 ifeq ($(CROSS_COMPILING),)
 
+ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
 $(eval $(call gb_Module_add_targets,smoketest,\
        Library_smoketest \
        Zip_smoketestdoc \
 ))
+endif
 
 ifneq ($(ENABLE_JAVA),)
 ifneq ($(filter EXTENSIONS,$(BUILD_TYPE)),)
diff --git a/vcl/Executable_docxfuzzer.mk b/vcl/Executable_docxfuzzer.mk
index fbacbe92fd98..57bc9020713b 100644
--- a/vcl/Executable_docxfuzzer.mk
+++ b/vcl/Executable_docxfuzzer.mk
@@ -19,6 +19,8 @@ $(eval $(call gb_Executable_use_api,docxfuzzer,\
 
 $(eval $(call gb_Executable_use_externals,docxfuzzer,\
     $(fuzzer_externals) \
+    epubgen \
+    revenge \
 ))
 
 $(eval $(call gb_Executable_set_include,docxfuzzer,\
diff --git a/vcl/Executable_fodtfuzzer.mk b/vcl/Executable_fodtfuzzer.mk
index 94a15362cbd4..f07a002f8fcf 100644
--- a/vcl/Executable_fodtfuzzer.mk
+++ b/vcl/Executable_fodtfuzzer.mk
@@ -19,6 +19,8 @@ $(eval $(call gb_Executable_use_api,fodtfuzzer,\
 
 $(eval $(call gb_Executable_use_externals,fodtfuzzer,\
     $(fuzzer_externals) \
+    epubgen \
+    revenge \
 ))
 
 $(eval $(call gb_Executable_set_include,fodtfuzzer,\
diff --git a/vcl/Executable_htmlfuzzer.mk b/vcl/Executable_htmlfuzzer.mk
index 33a567a4c417..fc42be8584bc 100644
--- a/vcl/Executable_htmlfuzzer.mk
+++ b/vcl/Executable_htmlfuzzer.mk
@@ -18,7 +18,9 @@ $(eval $(call gb_Executable_use_api,htmlfuzzer,\
 ))
 
 $(eval $(call gb_Executable_use_externals,htmlfuzzer,\
-       $(fuzzer_externals) \
+    $(fuzzer_externals) \
+    epubgen \
+    revenge \
 ))
 
 $(eval $(call gb_Executable_set_include,htmlfuzzer,\
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 879bfd5afa05..b1cfb2c5b2cd 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -29,7 +29,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
         Package_opengl_denylist ) \
     $(if $(filter SKIA,$(BUILD_TYPE)), \
         Package_skia_denylist ) \
-    $(if $(filter DESKTOP,$(BUILD_TYPE)), \
+    $(if $(filter DESKTOP FUZZERS,$(BUILD_TYPE)), \
         StaticLibrary_vclmain \
         $(if $(DISABLE_GUI),, \
             $(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
@@ -151,7 +151,6 @@ $(eval $(call gb_Module_add_targets,vcl,\
     CustomTarget_nativedraw \
     CustomTarget_nativewriter \
     CustomTarget_nativemath \
-    StaticLibrary_fuzzerstubs \
     StaticLibrary_fuzzer_core \
     StaticLibrary_fuzzer_calc \
     StaticLibrary_fuzzer_draw \
diff --git a/vcl/commonfuzzer.mk b/vcl/commonfuzzer.mk
index 968bb6e8eb75..07f5c4c47591 100644
--- a/vcl/commonfuzzer.mk
+++ b/vcl/commonfuzzer.mk
@@ -44,7 +44,6 @@ fuzzer_externals = \
 
 fuzzer_statics = \
      findsofficepath \
-     fuzzerstubs \
      ulingu \
 
 fuzzer_core_libraries = \
@@ -150,6 +149,9 @@ fuzzer_core_libraries = \
     gcc3_uno \
     salhelper \
     sal \
+    index_data \
+    localedata_en \
+    localedata_others \
 
 fuzzer_calc_libraries = \
     analysis \
diff --git a/vcl/workben/docxfuzzer.cxx b/vcl/workben/docxfuzzer.cxx
index 4e116c6002cf..73fc198bd886 100644
--- a/vcl/workben/docxfuzzer.cxx
+++ b/vcl/workben/docxfuzzer.cxx
@@ -16,11 +16,6 @@ extern "C" void* SwCreateDialogFactory()
     return nullptr;
 }
 
-extern "C" void* com_sun_star_comp_Writer_EPUBExportFilter_get_implementation()
-{
-    return nullptr;
-}
-
 extern "C" bool TestImportDOCX(SvStream &rStream);
 
 extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
diff --git a/vcl/workben/fodtfuzzer.cxx b/vcl/workben/fodtfuzzer.cxx
index 54ae26622b7b..71c37aa7c42d 100644
--- a/vcl/workben/fodtfuzzer.cxx
+++ b/vcl/workben/fodtfuzzer.cxx
@@ -16,11 +16,6 @@ extern "C" void* SwCreateDialogFactory()
     return nullptr;
 }
 
-extern "C" void* com_sun_star_comp_Writer_EPUBExportFilter_get_implementation()
-{
-    return nullptr;
-}
-
 extern "C" bool TestImportFODT(SvStream &rStream);
 
 extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
diff --git a/vcl/workben/htmlfuzzer.cxx b/vcl/workben/htmlfuzzer.cxx
index 6da6c853f3bb..b2e89442088b 100644
--- a/vcl/workben/htmlfuzzer.cxx
+++ b/vcl/workben/htmlfuzzer.cxx
@@ -13,8 +13,6 @@
 
 extern "C" void* SwCreateDialogFactory() { return nullptr; }
 
-extern "C" void* 
com_sun_star_comp_Writer_EPUBExportFilter_get_implementation() { return 
nullptr; }
-
 extern "C" bool TestImportHTML(SvStream& rStream);
 
 extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)

Reply via email to