summaryrefslogtreecommitdiff
path: root/m4/libo_fuzz_configury.m4
blob: 013908e28db3a0a5ed957066625762604b02a1de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 102 -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
AC_DEFUN([libo_FUZZ_ARG_WITH], [
    AC_ARG_WITH([$1],
        [$2],
        [$3],
        if test "$enable_fuzz_options" = yes; then
            if test `expr $RANDOM % 2` = 1; then
                m4_translit([with-$1], [-+.], [___])=yes
            else
                m4_translit([with-$1], [-+.], [___])=no
            fi
            AC_MSG_NOTICE([Randomly set --with-$1=$m4_translit([with-$1], [-+.], [___])])
            libo_fuzzed_[]m4_translit([with-$1], [-+.], [___])=yes
            libo_fuzz_list="$libo_fuzz_list --with-$1="'$m4_translit([with-$1], [-+.], [___])'
        fi
        [$4]
        )
])

AC_DEFUN([libo_FUZZ_ARG_ENABLE], [
    AC_ARG_ENABLE([$1],
        [$2],
        [$3],
        if test "$enable_fuzz_options" = yes; then
            if test `expr $RANDOM % 2` = 1; then
                m4_translit([enable-$1], [-+.], [___])=yes
            else
                m4_translit([enable-$1], [-+.], [___])=no
            fi
            AC_MSG_NOTICE([Randomly set --enable-$1=$m4_translit([enable-$1], [-+.], [___])])
            libo_fuzzed_[]m4_translit([enable-$1], [-+.], [___])=yes
            libo_fuzz_list="$libo_fuzz_list --enable-$1="'$m4_translit([enable-$1], [-+.], [___])'
        fi
        [$4])
])

AC_DEFUN([libo_FUZZ_SUMMARY], [
    if test -n "$libo_fuzz_list"; then
        tmps=`eval echo $libo_fuzz_list`
        AC_MSG_NOTICE([Summary of fuzzing: $tmps])
    fi
])

dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
d> 2020-11-26firebird: update to 3.0.7Julien Nabet This tries to get rid of a lot of cruft from older builds and it also aims to build as much as possible on Windows. The firebird-cygwin-msvc-warnings.patch should be optional. It gets rid of various compiler warnings on Windows, either by disableing or fixing them: - fix: D9002 - ignoring unknown option '-fno-rtti' - fix: D9024 - unrecognized source file type <filename>, object file assumed - ign: C4291 - <declaration>: no matching operator delete found; memory will not be freed if initialization throws an exception - ign: C4477 - <function>: format string <string> requires an argument of type <type>, but variadic argument number has type <type> And I explicitly got rid of the "win32" handling and simply use arch depending patches on Windows, which strips additional stuff. sberg adds: I have no idea how in an upstream macOS build the empbuild executible in gen/examples should now find @rpath/lib/libfbclient.dylib, as it does not have an RPATH set. So add an appropriate one in external/firebird/firebird-macosx.patch.1's patch of builds/posix/Makefile.in.examples (which needs to know whether we do a Debug or a Release build; an attempt of using firebird's $(IsDeveloper) for that caused other failures, see bca0dc97bf3d1348c928bdaf4964524374835823 "Revert 'external/firebird: Pass --enable-developer into configure'", so use LO's $(ENABLE_DEBUG) and rely on that being exported from LO's make into firebird's make). Also, the fbclient and Engine12 dylibs now have RPATHs set which we do not need in LO (where we still stick to our general use of @loader_path), so drop them in external/firebird/ExternalProject_firebird.mk (even though leaving them in should be harmless). Change-Id: Id34bb88900d15f89adda03e34af2ac3d4f6aa085 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105440 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2020-11-21firebird: build fixes (incl. parallel build)Jan-Marek Glogowski The main idea is to get rid of the "unset MAKEFLAGS". AFAI can see, the whole CPU stuff isn't used anymore. So we can drop the whole FB_CPU_ARG handling. Since LO doesn't use any of make's implicit rules, the build breaks, but luckily it just requires a single rule for the btyacc build - just a Firebuild build tool. Then there is the whole broken handling of LIBTOMMATH and LIBATOMIC_OPS already in LO's configure.ac. I don't know if any internal build of Firebird with these as system libs would work. I guess people either have a system Firebird or also build with internal libtommath and libatomic_ops. This fixes just the obvious errors. I didn't try to build it, so there might still be typos (TBH I thought hard about just dropping the system build of these libraries, after seeing the broken configure.ac). And I'm not sure our / the system boost preprocessor library is ever used over the Firebird-internal copy. It also looks like it's also just used in an other build tool and nothing of the Firebird DB itself depends on it. Then there is the movement of the install_name_tool / otool patching on MacOS from the patch into the ExternalProject to further shrink the patches, as the build doesn't depend on it. This also introduces a different debug build mode for the gcc-/g++-wrapper: MSVC_USE_INDIVIDUAL_PDBS. It uses -Fd to write a separate PDB per output file instead of using -FS to use sync writes to a single PDB, which might work around the PDB access failures seen by Jenkins for linking executables. In theory it's also faster and should work with all the other wrapper users, but I don't want to open that can of additional build errors (yet), for eventually marginal gains. Change-Id: I8d4c5d2f17def9e840a67ef1004787e8baaffa83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105902 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> 2020-11-16Modify the non-symlink libfbclient.dylib.3.0.0Stephan Bergmann At least in my --enable-debug build, workdir/UnpackedTarball/firebird/gen/Debug/firebird/lib originally contains libfbclient.dylib -> libfbclient.dylib.2 libfbclient.dylib.2 -> libfbclient.dylib.3.0.0 libfbclient.dylib.3.0.0 so if we modify libfbclient.dylib with install_name_tool, it will break the symlink and modify libfbclient.dylib but not libfbclient.dylib.3.0.0---where the latter is what gets delivered via external/firebird/ExternalPackage_firebird.mk. (This didn't cause any issues, though, because gb_LinkTarget__use_libfbembed in RepositoryExternal.mk links against the modified libfbclient.dylib in workdir, not against the delivered libfbclient.dylib.3.0.0, so e.g. Library_firebird_sdbc did already contain the correct @loader_path/libfbclient.dylib.3.0.0 reference. Also, the `install_name_tool -id` treatment of libEngine12.dylib in external/firebird/firebird-macosx.patch.1 should not technically be necessary, as nothing links against that library; but if left unmodified, it would record the build machine's /full-path-to/workdir/UnpackedTarball/firebird/gen/Debug/firebird/plugins/libEngine12.dylib so better "clean it up". Also, the `install_name_tool -change` treatment of libEngine12.dylib in external/firebird/firebird-macosx.patch.1 is necessary because otherwise it would record a full-path dependency to /full-path-to/workdir/UnpackedTarball/firebird/gen/Debug/firebird/lib/libfbclient.dylib.3.0.0 which macosx-change-install-names.pl, called from MAKE_POST in external/firebird/ExternalProject_firebird.mk, would not adjust. With all those modifications in external/firebird/firebird-macosx.patch.1, the call to macosx-change-install-names.pl should effectively have nothing left to do, as these libraries do not depend on any other LO-provided libraries, but better leave it in place anyway.) Change-Id: Icf7f2ff5cb844b07be223e0b74cd6a650725777a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-04-17We don't build for i386 on macOS anywayTor Lillqvist No no need to patch the Firebird build settings for i386. Change-Id: Ic187ff462325511a9a498e312f54350be7542366 Reviewed-on: https://gerrit.libreoffice.org/53054 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> 2016-11-22tdf#101789 work around DYLD_LIBRARY_PATH limitations on newer MacOS XLionel Elie Mamane Change-Id: I6e3cbff1ec7a75e896ba5bafb9d1fbccc3bc8909 2016-08-19Why not just drop that $(HOME)/icu54/icu/source/lib nonsenseStephan Bergmann Change-Id: I2fed34ae680eb0bc01de90a7ef525cf8446cd940 2016-08-17GSoC Upgrade firebird to 3.0Wastack Embedded firebird is now version 3.0. Supports MSVC 14.0. Instead of fbembed, there are now two libraries: fbclient and Engine12. fbclient is linked as fbembed before, Engine12 is loaded at runtime from fbclient. fb now needs system libtommath, which is supplied as a new ExternalProject of LO. Change-Id: I132939bdee745795b22f675e4265e9590079c45f Reviewed-on: https://gerrit.libreoffice.org/27642 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> 2016-01-30new upstream version Firebird 2.5.5Lionel Elie Mamane Change-Id: I89e30eb340d84c942046a18e6f4acc7fb376def6 Reviewed-on: https://gerrit.libreoffice.org/21904 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>