summaryrefslogtreecommitdiff
path: root/config_host.mk.in
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-02-13 15:17:48 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-19 21:01:53 +0200
commit2e50b3850ba2074dba41e6ea07c9e7d236af0d6c (patch)
tree03c9a0fb1796494846f33f19e4c6ed72ef6c13fa /config_host.mk.in
parent5c6cdc5d5a1bf14155523b2817a96609068ae6ac (diff)
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 33483058f6e27f39633114721f7329c90571101d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166289 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'config_host.mk.in')
-rw-r--r--config_host.mk.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index 00dc7aa1f898..1d5a83add0c0 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -179,6 +179,9 @@ export ENABLE_GTK3=@ENABLE_GTK3@
export ENABLE_GTK4=@ENABLE_GTK4@
export ENABLE_GTKTILEDVIEWER=@ENABLE_GTKTILEDVIEWER@
export DISABLE_GUI=@DISABLE_GUI@
+export ENABLE_HARDENING_FLAGS=@ENABLE_HARDENING_FLAGS@
+export HARDENING_CFLAGS=@HARDENING_CFLAGS@
+export HARDENING_OPT_CFLAGS=@HARDENING_OPT_CFLAGS@
export ENABLE_HEADLESS=@ENABLE_HEADLESS@
export ENABLE_HTMLHELP=@ENABLE_HTMLHELP@
export ENABLE_JAVA=@ENABLE_JAVA@