Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --disable-stack-protector option #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ AX_ADD_FORTIFY_SOURCE
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
PKG_PROG_PKG_CONFIG

AC_ARG_ENABLE([stack-protector],
AS_HELP_STRING([--disable-stack-protector], [Disable stack-protector]))
AM_CONDITIONAL([ENABLE_STACK_PROTECTOR], [test x$enable_stack_protector != xno])

# Checks for libraries.
AX_PTHREAD([
LIBS="$PTHREAD_LIBS $LIBS"
Expand Down
5 changes: 4 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,16 @@ powertop_CXXFLAGS = \
-Wformat \
-Wshadow \
-fno-omit-frame-pointer \
-fstack-protector \
$(GLIB2_CFLAGS) \
$(LIBNL_CFLAGS) \
$(NCURSES_CFLAGS) \
$(PCIUTILS_CFLAGS) \
$(PTHREAD_CFLAGS)

if ENABLE_STACK_PROTECTOR
powertop_CXXFLAGS += \
-fstack-protector
endif

powertop_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
Expand Down