diff --git a/Makefile.in b/Makefile.in index 5d633a79..e3ebd840 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,7 +22,7 @@ datarootdir=@datarootdir@ localedir=@localedir@ gettext_package=@GETTEXT_PACKAGE@ -CFLAGS=@CFLAGS@ @PURPLE_CFLAGS@ @DEFS@ -DENABLE_NLS -DLOCALEDIR='"$(localedir)"' -Wall -Wextra -Wno-deprecated-declarations -Wno-unused-parameter -I${srcdir} -I. -fno-strict-aliasing -fPIC +CFLAGS=@CFLAGS@ @PURPLE_CFLAGS@ @DEFS@ -DENABLE_NLS -DLOCALEDIR='"$(localedir)"' -Wall -Wextra -Wno-deprecated-declarations -Wno-unused-parameter -I${srcdir} -I. -fno-strict-aliasing -fPIC -D_FORTIFY_SOURCE=2 LDFLAGS=@LDFLAGS@ @OPENSSL_LIBS@ @PURPLE_LIBS@ @LIBS@ -rdynamic -ggdb DIR_PERM=0755 FILE_PERM=0644 @@ -31,6 +31,12 @@ CC=@CC@ PKG_CONFIG=@PKG_CONFIG@ MSGFMT_PATH=@MSGFMT_PATH@ +# Check if -fstack-protector-strong is supported before enabling it +SPUNSUPPORTED = $(shell $(CC) -fstack-protector-strong 2>&1 | grep -c 'stack-protector-strong') +ifeq "$(SPUNSUPPORTED)" "0" + CFLAGS += -fstack-protector-strong +endif + DEP=dep EXE=bin OBJ=objs