[Libreoffice-commits] core.git: configure.ac

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 1 12:43:48 UTC 2018


 configure.ac |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit aabf08487fb205f82ec0b5e642236b78134ce5d5
Author:     Kacper Kasper <kacperkasper at gmail.com>
AuthorDate: Thu Sep 20 19:25:18 2018 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Nov 1 13:43:20 2018 +0100

    Tweak stack protector check
    
    * There were concerns that current program could fail if -Werror
      is enabled and incorrectly report stack protector availability.
    * Remove "return 0;" since configure adds it automatically.
    * Add -O0 to build options, otherwise the function is optimized
      away and it doesn't trigger linker failure.
    
    Change-Id: Ib540b583019d17fec1213ff3c364030b003a5f0f
    Reviewed-on: https://gerrit.libreoffice.org/60836
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/configure.ac b/configure.ac
index e0ab079b011b..912f5f346e62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5928,8 +5928,8 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
 
     AC_MSG_CHECKING([whether $CC supports -fstack-protector-strong])
     save_CFLAGS=$CFLAGS
-    CFLAGS="$CFLAGS -Werror -fstack-protector-strong"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ char a[8]; return 0; ]])],[ HAVE_GCC_STACK_PROTECTOR_STRONG=TRUE ],[])
+    CFLAGS="$CFLAGS -O0 -Werror -fstack-protector-strong"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ char a[8]; a[7] = 0; ]])],[ HAVE_GCC_STACK_PROTECTOR_STRONG=TRUE ],[])
     CFLAGS=$save_CFLAGS
     if test "$HAVE_GCC_STACK_PROTECTOR_STRONG" = "TRUE"; then
         AC_MSG_RESULT([yes])


More information about the Libreoffice-commits mailing list