summaryrefslogtreecommitdiffstats
path: root/config_host.mk.in
Commit message (Collapse)AuthorAgeFilesLines
* update 3rd party libsAndras Timar2023-03-111-0/+2
| | | | | | | | | | | | | | | | * curl 7.88.1 * expat 2.5.0 * libjpeg-turbo 2.1.2 * libxml2 2.10.3 * nss 3.88.1 * openssl 1.1.1t * libpng 1.6.39 * zlib 1.2.13 Change-Id: I3ece36a221af44612519f964d580affa9004a0f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148612 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
* Get make_installer calls to run in parallelThorsten Behrens2022-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If available, use GNU parallel to run N make_installer.pl scripts in parallel, to scale packaging LibreOffice up with the rest of gbuild. * fallback if no GNU parallel found - run make_installer sequentially as before * push most of the make_installer.pl input param tweaks from gbuild down into a shared call_installer.sh script * call gnu parallel with generated number of "templ:lang:prodname:ext:pkgfmt:strip-flag" tuples, one for each package to build (empty templ for non-windows, to save on cmd line length) * such that we can run all those in parallel (taking into account the build's PARALLELISM parameter) * there's still the main package build running epm sequentially for umpteen sub-packages from within _one_ make_installer.pl instance, but that's much harder to parallelize from inside Perl (so we punt on that here) Change-Id: Ie7d3084ed60d003d587c5e64dc9fb1809b23e409 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133957 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135343 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
* eliminate ENABLE_STRIP because it causes build issues in nss (Android)Andras Timar2022-02-231-2/+0
| | | | | | | Change-Id: Ie229f444d80a5f441576649e22b0c56c67cd3424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130347 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
* [cp] create debuginfo packages in one roundAndras Timar2022-01-311-0/+2
| | | | Change-Id: I644af21de7d184daa902f1ef47c813647baa2799
* support for the WebP image format (tdf#114532)Luboš Luňák2022-01-311-0/+3
| | | | | | | | | | | | | | | | This commit implements a WebP reader and writer for both lossless and lossy WebP, export dialog options for selecting lossless/lossy and quality for lossy, and various internal support for the format. Since writing WebP to e.g. ODT documents would make those images unreadable by previous versions with no WebP support, support for that is explicitly disabled in GraphicFilter, to be enabled somewhen later. Change-Id: I9b10f6da6faa78a0bb74415a92e9f163c14685f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128978 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* Make installer compression tool configurableThorsten Behrens2022-01-221-0/+1
| | | | | | | | | | | | | | So we can use pigz or other parallelizable tools if available. Shaves off noticeable build time when packaging install sets. - figure out if pigz is available (fallback to gzip otherwise) - pass compression tool down into make_installer - and handle as one of many global options there Change-Id: Ia9d1ea27a9f990874238b6f0be3e1fd30a662ec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128469 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
* More targeted suppression of bogus GCC -Werror=stringop-overflow=Stephan Bergmann2021-11-101-0/+1
| | | | | | | | | | | | | | | ...given that <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87296#c5> "[8/9/10/11 Regression] -Wstringop-overflow false positive due to using MEM_REF type of &MEM" is declared fixed now on GCC 11 trunk. (Moving -Wno-stringop-overflow from gb_CFLAGS_WERROR to gb_CXXFLAGS_COMMON is done for no other reason than to harmonize this with the code for the similar HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED.) Change-Id: I3468138c9bbda28f754d4162cb9c059796bd3932 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111029 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* use clang-cl's -Zc:dllexportInlines- for Skia (tdf#144598)Luboš Luňák2021-09-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This is clang-cl's equivalent of -fvisibility-inlines-hidden, and it seems to be also sort of the equivalent of MSVC's -Zc:inline. So it saves build time and disk space. As an additional effect, this disables emitting copies of inlines functions in every .o file where the function is called (even if inlined), which means that it hopefully avoids the problem of SkOpts_avx.cpp generating a copy of SkRect::round() which would include AVX code, and the linker might select this as the instance of SkRect::round() to keep, thus making SSE2 code call AVX code without checking for AVX availability first. Change-Id: I97541ae11d05f489894bc9233271eb21fd520f43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122335 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 36f76223193fb96df7b8cbc1a1ff30f739857189) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122739 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
* Always provision PATH the cygwin way under WindowsThorsten Behrens2021-08-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | With PATH essentially serving the role of LD_LIBRARY_PATH under Windows, there was the notion that this needs to be provided in Windows notation, for win32 gnumake. That was perhaps once true; currently we're always evaluating PATH inside a shell, not the Makefile. So this since a while only worked accidentally, due to cygwin transparently converting between DOS and UNIX PATH vars. It did break though for corner-cases, e.g. SRCDIR!=BUILDDIR, and BUILDDIR e.g. D:\FOO. With that simplification, also GNUMAKE_WIN_NATIVE can go. Change-Id: Ied5a0443dc70e7dc629c0c0620e6ce911d9a73d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119941 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> (cherry picked from commit da36d655608c3da39fd79d95974e1f7404a27aa0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119977 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
* firebird: build fixes (incl. parallel build)Jan-Marek Glogowski2020-11-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Rename CLANG_CC, CLANG_CXX configuration vars (avoid clash with scan-build)Stephan Bergmann2020-10-161-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Clang's scan-build tool uses the CLANG_CXX environment variable (setting it up in the scan-build script to pass it to the ccc-analyzer script), but happens to erroneously set it to a non-existing path (see <https://reviews.llvm.org/D89481> "[scan-build] Fix clang++ pathname again"). So wrapping LO's autogen.sh and make in scan-build picked up that broken CLANG_CXX and caused build failures like > [CXX] external/skia/source/SkMemory_malloc.cxx > /bin/sh: ~/llvm/inst/bin/clang-12++: No such file or directory (see <https://lists.freedesktop.org/archives/libreoffice/2020-October/086113.html> "Re: llvm/clang static analyzer reports"). So rename CLANG_CXX, and for consistency also CLANG_CC and the various CLANG_CXXFLAGS_INTRINSICS_*, by prefixing each with LO_. Change-Id: Ib41cabe940f8bfb1997f74e865cca5725f859e07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104383 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* use -fpch-codegen rather than -fmodules-codegenLuboš Luňák2020-09-301-3/+3
| | | | | | | | | | | | | The -fmodules-codegen flag has been in Clang for quite a while, but it officially works with PCHs only with Clang11+, and even there's it's better to use the properly named -fpch-codegen. This also fixes a problem with Clang9 having only -fmodules-codegen but not the -fno-* variant, causing the build to break. Change-Id: I9a8c979426f95e8c1f77cbeab1df64390d7243b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103677 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* add an explicit --disable-qrcodegen configure optionCaolán McNamara2020-09-211-0/+1
| | | | | | | Change-Id: If8e965fa955aecdb9e7011bdddc690de9cad0c4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103120 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* disable Clang's -fmodules-codegen for Skia if optimizing itLuboš Luňák2020-09-151-0/+1
| | | | | | | | | | | | | Skia is explicitly made to build optimized even in debug builds, unless --enable-skia=debug is given, so $(PCH_MODULES_CODEGEN) gets set even for it by com_GCC_class.mk , although normally it's disabled for optimized builds as not worth it. Explicitly disable the flag for Skia. Change-Id: Icf030f0bdc99dbc476af585937c864f951d2b7ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102674 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Set PYTHONWARNINGS to error by default for --enable-werrorMike Kaganski2020-09-151-0/+1
| | | | | | | | | | | | | | Setting it in environment overrides this setting. The rationale is to avoid introducing warnings like these appeared recently: zipfile.py:1517: UserWarning: Duplicate name: 'cmd/ar/sc_bulletsandnumberingdialog.png' (see e.g. https://ci.libreoffice.org/job/gerrit_windows/71910/consoleFull) Change-Id: I8ae42e039ec3d028c01dbc4bcf422feae9e46271 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100268 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* cross-build: JAVA_HOME is now build, not hostJan-Marek Glogowski2020-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Miklos reported a Android configure error, which tried to run autogen.sh for gb_Side=build, which is correctly forbidden. I checked all the files timestamps for $(BUILDDIR)/config_host.mk target - all ok, and somehow missed the JAVA_HOME test... Since my commit 42aeb9f906ca4e23d118ff8563184f9315ef3b82 ("cross-build: fix Java NI linking"), JAVA_HOME just makes sense for the build side. So the tests just make sense for the host side, if there was a --with-jdk-home supplied. This results in a sensible, empty JAVA_HOME for the host side and all Java builds I found already override JAVA_HOME with JAVA_HOME_FOR_BUILD. Change-Id: I1742a83466af70804f1700a1ca0cb6b6b77a7b12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102676 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
* cross-build: fix Java NI linkingJan-Marek Glogowski2020-09-111-2/+4
| | | | | | | | | | | LibreOffice has a JNI component on Windows and Linux, the officebean. Therefore we need a host JDK for linkage to the jawt, and a build JDK to compile the Java code. Change-Id: I4138628ab3ea2ef5900a5b4e9281050ae84e4eb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102483 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
* WIN cross: fix gpg-related library buildsJan-Marek Glogowski2020-09-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | Cross compiling these libraries requires to supply the cross- compiler via the CC_FOR_BUILD environment variable. Since we have to use the gcc-wrappers, we now need two different invocations with different inclues and libraries, but just have fixed environment variables. Also, the CC_FOR_BUILD clashes with LO's own variant, but that is easy to fix. So this change includes: - gcc-wrappers: new option --wrapper-env-prefix to add a prefix to the environment variable names - gcc-wrappers: new option --wrapper-print-cmdline to dump the real command called, when a verbose build is executed - gcc-wrappers: default to exe, if the output has no extension - unify build flags for gpg related libraries Change-Id: I4e6a6ba3c6e09237c8ffefa40ce61131290a3852 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102482 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
* Allow to set LO_ELFCHECK_ALLOWLIST in autogen.inputStephan Bergmann2020-08-191-0/+1
| | | | | | | | | | | | (To minimize disruption with other people's potential use of the variable, when it is not set during configuration make sure not to export it as empty from config_host.mk, so that it can then still be passed as an environment variable to individual `make` invocations.) Change-Id: I785910f1076c05905e354ef846d16ffb7ea0a081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101002 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Enable --enable-lto --enable-skia when building with GCC+Clang on LinuxStephan Bergmann2020-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...where all the Library_skia objects are built with Clang, so contain intermediate LLVM bytecode, but were then linked via GCC and ld or gold, which do not understand such object files and thus failed. So in gb_LinkTarget__command_dynamiclink use T_CC/T_CXX also for the linker command line. But then Clang would still be used for linking with the -fuse-ld=(ld or gold) $(USE_LD) suitable for GCC, and would still fail. So break T_USE_LD out of T_LDFLAGS and let gb_LinkTarget_use_clang override T_USE_LD with CLANG_USE_LD. At least for now, that CLANG_USE_LD (containing something like -fuse-ld=lld or -fuse-ld=lld --ld-path=... for the latter see d668c9a04d04d256fcbbd2165fe226f1db88256b "Adapt --enable-ld to Clang 12 trunk --ld-path") needs to manually be passed into autogen.sh, it is not computed in configure.ac. Then building Library_skia would still fail to link against StaticLibrary_libpng, as that only contains intermediate GCC object code, so make sure to build it with -ffat-lto-objects in this specific case. Change-Id: I0a104e53a8898cd9c2eb3b643e21954e853608cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#134522 remove --with-build-version ./configure flagRene Engelhard2020-07-231-1/+0
| | | | | | | | | Noop. Use --with-extra-buildid Change-Id: I110514f6f58c1cd2ca635234a20cf560e6e3d6e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98923 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* use Clang11's -fpch-instantiate-templates if availableLuboš Luňák2020-07-171-0/+1
| | | | | | | | | | | The optimization to instantiate templates already while creating the PCH instead for every single compilation has been finally accepted upstream, but it's opt-in. Change-Id: Ia6456df05512329fc594f9ed0e400250c4f5029e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98948 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Initial WIP steps for building for macOS on Apple SiliconTor Lillqvist2020-06-291-1/+1
| | | | | | | | | | | | Don't use $host_os="darwin" for both macOS and iOS depending on $host_cpu. Soon macOS will run on either x86_64 or arm64. Instead, use "darwin" (or "macos") for macOS and "ios" for iOS. Some other early changes for arm64-apple-macos, too. Change-Id: Id89987d854ceba2cd87c6222db2081ccdec0c73e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96976 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
* Drop configurability of libnumbertext useTor Lillqvist2020-06-111-1/+0
| | | | | | | | | | | | It was fairly pointless to be able to --disable-libnumbertext. Besides, disabling it broke the ordinal page (etc) numbering feature: "1st", "2nd", "3rd", etc showed up as "Ordinal-number 1", "Ordinal-number 2", "Ordinal-number 3" etc. Change-Id: I645169054a8fdc8dac89cd48b6c369fd61749467 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96119 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
* use -Xclang -debug-info-kind=constructor if availableLuboš Luňák2020-05-261-0/+1
| | | | | | | | | | | | | | The option, available since Clang10, emits debuginfo for classes with explicit ctors only together with the ctor, which avoids redundant debuginfo for such classes, noticeably saving both build time and disk space. https://reviews.llvm.org/D72427 I've been using this for quite some time, without problems. Change-Id: I24e5339f983cb8d8990185436dd63e00f0d3ce60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94756 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* external: bundle box2dSarper Akdemir2020-05-171-0/+3
| | | | | | | | | | | Bundled box2d with the build system of LO as a static library. If --with-system-box2d was specified checks for instance box2d in the system, defines SYSTEM_BOX2D and uses the library from the system. Change-Id: Ifb05912f2acaff273b25abebafc5af1cac3afec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94103 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
* always build Skia optimized, unless --enable-skia=debugLuboš Luňák2020-05-061-0/+1
| | | | | | | | | | | In raster mode the performance may make quite a difference, this is the drawing library (that's now the Windows default) and LO developers mostly do not need to debug Skia itself. Change-Id: I42f0407d37a2294b062a41d94566e8a4f5f4354b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93557 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* CLANG_C -> CLANG_CCLuboš Luňák2020-04-211-1/+1
| | | | | | | Change-Id: I50ed05116df3f295af6406f0ee45610d9e1e031e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92619 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* better handling of SSEx,AVX intrinsics for ClangLuboš Luňák2020-04-211-0/+8
| | | | | | | | | | | | Clang-cl interprets MSVC's -arch option a bit differently (for MSVC -arch:SSE2 seems to mean SSE2+, but SSE2-only for Clang). So use Clang's -mxxx options when using clang-cl as CC/CXX. Also check intrinsics once again if using CLANG_CC/CXX to compile Skia. Change-Id: I64cd368ef4e5f4fcf1dbe877a1129f418d273a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92618 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* prefer building Skia with Clang if possible (tdf#131697)Luboš Luňák2020-04-201-0/+2
| | | | | | | | | | | | | | | | | I.e. try to find and use Clang even if the default compiler is something else. Skia is optimized to be built with Clang(-cl) and in CPU-based raster mode some operations are several times slower if built with something else (e.g. fmax/fmin do not get optimized to inline assembly). It is enough to select Clang to be installed in the MSVS installer. At this point it unclear how to handle release binaries, if it should work this way and enforced, or maybe Clang could be used for building everything, or maybe some other way. Change-Id: I6b95a0f2d5cbf176942d9e01136990b14be6dba8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92415 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* HAVE_GCC_BUILTIN_FFS is unusedStephan Bergmann2020-04-171-1/+0
| | | | | | | | | | | ...ever since it was introduced in 334a9f16cd1d1f9694f885c759903a41aa3d4833 "tdf#113211: fix calculations with big integers". (Only the AC_DEFINE'd #define in config_host/config_global.h.in is used in sal/rtl/math.cxx.) Change-Id: I4b84534b022b96fee725988906c047736e7a579b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92411 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* revert the gyp-based nss build changesLuboš Luňák2020-03-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | https://lists.freedesktop.org/archives/libreoffice/2020-March/084769.html etc. This reverts commit c76fdcf1cfa1242e66b50ebe80d6eac1baae37a9. This reverts commit 10f52ab4d27263439d59f55f40e88ad2fde0cf71. This reverts commit eac806e8dcd9ee6439ac8695978ff6b62cc6b8d2. This reverts commit d591a682e46ff352f06a61c024ef661dd17f4ea4. This reverts commit 12235d3390a7fc5146bf65f9d6166034b8a048ee. This reverts commit 23245f723fb29262b8543d6447d1b0bb69cb50fb. This reverts commit 91658b402b66b67c785687d5b3a76e3183fe76bf. This reverts commit 5feadfad0cc3be2680213d2e5f6f786b2f4cc74f. This reverts commit fecca49c309fc723c524f12fa671114b316a5562. This reverts commit c6a9454e744289cf2004b42b3c90854b2db8382b. This reverts commit a1a62a70411cb6041b5930ead08280d5e1e7b5f9. This reverts commit 8512f4ca090c85477a6670438aeefe7fdfcf8a98. This reverts commit 532ffb7a297d55b495141ce33692df5d9917b54f. Change-Id: Iaa48d692bea2ca2468cdd5f8ad26ad91c0c31dde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91199 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* actually export $NINJA from configureLuboš Luňák2020-03-231-0/+1
| | | | | | | | | | | | | I based the check on the gmake check, but that one doesn't need the export, as gmake is what needs to be called for the build to start. But ninja is currently only used during building NSS. Also do not use Windows path for ninja on Windows, as NSS actually invokes it from a shell script. Change-Id: I0d8a86ee3688f27a376d547cd946bb4c59a547a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90922 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Add --disable-compiler-plugins-analyzer-pch for Jenkins/linux_clang_dbgutil_64Stephan Bergmann2020-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | <https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/54883/> had been a case I noticed of a "Gerrit Linux clang/dbgutil" build failing due to stale PCH information: [...] > [build GEN] compilerplugins/clang/sharedvisitor/makeshared.plugininfo > fatal error: file '/usr/include/asm-generic/errno.h' has been modified since the precompiled header '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/compilerplugins/clang/sharedvisitor/clang.pch' was built > note: please rebuild precompiled header '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/compilerplugins/clang/sharedvisitor/clang.pch' [...] and this issue had apparently caused all those Gerrit Jenkins builds to fail for at least a day. For unmaintained builds like those, I think it is better to have a more robust setup, where stale PCH information cannot break the build. Also, as those builds do not make compilerplugins.clean and rather share it across builds, there should not be much of a performance impact when disabling PCH in the analyzer. (It turns out that compilerplugins/clang/sharedvisitor/analyzer.cxx would always have enabled PCH, as compilerplugins/Makefile-clang.mk always passes in some definition of LO_CLANG_USE_ANALYZER_PCH. Fixed that now.) Change-Id: I7b8b24c1049c501634bd59c5fb482bec72427cf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90211 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
* macOS Xcode ld is known to always support -platform_version nowStephan Bergmann2020-02-201-1/+0
| | | | | | | | | | | | | ...after 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". This effectively reverts b7fd89100d8653dc73955780358fe31d38b68ebf "tdf#122218: Baseline Xcode 9.3 ld presumably doesn't support -platform_version". Change-Id: Ib79563babe3cc948556d5369b0f6b6a8d208cab2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89160 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* add --enable-optimized=debugLuboš Luňák2020-02-191-0/+1
| | | | | | | | | | | | | | | | | | This will use -Og with GCC/Clang instead of -O0, which should make unittests run faster without (hopefully) breaking anything related to debugging. This is primarily meant to Jenkins builds, where debug info is rarely needed (backtraces for unittest crashes AFAICT). This can be also used to make LO itself run faster when developing, but I personally do not find it worth it (with Clang and full PCH this makes starmath build take about 70% longer, although presumably for non-PCH builds the relative increase will be smaller). Change-Id: I198d0759ebca94c90be662e02e0f1281a24d1d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88917 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
* MAC_OS_X_VERSION_MIN_REQUIRED_DOTS is the same as MACOSX_DEPLOYMENT_TARGETStephan Bergmann2020-02-161-1/+0
| | | | | | | Change-Id: I3a725e4681c11f503dae57436b05b5a80ff2979c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88764 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Prevent -Werror,-Wunknown-warning-option when building compilerpluginsStephan Bergmann2020-02-141-0/+1
| | | | | | | | | | | | | | | | | | | ...with --enable-werror (seen it fail with a local build against a locally built Clang 5.0.2). (bin/gen-boost-headers faces a similar dilemma with Clang needing to silence -Wunknown-warning-option and GCC failing upon the silencing incantation. There, we were able to hack around that with a preceding #pragma GCC diagnostic ignored "-Wpragmas" Here, the easiest approach appears to be a new COMPILER_PLUGINS_COM_IS_CLANG analoguous to the existing COM_IS_CLANG.) Change-Id: I9036261fdd238c8a020a1d88b4e75fd444f9e030 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88725 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#122218: Baseline Xcode 9.3 ld presumably doesn't support -platform_versionStephan Bergmann2020-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | ...according to <https://github.com/llvm/llvm-project/commit/ 25ce33a6e4f3b13732c0f851e68390dc2acb9123> "[driver][darwin] Pass -platform_version flag to the linker instead of the -<platform>_version_min flag": "In Xcode 11, ld added a new flag called -platform_version [...] This patch adopts the new -platform_version flag in Clang, and starts using it by default, unless a linker version < 520 is passed to the driver." So detect new HAVE_MACOS_LD_PLATFORMVERSION and adapt 645fe53be0dc36535dba0ed684e21ca4cda80d70 "tdf#122218: Hack to avoid blurry text with macOS SDK 10.15" accordingly. (This also changes the passed -platform_verion sdk value from 0.0 to 0.0.0, for cosmetic consistency with the default Clang behavior cited above. Also, after f67e5ef9a5c71f3b35b1c67eb72794e44cc15410 "Drop broken filter-out of -bind_at_load for Executable_soffice_bin on macOS" got included in the meantime, the surrounding ifeq in desktop/Executable_soffice_bin.mk can be combined now.) Change-Id: Ie1ddf2d618e2f1232c6b4e17ce17665851f3bd38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88717 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* use -Wl,-dead_strip on Mac, its linker doesn't know -Wl,--gc-sectionsLuboš Luňák2020-01-181-0/+1
| | | | | | | Change-Id: Ic69d0030a46fe4753cc75da58bb2c15cf009b135 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87023 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* support Clang's -fmodules-codegen/debuginfo options for PCH buildingLuboš Luňák2020-01-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These (starting with my patches for Clang-to-be-10) allowing emitting debuginfo and functions into a dedicated object file, so that all the normal compilations using the PCH can skip those, thus saving the time. The debuginfo option seems to always be worth it. The codegen option is more tricky, it doesn't seem to be worth it for optimized builds (optimizing all the functions in that one object file costs too much). This requires also using --Wl,--gc-sections . The reason is that the object file contains all template instances instantiated from the PCH, so that they can be shared, but the template instance may come from another library or use a private symbol from that library. For example the std::unique_ptr<ScInterpreterContext> in ScInterpreterContextPool in the header refers to ScInterpreterContext dtor. But even though both these classes are private, the header gets used also by scfilt, because there it is included by document.hxx because of a private ScDocument data member. So even though nothing in scfilt uses ScInterpreterContext, the PCH object file will refer to it. Fortunately that template instance itself is not used by scfilt, so --gc-sections will remove it. Change-Id: I2a06ebcc4dd4175424b3a72ab3ebcaf2ac3ee295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87011 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* add support for Clang's -building-pch-with-objLuboš Luňák2020-01-181-0/+1
| | | | | | | | | | | | | | This marks the PCH as having an accompanying object file, and this object file needs to be also built, but this allows the compiler to skip generating stuff that'd be shared by all the objects using the PCH. Currently it doesn't make much of a difference, few symbols if any, but template instantiations could be shared this way, as soon as Clang gets the necessary support (my WIP patch). Change-Id: Ib1b86338d85a47b48979558435253dc2672a0da8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87009 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Enable -Wdeprecated-copy-dtor where availableStephan Bergmann2019-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We already get -Wdeprecated-copy (warning about implicitly defined copy functions that will in the future be deleted because other user-provided copy functions exist) automatically through -Wextra, where available. -Wdeprecated-copy-dtor (warning about implicitly defined copy functions that will in the future be deleted because of a user-provided dtor) is split off into its own warning excluded from -Wextra for somewhat unclear reasons, see the discussion at <https://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=88136> "-Wdeprecated-copy is draconian and shouldn't be in -Wall". But -Wdeprecated-copy-dtor has been useful in finding issues (esp. the Clang 10 trunk version, which, unlike the GCC 9 version, also finds copy functions that are implicitly defined because they are used from template instantiations), see 3e59716375a240576fd6d8759b32b4319506ed70 "Prevent BroadcastRecalcOnRefMoveHandler copies" and 4f98cd0f9ce9c2a331a5d34b3ef9d18f9bb6b235 "ScShapeChild has broken copy functions". We need to disable -Wdeprecated-copy-dtor in files included from external/boost, and in two compilerplugin/clang/test/ files. Change-Id: I74b159c3a046e23661473ddbfe53c92c4136a9db Reviewed-on: https://gerrit.libreoffice.org/85073 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Honor BISON passed into configureStephan Bergmann2019-12-061-0/+1
| | | | | | | | | | | | | | | | ...and require new-enough Bison for --enable-compiler-plugins to not generate bogus loplugin:external warnings in Bison boilerplate code. (As happend for me on macOS where /usr/bin/bison is version 2.3. Not sure which versions exactly are too old, but at least 3.4.1 is known good. If other versions newer than 2.3 turn out to be problematic too, the configure.ac check will need to be adapted.) No idea why there need to be three places across solenv/gbuild/ that set gb_YACC (to the same bison in each case), but leave that to be cleaned up later. Change-Id: I01d8219726f8df7895631b817866207327367759 Reviewed-on: https://gerrit.libreoffice.org/84650 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* split instrinsics CXXFLAGS per each instruction setLuboš Luňák2019-12-031-1/+8
| | | | | | | | | | | | | | | | The common usage pattern should be having one source file per each instruction set and then one source file compiled with neutral flags that dispatches to the relevant code based on runtime checks. Which means that there can't be any one "correct" flag, otherwise all files would get compiled e.g. with SSE4.2 but then CPUs capable only of SSE2 would crash running that code. Change-Id: I362bf66f672dae4588a48effe3bcd30c34ea75b3 Reviewed-on: https://gerrit.libreoffice.org/84227 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* android: Introduce --enable-android-lok configure switch to fix RGB vs. BGR.Jan Holesovsky2019-11-271-0/+1
| | | | | | | | | | | | | | | | | | This indicates that the build targets the Online-based Android app, for which we need to avoid various tweaks that are needed for the 'old' Android app present in the android/ subdir of core.git. In particular, the switch used in this patch fixes a RGBA vs. BGRA confusion that caused yellow <-> cyan switch in the Online-based Android app. Change-Id: I5f394868f51ce87013677834cfafb967b9bb333e Reviewed-on: https://gerrit.libreoffice.org/83342 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 49002a143a4534df5f6139e07fefd06174621c59) Reviewed-on: https://gerrit.libreoffice.org/83718 Tested-by: Jenkins
* initial build of the Skia libraryLuboš Luňák2019-11-271-0/+1
| | | | | | | Not quite complete yet, missing e.g. Vulkan sources, and the setup is not completely correct either. Change-Id: I2283bf12f0d226ff8a34554deae5a7bd69045971
* aarch64 callVirtualFunction needs to be compiled w/o -fstack-clash-protectionStephan Bergmann2019-10-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least when doing an aarch64 Flatpak build against org.freedesktop.Sdk//19.08, which uses GCC 9.2.0 and passes in `CXXFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection`, callVirtualMethod (in bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx) would decrement the stack pointer another 16 bytes after the stackargs = alloca(...); and before the asm block, so in the called virtual function, arguments read from the stack would read garbage (and CustomTarget_testtools/uno_test would fail with SIGSEGV at > #0 0x0000ffffb733eb48 in rtl::OUString::operator= (this=0xaaaaf9c1ac30, str=...) at /run/build/libreoffice/include/rtl/ustring.hxx:453 > #1 0x0000ffffb733a7bc in bridge_object::assign (rData=..., bBool=true, cChar=64 u'@', nByte=17 '\021', nShort=4660, nUShort=65244, nLong=305419896, nULong=4275878552, nHyper=0, nUHyper=187651311381888, fFloat=17.0814991, fDouble=3.1415926358999999, eEnum=-1698898192, rStr=..., xTest=..., rAny=...) at /run/build/libreoffice/testtools/source/bridgetest/cppobj.cxx:99 > #2 0x0000ffffb733a87c in bridge_object::assign (rData=..., bBool=true, cChar=64 u'@', nByte=17 '\021', nShort=4660, nUShort=65244, nLong=305419896, nULong=4275878552, nHyper=0, nUHyper=187651311381888, fFloat=17.0814991, fDouble=3.1415926358999999, eEnum=-1698898192, rStr=..., xTest=..., rAny=..., rSequence=...) at /run/build/libreoffice/testtools/source/bridgetest/cppobj.cxx:115 > #3 0x0000ffffb733ade4 in bridge_object::Test_Impl::setValues (this=0xaaaaf9c1abb0, bBool=1 '\001', cChar=64 u'@', nByte=17 '\021', nShort=4660, nUShort=65244, nLong=305419896, nULong=4275878552, nHyper=0, nUHyper=187651311381888, fFloat=17.0814991, fDouble=3.1415926358999999, eEnum=-1698898192, rStr=..., xTest=..., rAny=..., rSequence=..., rStruct=...) at /run/build/libreoffice/testtools/source/bridgetest/cppobj.cxx:548 > #4 0x0000ffffb740bff4 in callVirtualFunction (function=281473755360772, gpr=0xffffd1ab1f28, fpr=0xffffd1ab1f68, stack=0xffffd1ab1d40, sp=8, ret=0xffffd1ab22c0) at /run/build/libreoffice/bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx:63 > #5 0x0000ffffb740ca70 in (anonymous namespace)::call (proxy=0xaaaaf9c291c0, slot=..., returnType=0xaaaaf9c00770, count=17, parameters=0xaaaaf9c3a210, returnValue=0xffffd1ab22c0, arguments=0xffffd1ab2230, exception=0xffffd1ab2370) at /run/build/libreoffice/bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx:178 > #6 0x0000ffffb740d4c4 in bridges::cpp_uno::shared::unoInterfaceProxyDispatch (pUnoI=0xaaaaf9c291c0, pMemberDescr=0xaaaaf9c55950, pReturn=0xffffd1ab22c0, pArgs=0xffffd1ab2230, ppException=0xffffd1ab2370) at /run/build/libreoffice/bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx:361 > #7 0x0000ffffb740720c in (anonymous namespace)::call (proxy=0xaaaaf9c549c0, description=..., returnType=0xaaaaf9c00770, count=17, parameters=0xaaaaf9c3a210, gpr=0xffffd1ab2510, fpr=0xffffd1ab2550, stack=0xffffd1ab2590, indirectRet=0xffffb7d24790) at /run/build/libreoffice/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx:120 > #8 0x0000ffffb74079a0 in (anonymous namespace)::vtableCall (functionIndex=40, vtableOffset=0, gpr=0xffffd1ab2510, fpr=0xffffd1ab2550, stack=0xffffd1ab2590, indirectRet=0xffffb7d24790) at /run/build/libreoffice/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx:291 > #9 0x0000ffffb7407b00 in (anonymous namespace)::vtableSlotCall (gpr0=187651311618536, gpr1=1, gpr2=64, gpr3=17, gpr4=4660, gpr5=65244, gpr6=305419896, gpr7=4275878552, fpr0=5.4321266044931319e-315, fpr1=3.1415926358999999, fpr2=0, fpr3=4.0039072046065485, fpr4=0, fpr5=4.003911019303815, fpr6=8.9589789687541617e+102, fpr7=-4.4588500238274385e-308) at /run/build/libreoffice/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx:348 > #10 0x0000ffffb739e60c in bridge_test::performTest (xContext=..., xLBT=..., noCurrentContext=false) at /run/build/libreoffice/testtools/source/bridgetest/bridgetest.cxx:378 > #11 0x0000ffffb73a3d58 in bridge_test::TestBridgeImpl::run (this=0xaaaaf9c18550, rArgs=...) at /run/build/libreoffice/testtools/source/bridgetest/bridgetest.cxx:1162 > #12 0x0000aaaad292a3ec in sal_main () at /run/build/libreoffice/cpputools/source/unoexe/unoexe.cxx:509 > #13 0x0000aaaad29297a0 in main (argc=8, argv=0xffffd1ab31b8) at /run/build/libreoffice/cpputools/source/unoexe/unoexe.cxx:349 .) By experiment, I found the problematic thing to be -fstack-clash-protection, which can apparently be cancelled with a subsequent -fno-stack-clash-protection at least on that GCC 9.2.0. (And -f[no-]stack-clash-protection appears to only be available since GCC 8, and not at all for Clang, so check for it with HAVE_GCC_STACK_CLASH_PROTECTION.) Change-Id: If667fdf704b1ba20a04593b38d2d1f079280df41 Reviewed-on: https://gerrit.libreoffice.org/80701 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* -fstack-protector-strong is long since availableStephan Bergmann2019-10-121-1/+0
| | | | | | | | | | | | | ...on our baselines, since <https://gcc.gnu.org/git/ ?p=gcc.git;a=commitdiff;h=b156ec373ccf27f4fcce7972de5e043d35acea43> (GCC 4.9?) and <https://github.com/llvm/llvm-project/commit/ e0fc1a80cba8b91e3943f3287e7dcf68c6bb9b7f> "[stackprotector] Add command line option -fstack-protector-strong" (Clang 3.5?) Change-Id: I48237b2304a1ee273cc66f0bb458e890a5a2f21a Reviewed-on: https://gerrit.libreoffice.org/80700 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* try to autodetect flags needed to build Clang pluginsLuboš Luňák2019-10-071-0/+3
| | | | | | | | | | | | | | Instead of having a lot of it hardcoded, which brings problems like: - Clang-to-be-10 has switched to -std=c++14, so our hardcoded c++11 makes the build fail - I cannot compile with my openSUSE-shipped clang, because it ships only libclang-cpp and not the other libClangSomething libs The possibility to explicitly set the necessary variables is still there. Change-Id: I58d401d4584fa064f1c1351a8a06ff4e29643063 Reviewed-on: https://gerrit.libreoffice.org/80300 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>