office-gobmx/distro-configs
Caolán McNamara 2e50b3850b add --enable-hardening-flags to enable compiler hardening flags
distros typically have their own set via C[XX]FLAGS, so make
this an optional argument

some notes on the options:

-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2
https://www.redhat.com/en/blog/enhance-application-security-fortifysource
(I see Fedora has recently bumped to to 3 since Jan 2024
https://fedoraproject.org/wiki/Changes/Add_FORTIFY_SOURCE%3D3_to_distribution_build_flags
but here use 2 for now instead)

-Wp,-D_GLIBCXX_ASSERTIONS
https://fedoraproject.org/wiki/Changes/HardeningFlags28

-fstack-protector-strong
(We already apply this by default)

-fstack-clash-protection
https://fedoraproject.org/wiki/Changes/HardeningFlags28

-fcf-protection
https://fedoraproject.org/wiki/Changes/HardeningFlags28
https://cgit.freedesktop.org/libreoffice/core/commit/?id=af55dc3891f7950d392175004b2090cb0e54828e

and record the compiler flags in debuginfo
-grecord-gcc-switches

Change-Id: Ib05387bad8324b188bd4ed0ee327d6a7cf83973b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163312
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 33483058f6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166289
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-19 21:01:53 +02:00
..
Jenkins distro-configs: use internal python in bisect repos 2024-01-29 09:59:48 +01:00
CPAndroid.conf Introduce INCLUDE: in the distro-configs... 2020-02-11 20:25:32 +01:00
CPAndroidAarch64.conf Introduce INCLUDE: in the distro-configs... 2020-02-11 20:25:32 +01:00
CPAndroidBranding.conf Enable PdfIum for android build 2021-06-04 10:38:48 +02:00
CPAndroidX86.conf android: Add a CP x86 configuration too. 2020-07-01 18:00:09 +02:00
CPAndroidX86_64.conf
CPLinux-LOKit.conf add --enable-hardening-flags to enable compiler hardening flags 2024-04-19 21:01:53 +02:00
LibreOfficeAndroid.conf
LibreOfficeAndroidAarch64.conf Enable PdfIum for android build 2021-06-04 10:38:48 +02:00
LibreOfficeAndroidX86.conf
LibreOfficeAndroidX86_64.conf Enable PdfIum for android build 2021-06-04 10:38:48 +02:00
LibreOfficeCoverity.conf update LibreOfficeCoverity.conf 2023-06-23 21:35:24 +02:00
LibreOfficeFlatpak.conf Adapt flatpak build to upstream changes 2024-04-10 12:05:32 +02:00
LibreOfficeHaiku.conf make --disable-odk the default 2021-05-18 08:47:09 +02:00
LibreOfficeiOS.conf Eliminate hang in iOS app (and maybe the Android app) during export 2024-01-17 17:31:07 +01:00
LibreOfficeiOS_Sim.conf Eliminate hang in iOS app (and maybe the Android app) during export 2024-01-17 17:31:07 +01:00
LibreOfficeLinux.conf tdf#159502 remove --without-system-libxml from LibreOfficeLinux.conf 2024-02-16 10:38:21 +01:00
LibreOfficeMacOSX.conf move Windows amd macOS builds to mergelibs=more 2024-03-04 18:04:23 +01:00
LibreOfficeOnline.conf add an --enable-cairo-rgba to set the order of pixels for internal cairo 2023-06-27 10:04:36 +02:00
LibreOfficeOpenBSD.conf ucb: remove --with-webdav=neon 2021-12-15 15:24:52 +01:00
LibreOfficeOssFuzz.conf stop using removed ---with-idlc-cpp=cpp argument 2022-06-14 15:19:38 +02:00
LibreOfficeVanillaMacAppStore.conf Drop unused CT2N extension 2022-04-26 10:08:30 +02:00
LibreOfficeWASM32.conf Need --disable-gen for the Qt5-based WASM LibreOffice now 2022-12-06 10:39:52 +00:00
LibreOfficeWin32.conf --enable-lto for distro-configs/* that already use --enable-mergelibs 2021-10-14 15:58:07 +02:00
LibreOfficeWin64.conf move Windows amd macOS builds to mergelibs=more 2024-03-04 18:04:23 +01:00
LibreOfficeWinArm64.conf --enable-lto for distro-configs/* that already use --enable-mergelibs 2021-10-14 15:58:07 +02:00
README.md Updated README.md files to represent current code / use Markdown format 2021-04-07 17:47:16 +02:00

Pre-canned Distribution Configurations

These files are supposed to correspond to the options used when creating the Document Foundation (or other "canonical") builds of LibreOffice for various platforms. They are not supposed to represent the "most useful" options for developers in general. On the contrary, the intent is that just running ./autogen.sh without any options at all should produce a buildable configuration for developers with interest in working on the most commonly used parts of the code.

See https://wiki.documentfoundation.org/Development/ReleaseBuilds for how TDF builds make use of these switches. (Especially, since --with-package-format now triggers whether or not installation sets are built, all the relevant *.conf files specify it, except for LibreOfficeLinux.conf, where the TDF build instructions pass an explicit --with-package-format="rpm deb" in addition to --with-distro=LibreOfficeLinux.)

(Possibly the above is a misunderstanding, or maybe there never even has been any clear consensus what situations these files actually are intended for.)

The files contain sets of configuration parameters, and can be passed on the autogen.sh command line thus:

./autogen.sh --with-distro=LibreOfficeFoo

Contrary to the above, in the Android case the amount of parameters you just must use is so large, that for convenience it is always easiest to use the corresponding distro-configs file. This is a bug and needs to be fixed; also configuring for Android should ideally use sane (or the only possible) defaults and work fine without any parameters at all.