From 60208708f25db2a66d7ccbe47af83b04da459fdb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 26 Jan 2008 16:43:15 +0000 Subject: [PATCH] Use -fno-stack-protector with GCC versions that support it, to fix a linker error on platform on which -fstack-protector is default, such as recent versions of Ubuntu. --- src/Make.config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Make.config b/src/Make.config index 16db6d5..841e910 100644 --- a/src/Make.config +++ b/src/Make.config @@ -39,6 +39,11 @@ ASFLAGS = -Wa,--gstabs LDFLAGS = DEPS = -MMD -MF $(@:.o=.d) +# Turn off -fstack-protector, which we don't support. +ifeq ($(strip $(shell echo | $(CC) -fno-stack-protector -E - > /dev/null 2>&1; echo $$?)),0) +CFLAGS += -fno-stack-protector +endif + %.o: %.c $(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS) $(WARNINGS) $(DEFINES) $(DEPS) -- 2.30.2