Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/telegram-purple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlain <carpikemail@gmail.com>2016-10-13 14:48:06 +0300
committerAlain <carpikemail@gmail.com>2016-10-13 14:48:06 +0300
commit0d0a2cbbd7905f9055346722b6a91133330f38dc (patch)
tree439928ec9646817d0981bc6854bcf56623a7a846 /Makefile.in
parent9d86bf2af699480f999e5ccc6dc882bdca098a76 (diff)
Check if gcc >= 5.0 before enabling stack smashing protection
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index f5fd37f..4bb350f 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 -fstack-protector-strong -D_FORTIFY_SOURCE=2
+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,14 @@ CC=@CC@
PKG_CONFIG=@PKG_CONFIG@
MSGFMT_PATH=@MSGFMT_PATH@
+# Check if GCC >= 5.0 before enabling stack smashing protection
+ifeq "$(CC)" "gcc"
+GCCVERGEQ5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 5)
+ifeq "$(GCCVERGEQ5)" "1"
+ CFLAGS += -fstack-protector-strong
+endif
+endif
+
DEP=dep
EXE=bin
OBJ=objs