Sorry, I messed up the patch a little as I wanted to get the error message that prompted adding "--without-galleries". It should be:
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 8343f8ffc6..7fb3fe1327 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -1235,6 +1235,8 @@ (define (install-appdata app) ;; when our default compiler is >=GCC 6. "--disable-pdfium" "--without-doxygen" + "--enable-lto" + "--without-galleries" "--enable-build-opensymbol"))) (native-inputs (list bison