Skip to content

Commit

Permalink
Don't force -fstack-protector, the toolchain might lack support for it
Browse files Browse the repository at this point in the history
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Retrieved (and slightly updated) from:
https://git.buildroot.net/buildroot/tree/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  • Loading branch information
ffontaine authored and reubenhwk committed Mar 25, 2019
1 parent 9644266 commit f2cb354
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ DISABLE_WARNINGS = \

AM_CFLAGS = \
-fno-strict-aliasing \
-fstack-protector \
$(ENABLE_WARNINGS) \
$(DISABLE_WARNINGS)

if HAVE_STACK_PROTECTOR
AM_CFLAGS += \
-fstack-protector
endif

### CPP is C PreProcessor ###

AM_YFLAGS = -d
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ dnl Determine CC and preset CFLAGS
AC_PROG_CC_C99
AC_PROG_RANLIB

AC_ARG_WITH([stack-protector], AS_HELP_STRING([--without-stack-protector], [Build without -fstack-protector]),[],[with_stack_protector=yes])
AM_CONDITIONAL(HAVE_STACK_PROTECTOR, test x"$with_stack_protector" = xyes)

AC_ARG_WITH([check], AS_HELP_STRING([--without-check], [Build without check unit testing framework]),[],[with_check=no])
AS_IF([test "x$with_check" = "xyes"], [
AS_IF([test "x$arch" = "xlinux"], [
Expand Down

0 comments on commit f2cb354

Please sign in to comment.