build: Add flag to disable stack-protector

This is currently an issue when building in Flatpak
This commit is contained in:
Patrick Griffis 2016-07-28 13:31:38 -04:00
parent aabcf6f9f4
commit 74f014bd8c

View File

@ -174,6 +174,9 @@ AC_ARG_WITH(theme-manager,
[AS_HELP_STRING([--with-theme-manager],[compile theme manager (needs monodevelop, default: off)])], [AS_HELP_STRING([--with-theme-manager],[compile theme manager (needs monodevelop, default: off)])],
theme_manager=$withval, theme_manager=no) 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 ********************************************************************* dnl *********************************************************************
@ -623,7 +626,6 @@ dnl *********************************************************************
AX_APPEND_COMPILE_FLAGS([\ AX_APPEND_COMPILE_FLAGS([\
-pipe \ -pipe \
-funsigned-char \ -funsigned-char \
-fstack-protector-strong \
-fPIE \ -fPIE \
-fPIC \ -fPIC \
-Wall \ -Wall \
@ -643,6 +645,12 @@ AX_APPEND_COMPILE_FLAGS([\
-Werror=pointer-arith \ -Werror=pointer-arith \
]) ])
AS_IF([test "$stack_protector" = "yes"], [
AX_APPEND_COMPILE_FLAGS([ \
-fstack-protector-strong \
])
])
AX_APPEND_LINK_FLAGS([ \ AX_APPEND_LINK_FLAGS([ \
-pie \ -pie \
-Wl,-z,relro \ -Wl,-z,relro \