diff options
author | Patrick Griffis <tingping@tingping.se> | 2016-07-28 13:31:38 -0400 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2016-07-28 13:52:33 -0400 |
commit | 74f014bd8cc1c68c321c0717e4ae833feda82584 (patch) | |
tree | 900a889a39b851b638ae1022bfaf656e00f9a2a4 | |
parent | aabcf6f9f43c9b5346902cc013cae6d5bb7bc9ce (diff) |
build: Add flag to disable stack-protector
This is currently an issue when building in Flatpak
-rw-r--r-- | configure.ac | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ad419f12..ec6e2401 100644 --- a/configure.ac +++ b/configure.ac @@ -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 \ |