]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
build: Add flag to disable stack-protector
authorPatrick Griffis <redacted>
Thu, 28 Jul 2016 17:31:38 +0000 (13:31 -0400)
committerPatrick Griffis <redacted>
Thu, 28 Jul 2016 17:52:33 +0000 (13:52 -0400)
This is currently an issue when building in Flatpak

configure.ac

index ad419f12884b9a37fb6951936b320769b72f96ae..ec6e2401210458921265f652a2a5d857693f6105 100644 (file)
@@ -174,6 +174,9 @@ AC_ARG_WITH(theme-manager,
        [AS_HELP_STRING([--with-theme-manager],[compile theme manager (needs monodevelop, default: off)])],
                theme_manager=$withval, theme_manager=no)
 
+AC_ARG_ENABLE(stack-protector,
+       [AS_HELP_STRING([--disable-stack-protector],[disable building with stack-protector])],
+        stack_protector=$enableval, stack_protector=yes)
 
 
 dnl *********************************************************************
@@ -623,7 +626,6 @@ dnl *********************************************************************
 AX_APPEND_COMPILE_FLAGS([\
        -pipe \
        -funsigned-char \
-       -fstack-protector-strong \
        -fPIE \
        -fPIC \
        -Wall \
@@ -643,6 +645,12 @@ AX_APPEND_COMPILE_FLAGS([\
        -Werror=pointer-arith \
 ])
 
+AS_IF([test "$stack_protector" = "yes"], [
+       AX_APPEND_COMPILE_FLAGS([ \
+               -fstack-protector-strong \
+       ])
+])
+
 AX_APPEND_LINK_FLAGS([ \
        -pie \
        -Wl,-z,relro \