From: Thomas Renninger <trenn@suse.com>
Subject: Remove fcf-protection=full
References: 
Patch-Mainline: 
Git-commit: c06b22050797e630f41250ddee7a7f67eb1f3912
Git-repo: git@github.com:watologo1/intel-cmt-cat.git.git

This option causes grief with at least some gcc versions:

built failure ->"cc: error: unrecognized command line option '-fcf-
protection=full'; did you mean '-fstack-protector-all'?"

and some archs (i586):

 cc1: error: ‘-fcf-protection’ is not compatible with this target

According to our gcc maintainer (translated):
Whatever the reason is that they require gcc version 9..., maybe  -fcf-protection,
but simply throw it out...

If there is no urgent reason, better get rid of this one.

Signed-off-by: Thomas Renninger <trenn@suse.de>


Signed-off-by:  <trenn@suse.com>
---
 examples/c/CAT_MBA/Makefile     |    3 +--
 examples/c/CMT_MBM/Makefile     |    3 +--
 examples/c/PSEUDO_LOCK/Makefile |    3 +--
 lib/Makefile                    |    3 +--
 pqos/Makefile                   |    6 ++----
 rdtset/Makefile                 |    6 ++----
 tools/membw/Makefile            |    6 ++----
 unit-test/lib/Makefile          |    3 +--
 unit-test/mock/Makefile         |    3 +--
 unit-test/output/Makefile       |    3 +--
 unit-test/pqos/Makefile         |    5 ++---
 11 files changed, 15 insertions(+), 29 deletions(-)

--- a/examples/c/CAT_MBA/Makefile
+++ b/examples/c/CAT_MBA/Makefile
@@ -64,8 +64,7 @@
 CFLAGS += -fno-strict-overflow \
     -fno-delete-null-pointer-checks \
     -fwrapv \
-    -fstack-clash-protection \
-    -fcf-protection=full
+    -fstack-clash-protection
 endif
 
 # Build targets and dependencies
--- a/examples/c/CMT_MBM/Makefile
+++ b/examples/c/CMT_MBM/Makefile
@@ -64,8 +64,7 @@
 CFLAGS += -fno-strict-overflow \
     -fno-delete-null-pointer-checks \
     -fwrapv \
-    -fstack-clash-protection \
-    -fcf-protection=full
+    -fstack-clash-protection
 endif
 
 # Build targets and dependencies
--- a/examples/c/PSEUDO_LOCK/Makefile
+++ b/examples/c/PSEUDO_LOCK/Makefile
@@ -64,8 +64,7 @@
 CFLAGS += -fno-strict-overflow \
     -fno-delete-null-pointer-checks \
     -fwrapv \
-    -fstack-clash-protection \
-    -fcf-protection=full
+    -fstack-clash-protection
 endif
 
 # Build targets and dependencies
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -72,8 +72,7 @@
 CFLAGS += -fno-strict-overflow \
     -fno-delete-null-pointer-checks \
     -fwrapv \
-    -fstack-clash-protection \
-    -fcf-protection=full
+    -fstack-clash-protection
 endif
 
 # so or static build
--- a/pqos/Makefile
+++ b/pqos/Makefile
@@ -45,8 +45,7 @@
 	-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
 	-Wcast-qual -Wundef -Wwrite-strings \
 	-Wformat -Wformat-security -fstack-protector-strong -fPIE \
-	-Wunreachable-code -Wsign-compare -Wno-endif-labels \
-	-fcf-protection=full
+	-Wunreachable-code -Wsign-compare -Wno-endif-labels
 ifneq ($(EXTRA_CFLAGS),)
 CFLAGS += $(EXTRA_CFLAGS)
 endif
@@ -70,8 +69,7 @@
 CFLAGS += -fno-strict-overflow \
     -fno-delete-null-pointer-checks \
     -fwrapv \
-    -fstack-clash-protection \
-    -fcf-protection=full
+    -fstack-clash-protection
 endif
 
 ifeq ($(shell uname), FreeBSD)
--- a/rdtset/Makefile
+++ b/rdtset/Makefile
@@ -45,8 +45,7 @@
 	-Wcast-qual -Wundef -Wwrite-strings \
 	-Wformat -Wformat-security -fstack-protector-strong -fPIE \
 	-Wunreachable-code -Wsign-compare -Wno-endif-labels \
-	-D_GNU_SOURCE \
-	-fcf-protection=full
+	-D_GNU_SOURCE
 ifneq ($(EXTRA_CFLAGS),)
 CFLAGS += $(EXTRA_CFLAGS)
 endif
@@ -70,8 +69,7 @@
 CFLAGS += -fno-strict-overflow \
 	-fno-delete-null-pointer-checks \
 	-fwrapv \
-	-fstack-clash-protection \
-	-fcf-protection=full
+	-fstack-clash-protection
 endif
 
 # DEBUG build
--- a/tools/membw/Makefile
+++ b/tools/membw/Makefile
@@ -49,8 +49,7 @@
 	-Wcast-qual -Wundef -Wwrite-strings \
 	-Wformat -Wformat-security -fstack-protector-strong -fPIE \
 	-Wunreachable-code -Wsign-compare -Wno-endif-labels \
-	-Winline -msse4.2 \
-	-fcf-protection=full
+	-Winline -msse4.2
 
 ifneq ($(EXTRA_CFLAGS),)
 CFLAGS += $(EXTRA_CFLAGS)
@@ -84,8 +83,7 @@
     -fno-delete-null-pointer-checks \
     -fwrapv \
     -fno-expensive-optimizations \
-    -fstack-clash-protection \
-    -fcf-protection=full
+    -fstack-clash-protection
 endif
 
 SRCS = $(sort $(wildcard *.c))
--- a/unit-test/lib/Makefile
+++ b/unit-test/lib/Makefile
@@ -35,8 +35,7 @@
 CFLAGS += -fno-strict-overflow \
 	-fno-delete-null-pointer-checks \
 	-fwrapv \
-	-fstack-clash-protection \
-	-fcf-protection=full
+	-fstack-clash-protection
 endif
 
 # common function wrap
--- a/unit-test/mock/Makefile
+++ b/unit-test/mock/Makefile
@@ -69,8 +69,7 @@
 CFLAGS += -fno-strict-overflow \
     -fno-delete-null-pointer-checks \
     -fwrapv \
-    -fstack-clash-protection \
-    -fcf-protection=full
+    -fstack-clash-protection
 endif
 
 # so or static build
--- a/unit-test/output/Makefile
+++ b/unit-test/output/Makefile
@@ -66,8 +66,7 @@
 CFLAGS += -fno-strict-overflow \
     -fno-delete-null-pointer-checks \
     -fwrapv \
-    -fstack-clash-protection \
-    -fcf-protection=full
+    -fstack-clash-protection
 endif
 
 # so or static build
--- a/unit-test/pqos/Makefile
+++ b/unit-test/pqos/Makefile
@@ -1,4 +1,4 @@
-###############################################################################
+[1;115;0c###############################################################################
 # Makefile script for PQoS library and sample application
 #
 # @par
@@ -69,8 +69,7 @@
 CFLAGS += -fno-strict-overflow \
     -fno-delete-null-pointer-checks \
     -fwrapv \
-    -fstack-clash-protection \
-    -fcf-protection=full
+    -fstack-clash-protection
 endif
 
 CFLAGS += -g -ggdb -O0
